本文整理了Java中javax.swing.JCheckBox.addFocusListener()
方法的一些代码示例,展示了JCheckBox.addFocusListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.addFocusListener()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:addFocusListener
暂无
代码示例来源:origin: marytts/marytts
cbSelected.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
formFocusGained(evt);
代码示例来源:origin: marytts/marytts
cbSelected.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
formFocusGained(evt);
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
private void initComponents() {
setLayout(new GridBagLayout());
textField = new JTextField();
textField.getDocument().addDocumentListener(this);
textField.addFocusListener(this);
textField.setPreferredSize(new Dimension(100, textField.getPreferredSize().height));
add(textField, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
foreverCheckBox = new JCheckBox();
Mnemonics.setLocalizedText(foreverCheckBox, NbBundle.getMessage(PropertyEditorGaugeMaxValue.class, "LBL_MAX_VALUE_INDEFINITE")); // NOI18N
foreverCheckBox.addActionListener(this);
foreverCheckBox.addFocusListener(this);
add(foreverCheckBox, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0));
add(new JPanel(), new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
}
代码示例来源:origin: tflobbe/solrmeter
protected Component getVisualComponent() {
checkBox = new JCheckBox();
this.setSelectedValue(SolrMeterConfiguration.getProperty(property));
checkBox.addFocusListener(this);
return checkBox;
}
代码示例来源:origin: threerings/narya
public BooleanFieldEditor (PresentsContext ctx, Field field, DObject object)
{
super(ctx, field, object);
JPanel jpan = new JPanel(new HGroupLayout(HGroupLayout.STRETCH));
// add a checkbox to display the field value
jpan.add(_value = new JCheckBox(), GroupLayout.FIXED);
// add a spacer so that clicks to the right of the checkbox
// don't toggle it
jpan.add(new Spacer(1, 1));
_value.addActionListener(this);
add(jpan);
// we want to let the user know if they remove focus from a text
// box without changing a field that it's not saved
_value.addFocusListener(this);
}
代码示例来源:origin: senbox-org/snap-desktop
private void createCellDefaultValueCheckBox(FocusListener focusListener) {
this.cellDefaultValueCheckBox = new JCheckBox();
this.cellDefaultValueCheckBox.setBackground(Color.white);
this.cellDefaultValueCheckBox.setOpaque(true);
this.cellDefaultValueCheckBox.setVisible(false);
this.cellDefaultValueCheckBox.addFocusListener(focusListener);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
private void initComponents() {
setLayout(new BorderLayout());
foreverCheckBox = new JCheckBox();
foreverCheckBox.addActionListener(this);
foreverCheckBox.addFocusListener(this);
Mnemonics.setLocalizedText(foreverCheckBox, NbBundle.getMessage(PropertyEditorTimeout.class, "LBL_TIMEOUTPE_FOREVER")); // NOI18N
add(foreverCheckBox, BorderLayout.NORTH);
foreverCheckBox.getAccessibleContext().setAccessibleName(
NbBundle.getMessage(PropertyEditorTimeout.class,
"ACSN_TIMEOUTPE_FOREVER")); // NOI18N
foreverCheckBox.getAccessibleContext().setAccessibleDescription(
NbBundle.getMessage(PropertyEditorTimeout.class,
"ACSD_TIMEOUTPE_FOREVER")); // NOI18N
textField = new JTextField();
textField.getDocument().addDocumentListener(this);
textField.addFocusListener(this);
add(textField, BorderLayout.SOUTH);
textField.getAccessibleContext().setAccessibleName(
NbBundle.getMessage(PropertyEditorTimeout.class,
"ACSN_TIMEOUTPE_VALUE")); // NOI18N
textField.getAccessibleContext().setAccessibleDescription(
NbBundle.getMessage(PropertyEditorTimeout.class,
"ACSD_TIMEOUTPE_VALUE")); // NOI18N
}
代码示例来源:origin: Slowpoke101/FTBLaunch
mcWindowPosX.addFocusListener(settingsChangeListener);
mcWindowPosY.addFocusListener(settingsChangeListener);
autoMaxCheck.addFocusListener(settingsChangeListener);
snooper.addFocusListener(settingsChangeListener);
debugLauncherVerbose.addFocusListener(settingsChangeListener);
betaChannel.addFocusListener(settingsChangeListener);
exit.addActionListener(new ActionListener() {
@Override
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
private void initComponents() {
setLayout(new BorderLayout());
unlockedCheckBox = new JCheckBox();
unlockedCheckBox.addActionListener(this);
unlockedCheckBox.addFocusListener(this);
Mnemonics.setLocalizedText(unlockedCheckBox, NbBundle.getMessage(PropertyEditorPreferredSize.class, "LBL_PREF_SIZE_UNLOCKED")); // NOI18N
unlockedCheckBox.getAccessibleContext().setAccessibleName(
NbBundle.getMessage(PropertyEditorPreferredSize.class,
"ACSN_PREF_SIZE_UNLOCKED"));
unlockedCheckBox.getAccessibleContext().setAccessibleDescription(
NbBundle.getMessage(PropertyEditorPreferredSize.class,
"ACSD_PREF_SIZE_UNLOCKED"));
add(unlockedCheckBox, BorderLayout.NORTH);
textField = new JTextField();
textField.getAccessibleContext().setAccessibleName(
radioButton.getAccessibleContext().getAccessibleName());
textField.getAccessibleContext().setAccessibleDescription(
radioButton.getAccessibleContext().getAccessibleDescription());
textField.getDocument().addDocumentListener(this);
textField.addFocusListener(this);
add(textField, BorderLayout.SOUTH);
}
代码示例来源:origin: de.dfki.mary/marytts-runtime
cbSelected.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
formFocusGained(evt);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-core
cb1.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
cb1FocusGained(evt);
cb2.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
cb2FocusGained(evt);
cb3.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
cb3FocusGained(evt);
cb4.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
cb4FocusGained(evt);
cb5.setToolTipText(org.openide.util.NbBundle.getBundle(ListenerVisualPanel.class).getString("TTT_requestListener_short")); // NOI18N
cb5.setMargin(new java.awt.Insets(0, 2, 0, 2));
cb5.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
cb5FocusGained(evt);
cb6.setToolTipText(org.openide.util.NbBundle.getBundle(ListenerVisualPanel.class).getString("TTT_requestAttrListener_short")); // NOI18N
cb6.setMargin(new java.awt.Insets(0, 2, 0, 2));
cb6.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
cb6FocusGained(evt);
代码示例来源:origin: MegaMek/megamek
checkboxes1[0].addFocusListener(new FocusListener() {
public void focusGained(FocusEvent e) {
butOK.requestFocus();
代码示例来源:origin: Slowpoke101/FTBLaunch
chckbxShowConsole.addFocusListener(settingsChangeListener);
chckbxShowConsole.setSelected(settings.getConsoleActive());
chckbxShowConsole.setBounds(540, 95, 183, 25);
keepLauncherOpen.setBounds(540, 130, 300, 25);
keepLauncherOpen.setSelected(settings.getKeepLauncherOpen());
keepLauncherOpen.addFocusListener(settingsChangeListener);
fitterPane.add(keepLauncherOpen);
optJavaArgs.setBounds(540, 165, 300, 25);
optJavaArgs.setSelected(settings.getOptJavaArgs());
optJavaArgs.addFocusListener(settingsChangeListener);
fitterPane.add(optJavaArgs);
useSystemProxy.setBounds(540, 200, 300, 25);
useSystemProxy.setSelected(settings.getUseSystemProxy());
useSystemProxy.addFocusListener(settingsChangeListener);
fitterPane.add(useSystemProxy);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv81
enableDirectoryDeployment.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
directoryDeploymentHelp(evt);
enableDriverDeployment.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jdbcDriverDeploymentHelp(evt);
enableDatabaseStart.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
enableDatabaseStartHelp(evt);
代码示例来源:origin: igvteam/igv
normalizeCoverageCB.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
showDatarangeCB.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
内容来源于网络,如有侵权,请联系作者删除!