本文整理了Java中javax.swing.JTextField.hasFocus()
方法的一些代码示例,展示了JTextField.hasFocus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextField.hasFocus()
方法的具体详情如下:
包路径:javax.swing.JTextField
类名称:JTextField
方法名:hasFocus
暂无
代码示例来源:origin: runelite/runelite
void updateDisplayInput()
{
if (!displayInput.getTextField().hasFocus())
{
displayInput.setText(getFormattedDuration(clock.getDisplayTime()));
}
}
代码示例来源:origin: magefree/mage
private void requestFocusIfPossible() {
boolean requestFocusAllowed = true;
if (MageFrame.getInstance().getFocusOwner() == null) {
requestFocusAllowed = false;
} else if (connectedChatPanel != null && connectedChatPanel.getTxtMessageInputComponent() != null) {
if (connectedChatPanel.getTxtMessageInputComponent().hasFocus()) {
requestFocusAllowed = false;
}
}
if (requestFocusAllowed) {
this.btnRight.requestFocus();
this.helper.requestFocus();
}
}
代码示例来源:origin: undera/jmeter-plugins
@Override
public void changedUpdate(DocumentEvent arg0) {
if (tf.hasFocus()) {
jCheckBoxMaxYActionPerformed(null);
}
}
代码示例来源:origin: undera/jmeter-plugins
@Override
public void insertUpdate(DocumentEvent arg0) {
if (tf.hasFocus()) {
jCheckBoxMaxYActionPerformed(null);
}
}
代码示例来源:origin: undera/jmeter-plugins
@Override
public void removeUpdate(DocumentEvent arg0) {
if (tf.hasFocus()) {
jCheckBoxMaxYActionPerformed(null);
}
}
});
代码示例来源:origin: undera/jmeter-plugins
@Override
public void insertUpdate(DocumentEvent e) {
if (tf.hasFocus()) {
update();
}
}
代码示例来源:origin: undera/jmeter-plugins
@Override
public void changedUpdate(DocumentEvent e) {
if (tf.hasFocus()) {
update();
}
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
public void removeUpdate(DocumentEvent evt) {
if (textField.hasFocus()) {
radioButton.setSelected(true);
checkNumberStatus();
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
public void insertUpdate(DocumentEvent evt) {
if (textField.hasFocus()) {
radioButton.setSelected(true);
checkNumberStatus();
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
public void removeUpdate(DocumentEvent evt) {
if (textField.hasFocus()) {
radioButton.setSelected(true);
checkNumberStatus();
}
}
代码示例来源:origin: omegat-org/omegat
private void update() {
if (panel.apiKeyTextField.hasFocus()) {
timer.restart();
}
}
});
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
public void insertUpdate(DocumentEvent e) {
if (tickerTextField.hasFocus()) {
textChanged();
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
public void removeUpdate(DocumentEvent e) {
if (tickerTextField.hasFocus()) {
textChanged();
}
}
代码示例来源:origin: org.jspresso/jspresso-swing-components
/**
* {@inheritDoc}
*/
public void removeUpdate(@SuppressWarnings("unused")
DocumentEvent e) {
if (!textField.hasFocus()) {
SwingUtilities.invokeLater(new FocusLostTask(textField));
}
}
}
代码示例来源:origin: org.jspresso.framework/jspresso-swing-components
/**
* {@inheritDoc}
*/
@Override
public void changedUpdate(DocumentEvent e) {
if (!textField.hasFocus()) {
SwingUtilities.invokeLater(new FocusLostTask(textField));
}
}
代码示例来源:origin: org.jspresso.framework/jspresso-swing-components
/**
* {@inheritDoc}
*/
@Override
public void insertUpdate(DocumentEvent e) {
if (!textField.hasFocus()) {
SwingUtilities.invokeLater(new FocusLostTask(textField));
}
}
代码示例来源:origin: org.jspresso.framework/jspresso-swing-components
/**
* {@inheritDoc}
*/
@Override
public void removeUpdate(DocumentEvent e) {
if (!textField.hasFocus()) {
SwingUtilities.invokeLater(new FocusLostTask(textField));
}
}
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void stateChanged(ChangeEvent e) {
if (! textField.hasFocus()) {
int value = ccModel.getBoundedRangeModel(2).getValue();
if (ccModel.isWebSaveOnly()) {
value = Math.round(value / 51f) * 51;
}
String hex = Integer.toHexString(value).toUpperCase();
textField.setText((hex.length() == 1) ? "0"+hex : hex);
}
}
}
代码示例来源:origin: org.java.net.substance/substance
public void stateChanged(ChangeEvent e) {
if (! textField.hasFocus()) {
int value = ccModel.getBoundedRangeModel(2).getValue();
if (ccModel.isWebSaveOnly()) {
value = Math.round(value / 51f) * 51;
}
String hex = Integer.toHexString(value).toUpperCase();
textField.setText((hex.length() == 1) ? "0"+hex : hex);
}
}
}
代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15
/**
* A small convenience method to try showing the ComboBoxPopup.
*/
private void togglePopup() {
// break out early if we're flagged to ignore attempts to toggle the popup state
if (doNotTogglePopup) return;
if (comboBoxModel.getSize() == 0)
comboBox.hidePopup();
else if (comboBox.isShowing() && !comboBox.isPopupVisible() && comboBoxEditorComponent.hasFocus())
comboBox.showPopup();
}
内容来源于网络,如有侵权,请联系作者删除!