本文整理汇总了Java中edu.stanford.nlp.io.ui.OpenPageDialog类的典型用法代码示例。如果您正苦于以下问题:Java OpenPageDialog类的具体用法?Java OpenPageDialog怎么用?Java OpenPageDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OpenPageDialog类属于edu.stanford.nlp.io.ui包,在下文中一共展示了OpenPageDialog类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ParserPanel
import edu.stanford.nlp.io.ui.OpenPageDialog; //导入依赖的package包/类
/**
* Creates new form ParserPanel
*/
public ParserPanel() {
initComponents();
// create dialogs for file selection
jfc = new JFileChooser();
pageDialog = new OpenPageDialog(new Frame(), true);
pageDialog.setFileChooser(jfc);
setLanguage(UNTOKENIZED_ENGLISH);
// create a timer
timer = new javax.swing.Timer(ONE_SECOND, new TimerListener());
// for (un)highlighting text
highlightStyle = new SimpleAttributeSet();
normalStyle = new SimpleAttributeSet();
StyleConstants.setBackground(highlightStyle, Color.yellow);
StyleConstants.setBackground(normalStyle, textPane.getBackground());
}
示例2: ParserPanel
import edu.stanford.nlp.io.ui.OpenPageDialog; //导入依赖的package包/类
/**
* Creates new form ParserPanel
*/
public ParserPanel() {
initComponents();
// create dialogs for file selection
jfc = new JFileChooser(System.getProperty("user.dir"));
pageDialog = new OpenPageDialog(new Frame(), true);
pageDialog.setFileChooser(jfc);
jfcLocation = new JFileChooserLocation(jfc);
setLanguage(UNTOKENIZED_ENGLISH);
// create a timer
timer = new javax.swing.Timer(ONE_SECOND, new TimerListener());
// for (un)highlighting text
highlightStyle = new SimpleAttributeSet();
normalStyle = new SimpleAttributeSet();
StyleConstants.setBackground(highlightStyle, Color.yellow);
StyleConstants.setBackground(normalStyle, textPane.getBackground());
this.chooseJarParser = new JarFileChooser(".*\\.ser\\.gz", this);
}
示例3: loadFile
import edu.stanford.nlp.io.ui.OpenPageDialog; //导入依赖的package包/类
/**
* Opens dialog to load a text data file
*/
public void loadFile() {
// centers dialog in panel
pageDialog.setLocation(getLocationOnScreen().x + (getWidth() - pageDialog.getWidth()) / 2, getLocationOnScreen().y + (getHeight() - pageDialog.getHeight()) / 2);
pageDialog.setVisible(true);
if (pageDialog.getStatus() == OpenPageDialog.APPROVE_OPTION) {
loadFile(pageDialog.getPage());
}
}