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

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

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

JToolBar.repaint介绍

暂无

代码示例

代码示例来源:origin: stanfordnlp/CoreNLP

private void buildTagPanel() {
 if (tagPanel == null) {
  tagPanel = new JToolBar(SwingConstants.VERTICAL);
  tagPanel.setFloatable(false);
  frame.getContentPane().add(tagPanel, BorderLayout.EAST);
 } else {
  tagPanel.removeAll();
 }
 if (classifier != null) {
  makeTagMaps();
  Set<String> tags = classifier.labels();
  String backgroundSymbol = classifier.backgroundSymbol();
  for (String tag : tags) {
   if (backgroundSymbol.equals(tag)) { continue; }
   Color color = tagToColorMap.get(tag);
   JButton b = new JButton(tag, new ColorIcon(color));
   tagPanel.add(b);
  }
 }
 tagPanel.revalidate();
 tagPanel.repaint();
}

代码示例来源:origin: stanfordnlp/CoreNLP

private void buildTagPanel() {
 if (tagPanel == null) {
  tagPanel = new JToolBar(SwingConstants.VERTICAL);
  tagPanel.setFloatable(false);
  frame.getContentPane().add(tagPanel, BorderLayout.EAST);
 } else {
  tagPanel.removeAll();
 }
 if (classifier != null) {
  makeTagMaps();
  Set<String> tags = classifier.labels();
  String backgroundSymbol = classifier.backgroundSymbol();
  for (String tag : tags) {
   if (backgroundSymbol.equals(tag)) { continue; }
   Color color = tagToColorMap.get(tag);
   JButton b = new JButton(tag, new ColorIcon(color));
   tagPanel.add(b);
  }
 }
 tagPanel.revalidate();
 tagPanel.repaint();
}

代码示例来源: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.netbeans.modules/org-netbeans-lib-profiler-ui

@Override
public Component add(Component component, int index) {
  Component c = toolbar.add(component, index);
  toolbar.repaint();
  return c;
}

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

@Override
public Component add(Component component) {
  Component c = toolbar.add(component);
  toolbar.repaint();
  return c;
}

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

@Override
public Component add(Action action) {
  Component c = toolbar.add(action);
  toolbar.repaint();
  return c;
}

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

@Override
public void addSpace(int width) {
  toolbar.addSeparator(new Dimension(width, 0));
  toolbar.repaint();
}

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

@Override
public void addSeparator() {
  toolbar.addSeparator();
  toolbar.repaint();
}

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

@Override
public void addFiller() {
  Dimension minDim = new Dimension(0, 0);
  Dimension maxDim = new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
  toolbar.add(new Box.Filler(minDim, minDim, maxDim));
  toolbar.repaint();
}

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

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

代码示例来源: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: net.sf.taverna.t2.ui-exts/perspective-biocatalogue

/**
 * Resets the action toolbar to the original state.
 */
public void resetTreeActionToolbar()
{
 
 tbFilterTreeToolbar.removeAll();
 tbFilterTreeToolbar.repaint();
}

代码示例来源:origin: com.jtattoo/JTattoo

protected void updateToolbarBorder() {
  toolBar.revalidate();
  toolBar.repaint();
}

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

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

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

@ScriptFunction(jsDoc = ADD_JSDOC, params = {"component"})
public void add(JComponent aComp) {
  if (aComp != null) {
    super.add(aComp);
    super.revalidate();
    super.repaint();
  }
}

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

/**
 * Recreates the toolbar buttons. Useful if a perspective has been removed.
 */
private void refreshPerspectives() {
  toolBar.removeAll();
  toolBar.repaint();
  try {
    saveAll();
    perspectiveVisibilityMap.clear();
    perspectiveVisibilityMenu.removeAll();
    initialisePerspectives();
  } catch (IOException e) {
    logger.error("Error saving perspectives whilst doing a refresh.", e);
  }
}

代码示例来源: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: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = CLEAR_JSDOC)
@Override
public void clear() {
  super.removeAll();
  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();
  }
}

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

public void removeToolBarAction(Action action) {
  if (action != null) {
    Component found = null;
    for (Component c : getToolBar().getComponents()) {
      if (c instanceof AbstractButton) {
        AbstractButton btn = (AbstractButton) c;
        if (action.equals(btn.getAction())) {
          found = c;
          break;
        }
      }
    }
    if (found != null) {
      getToolBar().remove(found);
      getToolBar().revalidate();
      getToolBar().repaint();
    }
  }
}

相关文章

JToolBar类方法