/** * removes a specific menu item component. */ public void remove(SComponent comp) { menuItems.remove(comp); comp.setParentFrame(null); comp.putClientProperty("drm:realParentComponent", "drm:null"); }
@Override protected void setParentFrame(SFrame f) { super.setParentFrame(f); if (cellRendererPane != null) { cellRendererPane.setParentFrame(f); } }
/** * Sets the frame in which this component resides. * * @param f the frame in which this component resides. */ @Override protected void setParentFrame(SFrame f) { super.setParentFrame(f); if (cellRendererPane != null) { cellRendererPane.setParentFrame(f); } }
@Override protected void setParentFrame(SFrame f) { super.setParentFrame(f); if (cellRendererPane != null) { cellRendererPane.setParentFrame(f); } }
@Override protected void setParentFrame(SFrame f) { super.setParentFrame(f); editor.setParentFrame(f); }
/** * Add a menu item to this menu. */ public void add(SComponent menuItem) { menuItems.add(menuItem); menuItem.setParentFrame(getParentFrame()); menuItem.putClientProperty("drm:realParentComponent", this); }
/** * removes a specific menu item component. */ public void remove(SComponent comp) { if (menuItems.remove(comp)) { reload(); } comp.setParentFrame(null); comp.putClientProperty("drm:realParentComponent", "drm:null"); }
/** * Sets the parent container. Also gets the parent frame from the parent. * * @param parent the container */ public void setParent(SContainer parent) { SContainer oldVal = this.parent; this.parent = parent; if (parent != null) setParentFrame(parent.getParentFrame()); else setParentFrame(null); propertyChangeSupport.firePropertyChange("parent", oldVal, this.parent); setRecursivelyVisible(parent != null && parent.isRecursivelyVisible()); }
/** * Sets the parent frame. * * @param f parent frame */ @Override protected void setParentFrame(SFrame f) { if (f != super.getParentFrame()) { super.setParentFrame(f); for (int i = 0; i < getComponentCount(); i++) { getComponent(i).setParentFrame(getParentFrame()); } } }
/** * Add a menu item to this menu. */ public void add(SComponent menuItem) { menuItems.add(menuItem); menuItem.setParentFrame(getParentFrame()); menuItem.putClientProperty("drm:realParentComponent", this); reload(); }
@Override public void setParentFrame(SFrame f) { if (getParentFrame() == null && f != null) { reload(); } if (f != null || (f == null && !getSession().getMenuManager().isMenuLinked(this))) { super.setParentFrame(f); for (Object menuItem : menuItems) { ((SComponent) menuItem).setParentFrame(f); } } }
@Override protected void setParentFrame(SFrame f) { super.setParentFrame(f); if (getCellRendererPane() != null) getCellRendererPane().setParentFrame(f); }
@Override public void setParentFrame(SFrame f) { if (getParentFrame() == null && f != null) { reload(); } if (f != null || (f == null && !getSession().getMenuManager().isMenuLinked(this))) { super.setParentFrame(f); for (Object menuItem : menuItems) { ((SComponent) menuItem).setParentFrame(f); } } }