javax.swing.JButton.setContentAreaFilled()方法的使用及代码示例

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

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

JButton.setContentAreaFilled介绍

暂无

代码示例

代码示例来源:origin: skylot/jadx

public ProgressPanel(final MainWindow mainWindow, boolean showCancelButton) {
  progressLabel = new JLabel();
  progressBar = new JProgressBar(0, 100);
  progressBar.setIndeterminate(true);
  progressBar.setStringPainted(false);
  progressLabel.setLabelFor(progressBar);
  setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
  setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
  setVisible(false);
  add(progressLabel);
  add(progressBar);
  if (showCancelButton) {
    JButton cancelButton = new JButton(ICON_CANCEL);
    cancelButton.setPreferredSize(new Dimension(ICON_CANCEL.getIconWidth(), ICON_CANCEL.getIconHeight()));
    cancelButton.setToolTipText("Cancel background jobs");
    cancelButton.setBorderPainted(false);
    cancelButton.setFocusPainted(false);
    cancelButton.setContentAreaFilled(false);
    cancelButton.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        mainWindow.cancelBackgroundJobs();
      }
    });
    add(cancelButton);
  }
}

代码示例来源:origin: skylot/jadx

button.setOpaque(false);
button.setUI(new BasicButtonUI());
button.setContentAreaFilled(false);
button.setFocusable(false);
button.setBorder(null);

代码示例来源:origin: bonnyfone/vectalign

btnMorphAnimation.setBorder(null);
btnMorphAnimation.setMargin(new Insets(0, 0, 0, 0));
btnMorphAnimation.setContentAreaFilled(false);

代码示例来源:origin: redwarp/9-Patch-Resizer

this.xhdpiButton.setSelectedIcon(this.redArrow);
this.xhdpiButton.setBorder(null);
this.xhdpiButton.setContentAreaFilled(false);
inputPanel.add(this.xhdpiButton, BorderLayout.CENTER);

代码示例来源:origin: runelite/runelite

clearButton.setBorder(null);
clearButton.setBorderPainted(false);
clearButton.setContentAreaFilled(false);
clearButton.setVisible(false);

代码示例来源:origin: ron190/jsql-injection

@Override public void mouseExited(MouseEvent e) {
  if (this.buttonFlat.isEnabled() && !this.isVisible) {
    this.buttonFlat.setContentAreaFilled(false);
    this.buttonFlat.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
  }
}

代码示例来源:origin: ron190/jsql-injection

@Override public void mouseEntered(MouseEvent e) {
  if (this.buttonFlat.isEnabled() && !this.isVisible) {
    this.buttonFlat.setContentAreaFilled(true);
    this.buttonFlat.setBorder(HelperUi.BORDER_ROUND_BLU);
  }
}

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

BufferedImage startButton = ImageIO.read(getClass().getResource("/icons/standard/buttons/start_backup.png"));
BufferedImage startButtonHover = ImageIO.read(getClass().getResource("/icons/standard/buttons/start_backup_hover.png"));
BufferedImage startButtonActive = ImageIO.read(getClass().getResource("/icons/standard/buttons/start_backup_active.png"));

JButton startBackupButton = new JButton(new ImageIcon(startButton));
startBackupButton.setRolloverIcon(new ImageIcon(startButtonHover));
startBackupButton.setPressedIcon(new ImageIcon(startButtonActive));
startBackupButton.setBorder(BorderFactory.createEmptyBorder());
startBackupButton.setContentAreaFilled(false);
startBackupButton.setFocusable(false);

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

JButton button = new JButton();
button.setBorderPainted(false);
button.setBorder(null);
//button.setFocusable(false);
button.setMargin(new Insets(0, 0, 0, 0));
button.setContentAreaFilled(false);
button.setIcon(myIcon1);
button.setRolloverIcon(myIcon2);
button.setPressedIcon(myIcon3);
button.setDisabledIcon(myIcon4);

代码示例来源:origin: org.netbeans.api/org-openide-awt

/**
 * Creates a small 'close' JButton with close icon, rollover icon and pressed icon according to Look and Feel
 *
 * @return JButton with close icons.
 */
