本文整理汇总了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;
}