private int RemoveComponent(LContainer container, LComponent comp) { int removed = container.Remove(comp); LComponent[] components = container.GetComponents(); int i = 0; while (removed == -1 && i < components.Length - 1) { if (components[i].IsContainer()) { removed = this .RemoveComponent((LContainer) components[i], comp); } i++; } return removed; }
internal void SetContainer(LContainer container) { this.parent = container; this.ValidatePosition(); }
public void SetContentPane(LContainer pane) { pane.SetBounds(0, 0, this.GetWidth(), this.GetHeight()); this.contentPane = pane; this.SetDesktop(this.contentPane); }
internal void ValidateContainer(LContainer container) { LComponent[] components = container.GetComponents(); int size = container.GetComponentCount(); for (int i = 0; i < size; i++) { if (components[i].IsContainer()) { this.ValidateContainer((LContainer) components[i]); } } }
public virtual void Dispose() { this.isClose = true; this.desktop.SetComponentStat(this, false); if (this.parent != null) { this.parent.Remove(this); } this.desktop = Desktop.EMPTY_DESKTOP; this.input = null; this.parent = null; if (imageUI != null) { for (int i = 0; i < imageUI.Length; i++) { imageUI[i].Destroy(); imageUI[i] = null; } this.imageUI = null; } if (background != null) { this.background.Destroy(); this.background = null; } this.selected = false; this.visible = false; }
private Desktop() { this.contentPane = new LPanel(0, 0, 1, 1); this.input = null; this.SetDesktop(this.contentPane); }
public Desktop(LInput input, int width, int height) { this.contentPane = new LPanel(0, 0, width, height); this.input = input; this.SetDesktop(this.contentPane); }