/// <summary> /// Hides the mask /// </summary> public void Unmask() { if (null == _maskGraphics) { return; } _maskGraphics.Stop(); _component.RemoveEventListener(MoveEvent.MOVE, MoveHandler, EventPhase.Target); _component.RemoveEventListener(ResizeEvent.RESIZE, ResizeHandler, EventPhase.Target); if (null != _parent) { _parent.RemoveChild(_maskGraphics); } _maskGraphics.Dispose(); _maskGraphics = null; }
public virtual DisplayListMember AddChildAt(DisplayListMember child, int index) // TODO: Do delayed version { //return QAddChildAt(index, child); DisplayObjectContainer formerParent = child.Parent; if (null != formerParent) { formerParent.RemoveChild(child); } QAddChildAt(child, index); return(child); }
public virtual DisplayListMember AddChild(DisplayListMember child) { //Debug.Log("Parent: " + child.Parent); DisplayObjectContainer formerParent = child.Parent; if (null != formerParent) { formerParent.RemoveChild(child); } QAddChild(child); return(child); }
public override DisplayListMember AddChildAt(DisplayListMember child, int index) { DisplayObjectContainer formerParent = child.Parent; if (null != formerParent) { formerParent.RemoveChild(child); } AddingChild(child); QAddChildAt(child, index); ChildAdded(child); return(child); }
/** * Važno: * Ove overrideove sam ja dodao 20131105 * Razlog je bio problem oko dinamičkog dodavanja itema u List kontrolu * Naime, iako su se liste inicijalno normalno inicijalizirale, prilikom dodavanja novog childa u kolekciju (dinamički) * događao se Exception u DataGroup metodi AddItemRendererToDisplayList ("ArgumentOutOfRangeException: Argument is out of range.") * Greška je bila ta da je linija base.AddChildAt(child, childIndex) naravno zvala base.AddChildAt od klase Component * a ta implementacija interno zove QAddChildAt (tj. ne radi razliku između toga da li postoji contentPane ili ne) * Tako da je child uvijek bio dodavan direktno na GroupBase, a ne na contentPane ukoliko je postojao * (GroupBase "laže" vanjskom svijetu i skriva činjenicu da postoji contentPane) * Zbog toga je bilo potrebno overridati ove 4 metode i ispraviti tu funkcionalnost * */ public override DisplayListMember AddChild(DisplayListMember child) { DisplayObjectContainer formerParent = child.Parent; if (null != formerParent) { formerParent.RemoveChild(child); } // Do anything that needs to be done before the child is added. // When adding a child to Component, this will set the child's // virtual parent, its nestLevel, its document, etc. // When adding a child to a Container, the override will also // invalidate the container, adjust its content/chrome partitions, // etc. //base.AddingChild(child); if (null != _contentPane) { ContentPaneAddingChild(child); } else { base.AddingChild(child); } // Call a low-level player method in DisplayObjectContainer which // actually attaches the child to this component. // The player dispatches an "added" event from the child just after // it is attached, so all "added" handlers execute during this call. // Component registers an addedHandler() in its constructor, // which makes it runs before any other "added" handlers except // capture-phase ones; it sets up the child's styles. var retVal = null != _contentPane?_contentPane.QAddChild(child) : QAddChild(child); // Do anything that needs to be done after the child is added // and after all "added" handlers have executed. // This is where /*base.*/ ChildAdded(child); InvalidateDrawingList(); //if (null != _contentPane) // DepthUtil.UpdateDrawingList(_contentPane); // because AutoUpdateDrawingList is turned of on contentPane return(retVal); }
public override DisplayListMember AddChild(DisplayListMember child) { DisplayObjectContainer formerParent = child.Parent; if (null != formerParent) { formerParent.RemoveChild(child); } // If there is an overlay, place the child underneath it. int index = base.NumberOfChildren; // Do anything that needs to be done before the child is added. // When adding a child to Component, this will set the child's // virtual parent, its nestLevel, its document, etc. // When adding a child to a Container, the override will also // invalidate the container, adjust its content/chrome partitions, // etc. AddingChild(child); // Call a low-level player method in DisplayObjectContainer which // actually attaches the child to this component. // The player dispatches an "added" event from the child just after // it is attached, so all "added" handlers execute during this call. // Component registers an addedHandler() in its constructor, // which makes it runs before any other "added" handlers except // capture-phase ones; it sets up the child's styles. QAddChildAt(child, index); // Do anything that needs to be done after the child is added // and after all "added" handlers have executed. // This is where ChildAdded(child); return(child); }