javax.swing.JCheckBox.setRolloverIcon()方法的使用及代码示例

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

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

JCheckBox.setRolloverIcon介绍

暂无

代码示例

代码示例来源:origin: lbalazscs/Pixelitor

private void initVisibilityControl(Layer layer) {
  visibilityCB = new JCheckBox(CLOSED_EYE_ICON);
  visibilityCB.setRolloverIcon(CLOSED_EYE_ICON);
  visibilityCB.setSelected(true);
  visibilityCB.setToolTipText("<html><b>Click</b> to hide/show this layer.");
  visibilityCB.setSelectedIcon(OPEN_EYE_ICON);
  add(visibilityCB, LayerButtonLayout.CHECKBOX);
  visibilityCB.addItemListener(e ->
      layer.setVisible(visibilityCB.isSelected(), true));
}

代码示例来源:origin: MrCrayfish/ModelCreator

public static JCheckBox createCheckBox(String text, String tooltip, boolean selected)
{
  JCheckBox checkBox = new JCheckBox(text);
  checkBox.setToolTipText(tooltip);
  checkBox.setSelected(selected);
  checkBox.setIcon(Icons.light_off);
  checkBox.setRolloverIcon(Icons.light_off);
  checkBox.setSelectedIcon(Icons.light_on);
  checkBox.setRolloverSelectedIcon(Icons.light_on);
  return checkBox;
}

代码示例来源:origin: MrCrayfish/ModelCreator

checkBoxEnabled.setSelected(entry.isEnabled());
checkBoxEnabled.setIcon(Icons.light_off);
checkBoxEnabled.setRolloverIcon(Icons.light_off);
checkBoxEnabled.setSelectedIcon(Icons.light_on);
checkBoxEnabled.setRolloverSelectedIcon(Icons.light_on);

相关文章

JCheckBox类方法