public void componentRemoved(ContainerEvent e) { JTabbedPane tp= (JTabbedPane) e.getContainer(); Component child= e.getChild(); if (child instanceof UIResource) { return; } int index= tp.indexOfComponent(child); if (htmlViews != null && htmlViews.size() >= index) { htmlViews.removeElementAt(index); } } }
public void componentRemoved(ContainerEvent e) { JTabbedPane tp = (JTabbedPane) e.getContainer(); Component child = e.getChild(); if (child instanceof UIResource) { return; } // NOTE 4/15/2002 (joutwate): // This fix is implemented using client properties since there is // currently no IndexPropertyChangeEvent. Once // IndexPropertyChangeEvents have been added this code should be // modified to use it. Integer indexObj = (Integer) tp.getClientProperty("__index_to_remove__"); if (indexObj != null) { int index = indexObj.intValue(); if (htmlViews != null && htmlViews.size() >= index) { htmlViews.remove(index); } } } }
public void componentAdded(ContainerEvent e) { Container c = (Container) e.getSource(); boolean isEditorToolbar = "editorToolbar".equals (c.getName()); installButtonUI (e.getChild(), isEditorToolbar); if (isEditorToolbar) { //It's an editor toolbar. Aqua's combo box ui paints outside //of its literal component bounds, and doesn't honor opacity. //Need to ensure the toolbar is tall enough that its border is //not hidden. Dimension min = new Dimension (32, 34); ((JComponent)e.getContainer()).setPreferredSize(min); } }
public void componentAdded(ContainerEvent e) JTabbedPane tp= (JTabbedPane) e.getContainer(); Component child= e.getChild(); if (child instanceof UIResource)
public void componentAdded(ContainerEvent e) { JTabbedPane tp = (JTabbedPane) e.getContainer(); TabbedPaneLayout layout = (TabbedPaneLayout) tp.getLayout(); layout.layoutContainer(tp); Component child = e.getChild(); if (child instanceof UIResource) { return; } int index = tp.indexOfComponent(child); String title = tp.getTitleAt(index); boolean isHTML = BasicHTML.isHTMLString(title); if (isHTML) { if (htmlViews == null) { // Initialize vector htmlViews = createHTMLViewList(); } else { // Vector already exists View v = BasicHTML.createHTMLView(tp, title); htmlViews.add(index, v); } } else { // Not HTML if (htmlViews != null) { // Add placeholder htmlViews.add(index, null); } // else nada! } }
System.out.println(" to " + e.getContainer()); System.out.println(" from " + e.getContainer()); if (child instanceof Container)
return; JideTabbedPane tp = (JideTabbedPane) e.getContainer();
protected void checkMenuBar( ContainerEvent e ) { final JMenuBar mb = (JMenuBar) e.getContainer(); if( mb.getMenuCount() == 0 ) { if( getJMenuBar() == mb ) { super.setJMenuBar( null ); } } else { if( getJMenuBar() == null ) { super.setJMenuBar( mb ); } } final JRootPane rp = getRootPane(); rp.revalidate(); rp.repaint(); } }
public void componentRemoved(final ContainerEvent _e) { final BCalque c = (BCalque) _e.getChild(); if (mustListen_) { if (c.isGroupeCalque()) { removeGroupeCalque((BGroupeCalque) c); } else { c.removePropertyChangeListener(this); } } final BCalque parent = (BCalque) _e.getContainer(); if (parent != null) { /* final Integer integer = ((Integer) c.getClientProperty("oldIndice")); if (integer == null) { */ refresh(); /* } else { fireTreeModelEventRemoved(new TreeModelEvent(this, new TreePath(getPath(parent)), new int[] { integer .intValue() }, new Object[] { c })); } */ setSelectionCalque(parent); } fireObservableChanged("removed"); }
return; JideTabbedPane tp = (JideTabbedPane) e.getContainer();