@Override public void remove(JMenuItem item) { if(popupMenu != null){ popupMenu.remove(item); } }
private void removeFactory(TaskFactory factory) { JMenuItem item = popupMap.remove(factory); if (item != null) popup.remove(item); CyAction action = popupActions.remove(factory); if (action != null) popup.removePopupMenuListener(action); }
@Override public void remove(Component c) { if(popupMenu != null){ popupMenu.remove(c); } }
public void onTaskFactoryUnregistered(final TaskFactory taskFactory, final Map<?, ?> properties) { final JMenuItem menuItem = taskFactories.remove(taskFactory); if (menuItem != null) { vizMapperMainPanel.getMainMenu().remove(menuItem); vizMapperMainPanel.getEditSubMenu().remove(menuItem); if (menuItem.getAction() instanceof PopupMenuListener) { vizMapperMainPanel.getMainMenu().removePopupMenuListener((PopupMenuListener)menuItem.getAction()); vizMapperMainPanel.getContextMenu().removePopupMenuListener((PopupMenuListener)menuItem.getAction()); } } }
@Override public void removeMenuItemFromContextMenu(final JMenuItem menuItem) { jPopupMenu.remove(menuItem); }
popupMenu.remove(pos);
@Override public void remove(int pos) { if(pos < 0) { throw new IllegalArgumentException("index less than zero."); } if(pos > getItemCount()) { throw new IllegalArgumentException("index greater than the number of items."); } if(popupMenu != null){ popupMenu.remove(pos); } }
@Override public void removeComponent(final Component component) { if (componentGravity.remove(component) != null) menu.remove(menu.getComponentIndex(component)); }
/** * Remove a JMenuItem from a JPopupMenu. */ public static void removeItem(JPopupMenu popup, String name) { JMenuItem item = findItem(popup, name); if (item != null) popup.remove(item); }
protected void initPopup() { if (popupMenu == null) { popupMenu = new JPopupMenu("TabPopup"); popupMenu.add(new SelectNextTabAction()); popupMenu.add(new SelectPreviousTabAction()); popupMenu.addSeparator(); } for (int i = 3, size = popupMenu.getComponentCount(); i < size; i++) popupMenu.remove(3); for (ToolWindowTab tab : toolWindow.getToolWindowTabs()) popupMenu.add(new SelectTabAction(tab)); }
protected void enableUserDefined() { DockedTypeDescriptor descriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED); if (old != null) { popupMenu.remove(old); } JMenu menu = descriptor.getToolsMenu(); if (menu.getMenuComponentCount() > 0) { popupMenu.add(menu, 4); old = menu; } }
private void prepareNodePopupMenu(Node node) { this.nodePopup.remove(rerunItem); this.nodePopup.remove(breakPointItem); if (this.engine.getGUI().getWorkflow().getExecutionState() == WorkflowExecutionState.PAUSED && !(node instanceof InputNode)) { this.nodePopup.add(rerunItem); } if (this.engine.getGUI().getWorkflow().getExecutionState() != WorkflowExecutionState.NONE) { if (node.isBreak()) { breakPointItem.setText("Remove break Point"); } else { breakPointItem.setText("Add break Point"); } this.nodePopup.add(breakPointItem); } }
@ScriptFunction(jsDoc = REMOVE_JSDOC, params = {"component"}) @Override public void remove(JComponent aComp) { super.remove(aComp); super.revalidate(); super.repaint(); }
@Override public void remove(Component component) { if(getComponentPopupMenu()==null) { super.remove(component); } else { getComponentPopupMenu().remove(component); } }
public void remove(int index) { // can't remove the scrollbar ++index; super.remove(index); if(maximumVisibleRows >= getComponentCount()-1) { getScrollBar().setVisible(false); } }
@Override public void remove(Component component) { if(getComponentPopupMenu()==null) { super.remove(component); } else { getComponentPopupMenu().remove(component); } }
@Override public void remove(int index) { // can't remove the scrollbar ++index; super.remove(index); if (maximumVisibleRows >= getComponentCount() - 1) { getScrollBar().setVisible(false); } }
public void remove(int index) { // can't remove the scrollbar ++index; super.remove(index); if (maximumVisibleRows >= getComponentCount() - 1) { getScrollBar().setVisible(false); } }
/** * Removes an action from the list of all known actions. * @param index the location of the action */ private void remove( int index ){ DockAction action = actions.remove( index ); DropDownItemHandle item = items.remove( action ); if( item != null ){ if( item.getView().getItem() != null ){ menu.remove( item.getView().getItem() ); } item.unbind(); } }
/** * Removes all separators from the given pop up menu. * * @param popupMenu the pop up menu whose separators will be removed * @see javax.swing.JPopupMenu.Separator */ public static void removeAllSeparators(JPopupMenu popupMenu) { for (int i = 0; i < popupMenu.getComponentCount(); i++) { if (isPopupMenuSeparator(popupMenu.getComponent(i))) { popupMenu.remove(i); i--; } } }