本文整理了Java中javax.swing.JCheckBox.setBorder()
方法的一些代码示例,展示了JCheckBox.setBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.setBorder()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:setBorder
暂无
代码示例来源:origin: wiztools/rest-client
@PostConstruct
protected void init() {
JPanel jp_etc = new JPanel(new GridLayout(3, 1));
{ // Http Version
JPanel jp = new JPanel(new FlowLayout(FlowLayout.LEFT));
jp.add(new JLabel("Version: "));
jp.add(jcb_http_version);
jp.add(jcb_cookie_version);
jp_etc.add(jp);
}
{ // Follow Redirect
JPanel jp = new JPanel(new FlowLayout(FlowLayout.LEFT));
// Previous version of RESTClient had follow redirects as true.
// To maintain backward compatibility in default behavior:
jcb_followRedirects.setSelected(true);
jcb_followRedirects.setBorder(null);
jp.add(jcb_followRedirects);
jp_etc.add(jp);
}
{ // Ignore response body
JPanel jp = new JPanel(new FlowLayout(FlowLayout.LEFT));
jcb_ignoreResponseBody.setBorder(null);
jp.add(jcb_ignoreResponseBody);
jp_etc.add(jp);
}
setLayout(new FlowLayout(FlowLayout.LEFT));
add(jp_etc);
}
代码示例来源:origin: deathmarine/Luyten
this.getRootPane().getActionMap().put("FindPrevious", new FindExploreAction(false));
mcase.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
regex.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
wholew.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
reverse.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
wrap.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
代码示例来源:origin: marytts/marytts
cbSelected.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbSelected.setMargin(new java.awt.Insets(0, 0, 0, 0));
cbSelected.setPreferredSize(new java.awt.Dimension(200, 18));
代码示例来源:origin: marytts/marytts
cbSelected.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbSelected.setMargin(new java.awt.Insets(0, 0, 0, 0));
cbSelected.setPreferredSize(new java.awt.Dimension(200, 18));
代码示例来源:origin: marytts/marytts
cbStereoMono.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbStereoMono.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbDownsample.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbDownsample.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbPowerNormalise
.setToolTipText("Cluster wav files by timestamp, and normalise cluster averages.\n\nWav files recorded with less than 10 minutes gap between them are treated like a single recording session. Only clusters as a whole are normalised, in order to even out different recording volumes in different recording sessions.\n");
cbPowerNormalise.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbPowerNormalise.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbBestOnly.setText("Process only the best take of each sentence");
cbBestOnly.setToolTipText("Process a001.wav, but not a001a.wav, a001b.wav etc.");
cbBestOnly.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbBestOnly.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbHighPassFilter.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbHighPassFilter.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbGlobalAmplitude.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbGlobalAmplitude.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbTrimSilences.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
代码示例来源:origin: marytts/marytts
cbStereoMono.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbStereoMono.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbDownsample.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbDownsample.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbPowerNormalise
.setToolTipText("Cluster wav files by timestamp, and normalise cluster averages.\n\nWav files recorded with less than 10 minutes gap between them are treated like a single recording session. Only clusters as a whole are normalised, in order to even out different recording volumes in different recording sessions.\n");
cbPowerNormalise.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbPowerNormalise.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbBestOnly.setText("Process only the best take of each sentence");
cbBestOnly.setToolTipText("Process a001.wav, but not a001a.wav, a001b.wav etc.");
cbBestOnly.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbBestOnly.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbHighPassFilter.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbHighPassFilter.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbGlobalAmplitude.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
cbGlobalAmplitude.setMargin(new java.awt.Insets(0, 0, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
cbTrimSilences.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
代码示例来源:origin: marytts/marytts
jCheckBox_PlaySynthesis.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_PlaySynthesis.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_PlayBackRec.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_PlayBackRec.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_ContinueWithNext.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_ContinueWithNext.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_ContinueWithNext.addActionListener(new java.awt.event.ActionListener() {
jCheckBox_PlayClosingBeep.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_PlayClosingBeep.setMargin(new java.awt.Insets(0, 0, 0, 0));
代码示例来源:origin: marytts/marytts
jCheckBox_SystemLookAndFeel.setBackground(javax.swing.UIManager.getDefaults().getColor("TabbedPane.highlight"));
jCheckBox_SystemLookAndFeel.setText("Use system look and feel (requires tool restart)");
jCheckBox_SystemLookAndFeel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_SystemLookAndFeel.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_SystemLookAndFeel.addActionListener(new java.awt.event.ActionListener() {
jCheckBox_ShowTestOutput.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_ShowTestOutput.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_ShowTestOutput.addActionListener(new java.awt.event.ActionListener() {
jCheckBox_ShowTranscription.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_ShowTranscription.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_ShowTranscription.addActionListener(new java.awt.event.ActionListener() {
jCheckBox_ShowPromptCount.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_ShowPromptCount.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_ShowPromptCount.addActionListener(new java.awt.event.ActionListener() {
jCheckBox_RedAlertMode.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
jCheckBox_RedAlertMode.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox_RedAlertMode.addActionListener(new java.awt.event.ActionListener() {
代码示例来源:origin: ron190/jsql-injection
@Override
public Component getComponent(
final JTree tree, Object nodeRenderer, final boolean isSelected, boolean isLeaf, boolean hasFocus
) {
JCheckBox checkbox = new JCheckBox(this.toString(), this.isSelected());
checkbox.setFont(
checkbox.getFont().deriveFont(
Font.PLAIN | Font.ITALIC,
checkbox.getFont().getSize()
)
);
checkbox.setText(StringUtil.detectUtf8HtmlNoWrap(this.toString()));
if (isSelected) {
if (hasFocus) {
checkbox.setBackground(HelperUi.COLOR_FOCUS_GAINED);
checkbox.setBorder(HelperUi.BORDER_FOCUS_GAINED);
} else {
checkbox.setBackground(HelperUi.COLOR_FOCUS_LOST);
checkbox.setBorder(HelperUi.BORDER_FOCUS_LOST);
}
} else {
checkbox.setBackground(Color.WHITE);
checkbox.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
}
checkbox.setComponentOrientation(ComponentOrientation.getOrientation(I18n.getLocaleDefault()));
return checkbox;
}
代码示例来源:origin: ron190/jsql-injection
radioCustomFromRow.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 0));
radioCustomFromRow.setIcon(new CheckBoxMenuItemIconCustom());
radioCustomFromRow.setFocusPainted(false);
radioCustomToRow.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 0));
radioCustomToRow.setIcon(new CheckBoxMenuItemIconCustom());
radioCustomToRow.setFocusPainted(false);
radioCustomFromChar.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 0));
radioCustomFromChar.setIcon(new CheckBoxMenuItemIconCustom());
radioCustomFromChar.setFocusPainted(false);
radioCustomToChar.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 0));
radioCustomToChar.setIcon(new CheckBoxMenuItemIconCustom());
radioCustomToChar.setFocusPainted(false);
代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui
protected void setState(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if ((supportsFocusBorder) && (hasFocus) && (isSelected)) {
checkBox.setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 0));
} else {
checkBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
}
}
代码示例来源:origin: org.openmuc/openiec61850
@Override
protected JComponent init() {
checkbox = new JCheckBox();
checkbox.setBorder(null);
checkbox.setSelected(data.getValue());
return checkbox;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
public JComponent getComponent() {
if (checkBox == null)
return new JCheckBox();
checkBox.setBorder(BorderFactory.createEmptyBorder(0,3,0,0));
if (!propertyEditor.canWrite())
checkBox.setEnabled(false);
else
checkBox.setEnabled(true);
return checkBox;
}
代码示例来源:origin: org.apache.cayenne/cayenne-nodeps
public CheckBoxEditor(JCheckBox checkBox) {
super(checkBox);
checkBox.setBorder(editStateBorder);
checkBox.setHorizontalAlignment(JCheckBox.CENTER);
}
}
代码示例来源:origin: org.objectstyle.cayenne/cayenne
public CheckBoxEditor(JCheckBox checkBox) {
super(checkBox);
checkBox.setBorder(editStateBorder);
checkBox.setHorizontalAlignment(JCheckBox.CENTER);
}
}
代码示例来源:origin: ganshane/shakey
@Override public void installUI(JComponent c) {
super.installUI(c);
((JCheckBox)c).setBorder( new EmptyBorder( 3, 0, 3, 0) );
}
}
代码示例来源:origin: openmuc/openiec61850
@Override
protected JComponent init() {
checkbox = new JCheckBox();
checkbox.setBorder(null);
checkbox.setSelected(data.getValue());
return checkbox;
}
代码示例来源:origin: net.java.abeille/abeille
public void updateUI() {
super.updateUI();
if (m_panel != null) {
m_panel.setBackground(javax.swing.UIManager.getColor("TextField.background"));
m_cbox.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 4, 2, 2));
m_cbox.setOpaque(false);
}
}
};
代码示例来源:origin: com.github.danielpacak.osgi.swingconsole/osgi.swingconsole
private JComponent newEditor(AttributeDTO attribute) {
if (attribute.getType().equals(AttributeDTO.Type.BOOLEAN)) {
JCheckBox editor = new JCheckBox();
editor.setBorder(createEmptyBorder());
return editor;
}
if (attribute.hasOptions()) {
return new JComboBox(attribute.getOptionValues());
}
return new JTextField();
}
代码示例来源:origin: senbox-org/snap-desktop
private JComponent addBoolPropertyEditor(JPanel parent, String label, String propertyName, int line) {
PropertyDescriptor propertyDescriptor = this.container.getDescriptor(propertyName);
CheckBoxEditor boolEditor = new CheckBoxEditor();
JCheckBox checkBoxComponent = (JCheckBox)boolEditor.createEditorComponent(propertyDescriptor, valuesContext);
checkBoxComponent.setBorder(new EmptyBorder(1, 0, 1, 0));
parent.add(new JLabel(label), getConstraints(line, 0, 1));
parent.add(checkBoxComponent, getConstraints(line, 1, 1));
return checkBoxComponent;
}
内容来源于网络,如有侵权,请联系作者删除!