public static JButton createCloseButton() {
  JButton closeButton = new JButton();
  int size = 16;
  closeButton.setPreferredSize(new Dimension(size, size));
  closeButton.setContentAreaFilled(false);
  closeButton.setFocusable(false);
  closeButton.setBorder(BorderFactory.createEmptyBorder());
  closeButton.setBorderPainted(false);
  closeButton.setRolloverEnabled(true);
  closeButton.setIcon(ImageUtilities.image2Icon(getCloseTabImage()));
  closeButton.setRolloverIcon(ImageUtilities.image2Icon(getCloseTabRolloverImage()));
  closeButton.setPressedIcon(ImageUtilities.image2Icon(getCloseTabPressedImage()));
  return closeButton;
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

/**
 * Creates a big 'close' JButton with close icon, rollover icon and pressed icon according to Look and Feel
 *
 * @return JButton with close icons.
 */
public static JButton createBigCloseButton() {
  JButton closeButton = new JButton();
  int size = 19;
  closeButton.setPreferredSize(new Dimension(size, size));
  closeButton.setContentAreaFilled(false);
  closeButton.setFocusable(false);
  closeButton.setBorder(BorderFactory.createEmptyBorder());
  closeButton.setBorderPainted(false);
  closeButton.setRolloverEnabled(true);
  closeButton.setIcon(ImageUtilities.image2Icon(getBigCloseTabImage()));
  closeButton.setRolloverIcon(ImageUtilities.image2Icon(getBigCloseTabRolloverImage()));
  closeButton.setPressedIcon(ImageUtilities.image2Icon(getBigCloseTabPressedImage()));
  return closeButton;
}

代码示例来源:origin: ron190/jsql-injection

buttonWebpage.setContentAreaFilled(false);
buttonWebpage.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
buttonWebpage.setBackground(new Color(200, 221, 242));
this.buttonClose.setContentAreaFilled(false);
this.buttonClose.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
this.buttonClose.setBackground(new Color(200, 221, 242));

代码示例来源:origin: org.netbeans.api/org-openide-awt

bBack.setBorder(BorderFactory.createEmptyBorder());
bBack.setBorderPainted(false);
bBack.setContentAreaFilled(false);
bBack.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/back_normal.png", true)); //NOI18N
bBack.setRolloverIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/back_hover.png", true)); //NOI18N
bForward.setBorder(BorderFactory.createEmptyBorder());
bForward.setBorderPainted(false);
bForward.setContentAreaFilled(false);
bForward.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/forward_normal.png", true)); //NOI18N
bForward.setRolloverIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/forward_hover.png", true)); //NOI18N
bReload.setBorder(BorderFactory.createEmptyBorder());
bReload.setBorderPainted(false);
bReload.setContentAreaFilled(false);
bReload.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/refresh.png", true)); //NOI18N
bReload.setRolloverIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/refresh_hover.png", true)); //NOI18N
bStop.setBorderPainted(false);
bStop.setBorder(BorderFactory.createEmptyBorder());
bStop.setContentAreaFilled(false);
bStop.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/stop.png", true)); //NOI18N
bStop.setRolloverIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/stop_hover.png", true)); //NOI18N

代码示例来源:origin: ron190/jsql-injection

+ "like TOR then your public IP is hidden and another one is used instead.</html>"
);
buttonCheckIp.setContentAreaFilled(true);
buttonCheckIp.setBorder(HelperUi.BORDER_ROUND_BLU);
labelIsCheckingUpdate.setContentAreaFilled(false);
labelIsReportingBugs.setContentAreaFilled(false);
labelIsEvading.setContentAreaFilled(false);
labelIsFollowingRedirection.setContentAreaFilled(false);
labelTestConnection.setContentAreaFilled(false);
labelParseForm.setContentAreaFilled(false);
buttonIsUsingProxy.setContentAreaFilled(false);
buttonIsUsingProxyHttps.setContentAreaFilled(false);
labelUseDigestAuthentication.setContentAreaFilled(false);
labelUseKerberos.setContentAreaFilled(false);
labelIsNotInjectingMetadata.setContentAreaFilled(false);
labelIsCheckingAllParam.setContentAreaFilled(false);

代码示例来源:origin: ron190/jsql-injection

this.buttonSend.setContentAreaFilled(false);
this.buttonSend.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
this.buttonSend.setBackground(new Color(200, 221, 242));

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

btnConcede.setContentAreaFilled(false);
btnConcede.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE));
btnConcede.setIcon(new ImageIcon(ImageManagerImpl.instance.getConcedeButtonImage()));
btnSwitchHands.setContentAreaFilled(false);
btnSwitchHands.setBorder(new EmptyBorder(0, 0, 0, 0));
btnSwitchHands.setIcon(new ImageIcon(ImageManagerImpl.instance.getSwitchHandsButtonImage()));
btnStopWatching.setContentAreaFilled(false);
btnStopWatching.setBorder(new EmptyBorder(0, 0, 0, 0));
btnStopWatching.setIcon(new ImageIcon(ImageManagerImpl.instance.getStopWatchButtonImage()));

代码示例来源:origin: cytoscape.coreplugins/manual-layout

protected JButton createJButton(Action a, String tt) {
    JButton b = new JButton(a);
    b.setToolTipText(tt);
    b.setPreferredSize(new Dimension(27, 18));
    b.setMaximumSize(new Dimension(27, 18));
    b.setBorder(BorderFactory.createEmptyBorder());
    b.setBorderPainted(false);
    b.setOpaque(false);
    b.setContentAreaFilled(false);

    return b;
  }
}

代码示例来源:origin: org.cytoscape/manual-layout-impl

protected JButton createJButton(Action a, String tt) {
    JButton b = new JButton(a);
    b.setToolTipText(tt);
    b.setPreferredSize(new Dimension(27, 18));
    b.setMaximumSize(new Dimension(27, 18));
    b.setBorder(BorderFactory.createEmptyBorder());
    b.setBorderPainted(false);
    b.setOpaque(false);
    b.setContentAreaFilled(false);

    return b;
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-beans

public @Override void mouseEntered(MouseEvent ev) {
  if (button.isEnabled()){
    button.setContentAreaFilled(true);
    button.setBorderPainted(true);
  }
}
public @Override void mouseExited(MouseEvent ev) {

代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing

private JButton getExpandButton() {
  if (expandButton == null) {
    expandButton = new JButton(new ExpandTreeAction());
    expandButton.setIcon(OpenEHRImageUtil.EXPAND_ICON);
    expandButton.setToolTipText(OpenEHRLanguageManager.getMessage("ExpandTreeD"));
    expandButton.setBackground(null);
    expandButton.setContentAreaFilled(false);
    expandButton.setBorderPainted(false);
    expandButton.setPreferredSize(new Dimension(16, 16));
  }
  return expandButton;
}

相关文章

JButton类方法