本文整理了Java中javax.swing.JTextField.isVisible()
方法的一些代码示例,展示了JTextField.isVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextField.isVisible()
方法的具体详情如下:
包路径:javax.swing.JTextField
类名称:JTextField
方法名:isVisible
暂无
代码示例来源:origin: nodebox/nodebox
public void focusLost(FocusEvent e) {
if (numberField.isVisible())
commitNumberField();
setFocusable(true);
}
});
代码示例来源:origin: otros-systems/otroslogviewer
@Override
public void focusLost(FocusEvent e) {
if (editor.isVisible()) {
renameTabTitle();
}
}
});
代码示例来源:origin: pentaho/pentaho-reporting
public boolean isTextInputVisible() {
return textField.isVisible();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
public String[] getSecondParameterList() {
if (parameter2Text.isVisible()) {
return parameter2Text.getText().replace(',', ' ').replace(" ", " ").trim().split(" "); // NOI18N
} else {
return null;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
public String[] getFirstParameterList() {
if (parameter1Text.isVisible()) {
// Change commas to spaces since lists are space separated, not comma separated
return parameter1Text.getText().replace(',', ' ').replace(" ", " ").trim().split(" "); // NOI18N
} else {
return null;
}
}
代码示例来源:origin: fr.ifremer/isis-fish
protected boolean check(boolean ssh) {
invalidFirstName=firstname.isVisible() && firstname.getText().isEmpty();
invalidLastName=lasstname.isVisible() && lasstname.getText().isEmpty();
invalidEmail=email.isVisible() && email.getText().isEmpty();
if (ssh) {
String file = serverPrivateKeyFile.getText();
invalidKey=file.isEmpty() || !new java.io.File(file).exists();
invalidLogin=serverLogin.getText().isEmpty();
} else {
invalidLogin=false;
invalidKey=false;
}
return !(invalidEmail||invalidFirstName||invalidLastName||invalidLogin||invalidKey);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
private void nameChanged(){
if ( myAccessor.isVisible() ){
myAccessor.setText( getGetter() );
}
parent.stateChanged(null);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
private String getAccessorText(){
if ( myAccessor.isVisible() ){
return getGetter();
}
return "";
}
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Sets the searching text.
*
* @param searchingText the new searching text.
*/
public void setSearchingText(String searchingText) {
if (_textField != null && _textField.isVisible()) {
_textField.setText(searchingText);
}
if (_comboBox != null && _comboBox.isVisible()) {
_comboBox.setSelectedItem(searchingText);
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-j2me-cdc-project
@Override
boolean valid(WizardDescriptor settings) {
if (mainClassTextField.isVisible () && mainClassTextField.isEnabled ()) {
if (!valid) {
settings.putProperty( WizardDescriptor.PROP_ERROR_MESSAGE,
NbBundle.getMessage(PanelOptionsVisual.class,"ERROR_IllegalMainClassName")); //NOI18N
}
return this.valid;
}
return true;
}
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Makes the search field having focus.
*/
public void focusSearchField() {
if (_textField != null && _textField.isVisible()) {
_textField.requestFocus();
}
if (_comboBox != null && _comboBox.isVisible()) {
_comboBox.requestFocus();
}
}
代码示例来源:origin: otros-systems/otroslogviewer
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 1 && e.getButton() == MouseEvent.BUTTON1) {
TabHeader.this.jTabbedPane.setSelectedIndex(TabHeader.this.jTabbedPane.indexOfTabComponent(TabHeader.this));
TabHeader.this.requestFocusInWindow();
}
Rectangle rect = jTabbedPane.getUI().getTabBounds(jTabbedPane, jTabbedPane.getSelectedIndex());
if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
startEditing();
} else if (rect != null && !rect.contains(e.getPoint())) {
if (editor.isVisible()) {
renameTabTitle();
}
}
}
});
代码示例来源:origin: com.numdata/numdata-swing
@Override
public boolean isVisible()
{
final JTextField textField = _textField;
return super.isVisible() &&
// ( _isIncrement ? ( getTextFieldValue() < _limit ) : ( getTextFieldValue() > _limit ) ) &&
( ( textField == null ) || ( textField.isVisible() && textField.isEnabled() ) );
}
}
代码示例来源:origin: com.github.lgooddatepicker/LGoodDatePicker
/**
* getBaseline, This returns the baseline value of the dateTextField.
*/
@Override
public int getBaseline(int width, int height) {
if (dateTextField.isVisible()) {
return dateTextField.getBaseline(width, height);
}
return super.getBaseline(width, height);
}
代码示例来源:origin: com.github.lgooddatepicker/LGoodDatePicker
/**
* getBaseline, This returns the baseline value of the timeTextField.
*/
@Override
public int getBaseline(int width, int height) {
if (timeTextField.isVisible()) {
return timeTextField.getBaseline(width, height);
}
return super.getBaseline(width, height);
}
代码示例来源:origin: Var3D/var3dframe
public void setText(String text){
if(text.equals("")){
if(textField.isVisible()){
textField.setVisible(false);
textMessage.setVisible(true);
}
}else{
if(!textField.isVisible()) {
textField.setVisible(true);
textMessage.setVisible(false);
}
}
}
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Gets the searching text.
*
* @return the searching text.
*/
public String getSearchingText() {
if (_textField != null && _textField.isVisible()) {
return _textField.getText();
}
if (_comboBox != null && _comboBox.isVisible()) {
Object item = _comboBox.getEditor().getItem();
return item == null ? "" : item.toString();
}
return "";
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-project
boolean valid(WizardDescriptor settings) {
if (PlatformComponentFactory.getPlatform(platforms) == null) {
return false;
}
if (mainClassTextField.isVisible() && mainClassTextField.isEnabled()) {
if (!valid) {
settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, // NOI18N
NbBundle.getMessage(PanelOptionsVisual.class, "ERROR_IllegalMainClassName")); //NOI18N
}
return this.valid;
} else {
return true;
}
}
代码示例来源:origin: otros-systems/otroslogviewer
private void cancelEditing() {
if (editor.isVisible()) {
remove(editor);
add(label, 0);
revalidate();
}
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
@Override
public boolean beforeHide(boolean isExitCancel) {
if (!isExitCancel) {
// If the user has selected OER then update the API key
if (apiKeyTextField.isVisible() && !Strings.isNullOrEmpty(apiKeyTextField.getText())) {
BitcoinConfiguration bitcoinConfiguration = getWizardModel().getConfiguration().getBitcoin();
bitcoinConfiguration.getExchangeApiKeys().put(ExchangeKey.OPEN_EXCHANGE_RATES.name(), apiKeyTextField.getText());
}
// Switch the main configuration over to the new one
Configurations.switchConfiguration(getWizardModel().getConfiguration());
}
// Must be OK to proceed
return true;
}
内容来源于网络,如有侵权,请联系作者删除!