javax.swing.JToggleButton.setFocusPainted()方法的使用及代码示例

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

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

JToggleButton.setFocusPainted介绍

暂无

代码示例

代码示例来源:origin: org.codehaus.groovy/groovy

tokenButton.putClientProperty("token", token);
tokenButton.setMargin(new Insets(0, 1, 0, 1));
tokenButton.setFocusPainted(false);
if (token.getLine() > line) {
  tokenPane.getDocument().insertString(tokenPane.getDocument().getLength(), "\n", null);

代码示例来源:origin: 4thline/cling

toggleButton.setFocusPainted(false);
toggleButton.setPreferredSize(new Dimension(128, 128));

代码示例来源:origin: magefree/mage

btnStateWaiting.setToolTipText("Shows all tables waiting for players.");
btnStateWaiting.setActionCommand("stateWait");
btnStateWaiting.setFocusPainted(false);
btnStateWaiting.setFocusable(false);
btnStateWaiting.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnStateActive.setToolTipText("Shows all tables with active matches.");
btnStateActive.setActionCommand("stateActive");
btnStateActive.setFocusPainted(false);
btnStateActive.setFocusable(false);
btnStateActive.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnStateFinished.setToolTipText("<HTML>Toggles the visibility of the table of completed <br>matches and tournaments in the lower area.\n<br>Showing the last 50 finished matches.");
btnStateFinished.setActionCommand("stateFinished");
btnStateFinished.setFocusPainted(false);
btnStateFinished.setFocusable(false);
btnStateFinished.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnTypeMatch.setToolTipText("Shows all non tournament tables.");
btnTypeMatch.setActionCommand("typeMatch");
btnTypeMatch.setFocusPainted(false);
btnTypeMatch.setFocusable(false);
btnTypeMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnTypeTourneyConstructed.setToolTipText("Shows all constructed tournament tables.");
btnTypeTourneyConstructed.setActionCommand("typeTourneyConstructed");
btnTypeTourneyConstructed.setFocusPainted(false);
btnTypeTourneyConstructed.setFocusable(false);
btnTypeTourneyConstructed.setRequestFocusEnabled(false);

代码示例来源:origin: stackoverflow.com

ImageIcon selectedIcon = new ImageIcon("Image.png");
Image image = selectedIcon.getImage();
PlaceHolderIcon placeHolderIcon = new PlaceHolderIcon(image.getWidth(this), image.getHeight(this));
JToggleButton layoutButton = new JToggleButton();
layoutButton.setIcon(placeHolderIcon);
layoutButton.setFocusPainted(false);
layoutButton.setSelectedIcon(selectedIcon);

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createButton() {
  $objectMap.put("button", button = new JToggleButton());
  
  button.setName("button");
  button.setFocusPainted(false);
  button.setFocusable(true);
  button.addItemListener(JAXXUtil.getEventListener(ItemListener.class, "itemStateChanged", this, "doItemStateChanged__on__button"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget

protected void createButton() {
  button = new javax.swing.JToggleButton();
  $objectMap.put("button", button);
  button.setName("button");
  button.setFocusPainted(false);
  button.setFocusable(true);
  button.addItemListener((java.awt.event.ItemListener) jaxx.runtime.Util.getEventListener(java.awt.event.ItemListener.class, "itemStateChanged", content, "doItemStateChanged__on__button"));
}

代码示例来源:origin: org.icepdf.os/icepdf-viewer

protected JToggleButton makeToolbarToggleButton(
    String title, String toolTip, java.awt.Font font) {
  JToggleButton tmp = new JToggleButton(showButtonText ? title : "");
  tmp.setFont(font);
  tmp.setToolTipText(toolTip);
  tmp.setPreferredSize(new Dimension(30, 30));
  tmp.setText(title);
  tmp.setFocusPainted(true);
  return tmp;
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets-i18n

protected void createButton() {
  $objectMap.put("button", button = new JToggleButton());
  
  button.setName("button");
  button.setFocusPainted(false);
  button.setFocusable(true);
  button.addItemListener(JAXXUtil.getEventListener(ItemListener.class, "itemStateChanged", this, "doItemStateChanged__on__button"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createChangeDecorator() {
  $objectMap.put("changeDecorator", changeDecorator = new JToggleButton());
  
  changeDecorator.setName("changeDecorator");
  changeDecorator.setFocusable(false);
  changeDecorator.setToolTipText(t("beancombobox.action.sort.tip"));
  changeDecorator.setFocusPainted(false);
  changeDecorator.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__changeDecorator"));
}

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-number

protected void createShowPopUpButton() {
  $objectMap.put("showPopUpButton", showPopUpButton = new JToggleButton());
  
  showPopUpButton.setName("showPopUpButton");
  showPopUpButton.setFocusable(false);
  showPopUpButton.setToolTipText(t("numbereditor.action.show.tip"));
  showPopUpButton.setFocusPainted(false);
  showPopUpButton.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__showPopUpButton"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget

protected void createChangeDecorator() {
  changeDecorator = new javax.swing.JToggleButton();
  $objectMap.put("changeDecorator", changeDecorator);
  changeDecorator.setName("changeDecorator");
  changeDecorator.setFocusPainted(false);
  changeDecorator.setFocusable(false);
  changeDecorator.setToolTipText(_("entitycombobox.action.sort.tip"));
  changeDecorator.addActionListener((java.awt.event.ActionListener) jaxx.runtime.Util.getEventListener(java.awt.event.ActionListener.class, "actionPerformed", $Table0, "doActionPerformed__on__changeDecorator"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createChangeDecorator() {
  $objectMap.put("changeDecorator", changeDecorator = new JToggleButton());
  
  changeDecorator.setName("changeDecorator");
  changeDecorator.setFocusable(false);
  changeDecorator.setToolTipText(t("beanlist.action.sort.tip"));
  changeDecorator.setFocusPainted(false);
  changeDecorator.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__changeDecorator"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createShowPopUpButton() {
  $objectMap.put("showPopUpButton", showPopUpButton = new JToggleButton());
  
  showPopUpButton.setName("showPopUpButton");
  showPopUpButton.setFocusPainted(false);
  showPopUpButton.setFocusable(false);
  showPopUpButton.setToolTipText(t("numbereditor.action.show.tip"));
  showPopUpButton.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__showPopUpButton"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget

protected void createButton() {
  button = new javax.swing.JToggleButton();
  $objectMap.put("button", button);
  button.setName("button");
  button.setFocusPainted(false);
  button.setFocusable(false);
  button.setToolTipText(_("numbereditor.action.show.tip"));
  button.addActionListener((java.awt.event.ActionListener) jaxx.runtime.Util.getEventListener(java.awt.event.ActionListener.class, "actionPerformed", $JPanel0, "doActionPerformed__on__button"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createChangeDecorator() {
  $objectMap.put("changeDecorator", changeDecorator = new JToggleButton());
  
  changeDecorator.setName("changeDecorator");
  changeDecorator.setFocusable(false);
  changeDecorator.setToolTipText(t("beandoublelist.action.sort.tip"));
  changeDecorator.setFocusPainted(false);
  changeDecorator.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__changeDecorator"));
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

protected void createChangeDecorator() {
  $objectMap.put("changeDecorator", changeDecorator = new JToggleButton());
  
  changeDecorator.setName("changeDecorator");
  changeDecorator.setFocusable(false);
  changeDecorator.setToolTipText(t("beancombobox.action.sort.tip"));
  changeDecorator.setFocusPainted(false);
  changeDecorator.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__changeDecorator"));
}

代码示例来源:origin: RPTools/maptool

public JToggleButton getScrollLockButton() {
  if (scrollLockButton == null) {
    scrollLockButton = new JToggleButton();
    scrollLockButton.setIcon(new ImageIcon(AppStyle.chatScrollImage));
    scrollLockButton.setSelectedIcon(new ImageIcon(AppStyle.chatScrollLockImage));
    scrollLockButton.setToolTipText("Scroll lock");
    scrollLockButton.setUI(new BasicToggleButtonUI());
    scrollLockButton.setBorderPainted(false);
    scrollLockButton.setFocusPainted(false);
    scrollLockButton.setPreferredSize(new Dimension(16, 16));
  }
  return scrollLockButton;
}

代码示例来源:origin: raydac/netbeans-mmd-plugin

@Nonnull
 private JToggleButton makeIconButton(@Nonnull final ButtonGroup group, @Nonnull final String name) {
  final JToggleButton result = Utils.UI_COMPO_FACTORY.makeToggleButton();

  final Color panelColor = this.getBackground();

  result.setUI(new MetalToggleButtonUI() {
   @Override
   @Nullable
   protected Color getSelectColor() {
    return panelColor.brighter();
   }
  });

  result.setBackground(panelColor.darker());

  result.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(), BorderFactory.createEmptyBorder(3, 3, 3, 3)));
  result.setIcon(new ImageIcon(MiscIcons.findForName(name)));
  result.setName(name);
  result.setFocusPainted(false);
  result.setToolTipText(name);

  group.add(result);
  return result;
 }
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget

protected void createButton() {
  button = new javax.swing.JToggleButton();
  $objectMap.put("button", button);
  button.setName("button");
  button.setBorderPainted(false);
  button.setFocusPainted(false);
  button.setFocusable(true);
  button.setRolloverEnabled(false);
  button.setToolTipText(_("columnselector.action.tip"));
  button.addItemListener((java.awt.event.ItemListener) jaxx.runtime.Util.getEventListener(java.awt.event.ItemListener.class, "itemStateChanged", $JPanel0, "doItemStateChanged__on__button"));
}

代码示例来源:origin: org.icepdf.os/icepdf-viewer

protected JToggleButton makeToolbarToggleButton(
    String title, String toolTip, String imageName,
    int imageWidth, int imageHeight, java.awt.Font font) {
  JToggleButton tmp = new JToggleButton(showButtonText ? title : "");
  tmp.setFont(font);
  tmp.setToolTipText(toolTip);
  tmp.setRolloverEnabled(false);
  tmp.setPreferredSize(new Dimension(imageWidth, imageHeight));
  try {
    tmp.setIcon(new ImageIcon(Images.get(imageName + "_d.png")));
    tmp.setPressedIcon(new ImageIcon(Images.get(imageName + "_d.png")));
    tmp.setSelectedIcon(new ImageIcon(Images.get(imageName + "_n.png")));
    tmp.setDisabledIcon(new ImageIcon(Images.get(imageName + "_n.png")));
  } catch (NullPointerException e) {
    logger.warning("Failed to load toobar toggle button images: " + imageName + ".png");
  }
  tmp.setBorderPainted(false);
  tmp.setBorder(BorderFactory.createEmptyBorder());
  tmp.setContentAreaFilled(false);
  tmp.setFocusPainted(false);
  return tmp;
}

相关文章

JToggleButton类方法