javax.swing.JToolBar.remove()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中javax.swing.JToolBar.remove()方法的一些代码示例,展示了JToolBar.remove()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToolBar.remove()方法的具体详情如下:
包路径:javax.swing.JToolBar
类名称:JToolBar
方法名:remove

JToolBar.remove介绍

暂无

代码示例

代码示例来源:origin: jshiell/checkstyle-idea

private void clearProgress() {
  final int progressIndex = progressPanel.getComponentIndex(progressBar);
  if (progressIndex != -1) {
    progressPanel.remove(progressIndex);
    progressPanel.revalidate();
    progressPanel.repaint();
  }
  setProgressText(null);
}

代码示例来源:origin: org.zaproxy/zap

private void disableComponent(HttpPanelComponentInterface component) {
  toolBarComponents.remove(component.getButton());
  enabledComponents.remove(component);
  if (enabledComponents.size() == 0) {
    toolBarComponents.removeAll();
  }
}

代码示例来源:origin: hneemann/Digital

private void removeWrapperFromToolBar(WrapperAction wrapper) {
  final int position = wrapper.componentPosition;
  bar.remove(position);
  for (WrapperAction w : wrappers)
    if (w.componentPosition > position)
      w.componentPosition--;
}

代码示例来源:origin: org.boofcv/visualize

public void removeFromToolbar( JComponent comp ) {
  toolbar.remove(comp);
  toolbar.revalidate();
  addedComponents.remove(comp);
}

代码示例来源:origin: org.boofcv/boofcv-swing

public void removeFromToolbar( JComponent comp ) {
  toolbar.remove(comp);
  toolbar.revalidate();
  addedComponents.remove(comp);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

@Override
public void remove(int index) {
  toolbar.remove(index);
  toolbar.repaint();
}

代码示例来源:origin: net.sf.taverna.t2.ui-impl/workbench-impl

public void removeCustomPerspective(CustomPerspective perspective) {
  customPerspectives.remove(perspective);
  JToggleButton button = perspectives.remove(perspective);
  toolBar.remove(button);
  // remove from menu to toggle visibility
  JMenu menu = perspectiveVisibilityMap.get(perspective);
  if (menu != null) {
    perspectiveVisibilityMenu.remove(menu);
  }
}

代码示例来源:origin: UNIVALI-LITE/Portugol-Studio

@Override
public void desinstalarAcaoPlugin(Plugin plugin, final Action acao) {
  SwingUtilities.invokeLater(() -> {
    WebButton botaoAcao = (WebButton) mapaBotoesAcoesPlugins.get(acao);
    botoesPlugin.remove(botaoAcao);
    botoesPlugin.repaint();
    mapaBotoesAcoesPlugins.remove(acao, botaoAcao);
  });
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

@Override
public void remove(Component component) {
  toolbar.remove(component);
  toolbar.repaint();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers

public void addSaveViewAction(AbstractAction saveViewAction) {
  JButton actionButton = buttonsToolBar.add(saveViewAction);
  buttonsToolBar.remove(actionButton);
  buttonsToolBar.add(actionButton, 0);
  buttonsToolBar.add(new JToolBar.Separator(), 1);
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-workbench

public void removeCustomPerspective(CustomPerspective perspective) {
  customPerspectives.remove(perspective);
  JToggleButton button = perspectives.remove(perspective);
  toolBar.remove(button);
  // remove from menu to toggle visibility
  JMenu menu = perspectiveVisibilityMap.get(perspective);
  if (menu != null) {
    perspectiveVisibilityMenu.remove(menu);
  }
}

代码示例来源:origin: org.gephi/desktop-datalab

private void clearGeneralActionsButtons() {
  for (JComponent b : generalActionsButtons) {
    controlToolbar.remove(b);
  }
  generalActionsButtons.clear();
  controlToolbar.updateUI();
}

代码示例来源:origin: Audiveris/audiveris

/**
 * Remove any potential orphan separator at the end of the tool bar
 *
 * @param toolBar the toolBar to purge
 */
public static void purgeSeparator (JToolBar toolBar)
{
  int count = toolBar.getComponentCount();
  if (toolBar.getComponent(count - 1) instanceof JSeparator) {
    toolBar.remove(count - 1);
  }
}

代码示例来源:origin: org.zaproxy/zap

/**
 * Removes the given component to the tool bar.
 * 
 * @param component the component to remove.
 * @throws IllegalArgumentException if the component is {@code null}.
 * @since 2.6.0
 */
public void removeToolBarComponent(Component component) {
  validateComponentNonNull(component);
  getToolbar().remove(component);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

@Override
 public void mouseClicked(MouseEvent e) {
  super.mouseClicked(e);
  m_browserTools.remove(m_newPackagesAvailableL);
  m_browserTools.revalidate();
 }
});

代码示例来源:origin: vasl-developers/vasl

@Override
public void addTo(Buildable b) 
{
  map = (Map) b;
  // does the original addto
  super.addTo(b);
  // removes immediately the button from the toolbar
  map.getToolBar().remove(launch);
  // adds the menuitem to the ASLMap popup menu
  ((ASLMap)map).getPopupMenu().add(m_MenuItem);
}

代码示例来源:origin: vasl-developers/vasl

@Override
 public void addTo(Buildable b) 
 {
   map = (Map) b;
   // does the original addto
   super.addTo(b);
   // removes immediately the button from the toolbar
   map.getToolBar().remove(launch);     
   // adds the menuitem to the ASLMap popup menu
   ((ASLMap)map).getPopupMenu().add(m_MenuItem);
 }
}

代码示例来源:origin: vasl-developers/vasl

@Override
 public void addTo(Buildable b) 
 {
   map = (Map) b;
   // does the original addto
   super.addTo(b);
   // removes immediately the button from the toolbar
   map.getToolBar().remove(launch);
   // adds the menuitem to the ASLMap popup menu
   ((ASLMap)map).getPopupMenu().add(m_MenuItem);
 }
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = REMOVE_JSDOC, params = {"component"})
@Override
public void remove(JComponent aComp) {
  super.remove(aComp);
  super.revalidate();
  super.repaint();
}

代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public void removeToolBarComponent(Component c) {
  if (c != null) {
    getToolBar().remove(c);
    getToolBar().revalidate();
    getToolBar().repaint();
  }
}

相关文章

JToolBar类方法