本文整理了Java中javax.swing.JCheckBox.getIcon()
方法的一些代码示例,展示了JCheckBox.getIcon()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.getIcon()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:getIcon
暂无
代码示例来源:origin: org.codehaus.izpack/izpack-panel
checkbox.setIcon(normalCheckBox.getIcon());
代码示例来源:origin: gurkenlabs/litiengine
@Override
public Component getListCellRendererComponent(JList<? extends JCheckBox> list, JCheckBox value, int index, boolean isSelected, boolean cellHasFocus) {
if(!this.panels.containsKey(value)) {
this.panels.put(value, new CheckBoxPanel(value.getText()));
}
CheckBoxPanel panel = this.panels.get(value);
panel.getCheck().setSelected(value.isSelected());
// Drawing checkbox, change the appearance here
panel.getCheck().setBackground(isSelected ? getSelectionBackground() : getBackground());
panel.getCheck().setForeground(isSelected ? getSelectionForeground() : getForeground());
panel.getCheck().setEnabled(isEnabled());
panel.getCheck().setFont(getFont());
panel.getCheck().setFocusPainted(false);
panel.getCheck().setBorderPainted(true);
panel.getCheck().setBorder(isSelected ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
panel.getLabel().setOpaque(true);
panel.getLabel().setBackground(isSelected ? getSelectionBackground() : getBackground());
panel.getLabel().setForeground(isSelected ? getSelectionForeground() : getForeground());
panel.getLabel().setEnabled(isEnabled());
panel.getLabel().setFocusable(false);
panel.getLabel().setFont(getFont());
panel.getLabel().setBorder(isSelected ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
panel.getLabel().setIcon(value.getIcon());
return panel;
}
代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing
leafRenderer.setDisabledSelectedIcon(icon);
leafRenderer.setDisabledIcon(leafRenderer.getIcon());
leafRenderer.setSelected(node.isSelected());
内容来源于网络,如有侵权,请联系作者删除!