本文整理了Java中javax.swing.JButton.setSelected()
方法的一些代码示例,展示了JButton.setSelected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JButton.setSelected()
方法的具体详情如下:
包路径:javax.swing.JButton
类名称:JButton
方法名:setSelected
暂无
代码示例来源:origin: runelite/runelite
currentButton.setSelected(sidebarOpen);
代码示例来源:origin: runelite/runelite
currentButton.setSelected(false);
currentNavButton.setSelected(false);
currentButton = null;
currentButton.setSelected(false);
currentButton.setSelected(true);
currentNavButton.setSelected(true);
expand(navButton);
代码示例来源:origin: cytoscape/application
public void mouseReleased(MouseEvent e) {
zoomInButton.setSelected(false);
}
});
代码示例来源:origin: cytoscape/application
public void mouseReleased(MouseEvent e) {
zoomOutButton.setSelected(false);
}
});
代码示例来源:origin: cytoscape/application
public void mousePressed(MouseEvent e) {
zoomInButton.setSelected(true);
}
代码示例来源:origin: cytoscape/application
public void mousePressed(MouseEvent e) {
zoomOutButton.setSelected(true);
}
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
private void setConditionsChanged(boolean b) {
if (applyButton != null) {
warningText.setVisible(b);
applyButton.setSelected(b);
applyButton.setEnabled(b);
}
}
代码示例来源:origin: nu.zoom/svansprogram
private void stopTailer() {
tailControl.setSelected(false);
tailer.stop();
}
}
代码示例来源:origin: triplea-game/triplea
/**
* Constructs a Swing JButton using current builder values.
* Values that must be set: title, actionlistener
*/
public JButton build() {
checkNotNull(title);
final JButton button = new JButton(title);
Optional.ofNullable(clickAction)
.ifPresent(listener -> button.addActionListener(e -> clickAction.accept(button)));
Optional.ofNullable(toolTip).ifPresent(button::setToolTipText);
button.setSelected(selected);
if (biggerFont > 0) {
button.setFont(
new Font(
button.getFont().getName(),
button.getFont().getStyle(),
button.getFont().getSize() + biggerFont));
}
return button;
}
代码示例来源:origin: locationtech/jts
private static JButton createButton(String toolTipText,
ImageIcon icon,
java.awt.event.ActionListener actionListener)
{
JButton btn = new JButton();
btn.setMargin(new Insets(0, 0, 0, 0));
btn.setPreferredSize(new Dimension(30, 30));
btn.setIcon(icon);
btn.setMinimumSize(new Dimension(30, 30));
btn.setVerticalTextPosition(SwingConstants.BOTTOM);
btn.setSelected(false);
btn.setToolTipText(toolTipText);
btn.setHorizontalTextPosition(SwingConstants.CENTER);
btn.setFont(new java.awt.Font("SansSerif", 0, 10));
btn.setMaximumSize(new Dimension(30, 30));
btn.addActionListener(actionListener);
btn.setFocusable(false);
btn.setFocusPainted(false);
return btn;
}
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
public void setSelected(boolean selected) {
super.setSelected(selected);
if (selected) {
setBackground(MENU_HIGHLIGHT_BG_COLOR);
setForeground(MENU_HIGHLIGHT_FG_COLOR);
} else {
setMenuItemDefaultColors();
}
}
代码示例来源:origin: apache/batik
public void setSelected(boolean selected) {
super.setSelected(selected);
if (selected) {
setBackground(MENU_HIGHLIGHT_BG_COLOR);
setForeground(MENU_HIGHLIGHT_FG_COLOR);
} else {
setMenuItemDefaultColors();
}
}
代码示例来源:origin: cytoscape/application
floatButton.setBorder(new EmptyBorder(1, 1, 1, 1));
floatButton.setBorderPainted(false);
floatButton.setSelected(false);
floatButton.setBackground(FLOAT_PANEL_COLOR);
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
importButton.setSelected(!this.filesToImport.isEmpty());
if (filesToImport.isEmpty()) {
importButton.setText("Import");
代码示例来源:origin: org.cytoscape/swing-application-impl
styleButton(floatButton);
floatButton.setFont(iconManager.getIconFont(12));
floatButton.setSelected(true);
styleButton(closeButton);
closeButton.setFont(iconManager.getIconFont(13));
closeButton.setSelected(true);
代码示例来源:origin: org.boofcv/demonstrations
public void setConfiguration(ConfigThreshold configuration) {
comboType.removeActionListener(this);
spinnerScale.removeChangeListener(this);
buttonUpDown.removeActionListener(this);
checkOtsu2.removeActionListener(this);
comboType.setSelectedIndex(configuration.type.ordinal());
controlWidth.setValue(configuration.width);
spinnerScale.setValue(configuration.scale);
buttonUpDown.setSelected(configuration.down);
type = configuration.type;
regionWidth = configuration.width.copy();
scale = configuration.scale;
down = configuration.down;
if( type == ThresholdType.FIXED ) {
fixedThreshold = (int)configuration.fixedThreshold;
} else if( type == ThresholdType.BLOCK_MIN_MAX) {
minimumSpread = ((ConfigThresholdBlockMinMax)configuration).minimumSpread;
} else if( type == ThresholdType.BLOCK_OTSU ||
type == ThresholdType.LOCAL_OTSU ) {
otsuTuning = (int)((ConfigThresholdLocalOtsu)configuration).tuning;
useOtsu2 = ((ConfigThresholdLocalOtsu)configuration).useOtsu2;
}
comboType.addActionListener(this);
spinnerScale.addChangeListener(this);
buttonUpDown.addActionListener(this);
checkOtsu2.addActionListener(this);
updateThresholdValue();
}
代码示例来源:origin: FellowTraveler/otapij
todayButton.setPreferredSize(buttonSize);
todayButton.setDefaultCapable(true);
todayButton.setSelected(true);
todayButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent evt) {
代码示例来源:origin: igvteam/igv
roiButton.setSelected(false);
代码示例来源:origin: Waikato/weka-trunk
m_beanLayout.repaint();
m_pointerB.setSelected(true);
m_mode = NONE;
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
m_beanLayout.repaint();
m_pointerB.setSelected(true);
m_mode = NONE;
内容来源于网络,如有侵权,请联系作者删除!