本文整理匯總了Java中javax.swing.JSpinner.DefaultEditor方法的典型用法代碼示例。如果您正苦於以下問題:Java JSpinner.DefaultEditor方法的具體用法?Java JSpinner.DefaultEditor怎麽用?Java JSpinner.DefaultEditor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.JSpinner
的用法示例。
在下文中一共展示了JSpinner.DefaultEditor方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getEditor
import javax.swing.JSpinner; //導入方法依賴的package包/類
private Component getEditor() {
JComponent editorComponent = ((JSpinner) component).getEditor();
if (editorComponent == null) {
throw new JavaAgentException("Null value returned by getEditor() on spinner", null);
}
if (editorComponent instanceof JSpinner.DefaultEditor) {
editorComponent = ((JSpinner.DefaultEditor) editorComponent).getTextField();
}
return editorComponent;
}
示例2: getSpinnerText
import javax.swing.JSpinner; //導入方法依賴的package包/類
private String getSpinnerText() {
JComponent editor = ((JSpinner) component).getEditor();
if (editor == null) {
} else {
RComponentFactory finder = new RComponentFactory(omapConfig);
if (editor instanceof JSpinner.DefaultEditor) {
RComponent rComponent = finder.findRawRComponent(editor, null, recorder);
return rComponent.getText();
}
}
return null;
}
示例3: getText
import javax.swing.JSpinner; //導入方法依賴的package包/類
@Override public String getText() {
if (component instanceof JSpinner.DefaultEditor) {
String text = ((JSpinner.DefaultEditor) component).getTextField().getText();
return text;
}
return null;
}