@Override public void removedFromWidgetTree() { super.removedFromWidgetTree(); if (this.m_target != null) { this.m_target.removeWatcher(this); } }
@Override public void screenTargetMoved( final ScreenTarget target, final int x, final int y, final int height) { if (this.m_useTargetPositionning) { final Point2i position = this.getComputedPosition(x, y, height); super.setPosition(position.getX(), position.getY(), false); } }
@Override public void onCheckOut() { super.onCheckOut(); this.setVisible(true); this.m_useTargetPositionning = true; this.m_align = Alignment9.NORTH; this.m_watcherContainerAdviser = new WatcherContainerAdviser(); MasterRootContainer.getInstance().addEventListener(Events.RESIZED, this, false); }
@Override public void onCheckIn() { super.onCheckIn(); AdviserManager.getInstance().removeAdviser(this.m_watcherContainerAdviser); this.m_align = null; this.m_target = null; this.m_watcherContainerAdviser = null; MasterRootContainer.getInstance().removeEventListener(Events.RESIZED, this, false); }
@Override public void validate() { super.validate(); if (this.m_target != null) { this.screenTargetMoved( null, this.m_target.getScreenX(), this.m_target.getScreenY(), this.m_target.getScreenTargetHeight()); } }
@Override public void copyElement(final BasicElement c) { super.copyElement(c); final WatcherContainer wc = (WatcherContainer) c; wc.setUseTargetPositionning(this.isUseTargetPositionning()); }
@Override public void setY(final int y) { if (!this.m_useTargetPositionning) { super.setY(y); } }
@Override public void setX(final int x) { if (!this.m_useTargetPositionning) { super.setX(x); } }
@Override public void setPosition(final Point position) { if (!this.m_useTargetPositionning) { super.setPosition(position); } }
@Override public void setPosition(final int x, final int y, final boolean b) { if (!this.m_useTargetPositionning) { super.setPosition(x, y, b); } }