本文整理了Java中javax.swing.JCheckBox.setBorderPainted()
方法的一些代码示例,展示了JCheckBox.setBorderPainted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.setBorderPainted()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:setBorderPainted
暂无
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime
public BooleanCellRenderer(TableCellRenderer delegate, JCheckBox checkBox, Predicate<?> predicate) {
this.defaultDelegate = delegate;
this.predicate = predicate;
this.checkBox = checkBox;
this.checkBox.setBorderPainted(true);
this.checkBox.setHorizontalAlignment(JLabel.CENTER);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime
public BooleanCellRenderer(TableCellRenderer delegate, JCheckBox checkBox, Predicate<?> predicate) {
this.defaultDelegate = delegate;
this.predicate = predicate;
this.checkBox = checkBox;
this.checkBox.setBorderPainted(true);
this.checkBox.setHorizontalAlignment(JLabel.CENTER);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing
public BooleanCellRenderer(TableCellRenderer delegate) {
//super(new BorderLayout());
this.checkBox = new JCheckBox();
add(checkBox, BorderLayout.CENTER);
checkBox.setHorizontalAlignment(JLabel.CENTER);
checkBox.setBorderPainted(true);
this.defaultDelegate = delegate;
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
JComponent rendered = (JComponent) rendererDelegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (rendered instanceof JCheckBox) {
JCheckBox checkBox = (JCheckBox)rendered;
checkBox.setHorizontalAlignment(JLabel.CENTER);
checkBox.setVerticalTextPosition(JLabel.TOP);
checkBox.setBorderPainted(true);
checkBox.setIcon(icon);
}
return rendered;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject
private CheckBoxTableCellEditor() {
super(new JCheckBox());
((JCheckBox)getEditorComponent()).setHorizontalAlignment(JLabel.CENTER);
((JCheckBox)getEditorComponent()).setBorderPainted(true);
}
代码示例来源:origin: gurkenlabs/litiengine
public CheckBoxPanel(String text) {
this.newCheck = new JCheckBox();
this.newLabel = new JLabel(text);
this.newCheck.setFocusPainted(false);
this.newCheck.setBorderPainted(true);
this.newLabel.setOpaque(true);
this.newLabel.setFocusable(false);
this.setLayout(new BorderLayout());
this.add(newCheck, BorderLayout.WEST);
this.add(newLabel, BorderLayout.CENTER);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing
public BooleanCellRenderer(TableCellRenderer delegate, Icon icon) {
//super(new BorderLayout());
this.checkBox = new JCheckBox(icon);
add(checkBox, BorderLayout.NORTH);
checkBox.setHorizontalAlignment(JLabel.CENTER);
checkBox.setVerticalTextPosition(JLabel.TOP);
checkBox.setBorderPainted(true);
this.defaultDelegate = delegate;
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
JComponent rendered = (JComponent) rendererDelegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (rendered instanceof JCheckBox) {
JCheckBox checkBox = (JCheckBox) rendered;
checkBox.setHorizontalAlignment(JLabel.CENTER);
checkBox.setVerticalTextPosition(JLabel.TOP);
checkBox.setBorderPainted(true);
checkBox.setIcon(icon);
}
return rendered;
}
代码示例来源:origin: omegat-org/omegat
MultilineCellRenderer() {
// textArea.setLineWrap(true);
// textArea.setWrapStyleWord(true);
textArea.setOpaque(true);
checkBox.setHorizontalAlignment(JLabel.CENTER);
checkBox.setBorderPainted(true);
SimpleAttributeSet sas = new SimpleAttributeSet();
StyleConstants.setBackground(sas, Styles.EditorColor.COLOR_ALIGNER_HIGHLIGHT.getColor());
highlight = sas;
}
代码示例来源:origin: locationtech/jts
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
Layer lyr = (Layer) value;
checkbox.setBackground(isSelected ? getSelectionBackground()
: getBackground());
checkbox.setForeground(isSelected ? getSelectionForeground()
: getForeground());
checkbox.setSelected(lyr.isEnabled());
checkbox.setEnabled(isEnabled());
checkbox.setFont(getFont());
checkbox.setFocusPainted(false);
checkbox.setBorderPainted(true);
checkbox.setBorder(isSelected ? UIManager
.getBorder("List.focusCellHighlightBorder") : noFocusBorder);
checkbox.setText(lyr.getNameInfo());
return checkbox;
}
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JCheckBox checkbox = (JCheckBox) value;
checkbox.setBackground(isSelected ? getSelectionBackground() : getBackground());
checkbox.setForeground(isSelected ? getSelectionForeground() : getForeground());
checkbox.setEnabled(isEnabled());
checkbox.setFont(getFont());
checkbox.setFocusPainted(false);
checkbox.setBorderPainted(false);
return checkbox;
}
}
代码示例来源: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: Spoutcraft/LegacyLauncher
remember.setFont(minecraft);
remember.setOpaque(false);
remember.setBorderPainted(false);
remember.setContentAreaFilled(false);
remember.setBorder(null);
内容来源于网络,如有侵权,请联系作者删除!