当前位置: 首页>>代码示例>>Java>>正文


Java AutoSave类代码示例

本文整理汇总了Java中com.rapidminer.gui.autosave.AutoSave的典型用法代码示例。如果您正苦于以下问题:Java AutoSave类的具体用法?Java AutoSave怎么用?Java AutoSave使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AutoSave类属于com.rapidminer.gui.autosave包,在下文中一共展示了AutoSave类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkForAutosaved

import com.rapidminer.gui.autosave.AutoSave; //导入依赖的package包/类
private JPanel checkForAutosaved() {
    AutoSave autosave = RapidMinerGUI.getAutoSave();
    this.autosavedProcessPresent = autosave.isRecoveryProcessPresent();
    if(this.autosavedProcessPresent) {
        JPanel recoverPanel = new JPanel(new GridBagLayout());
        recoverPanel.setBackground(WARNING_BACKGROUND_COLOR);
        recoverPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(WARNING_BORDER_COLOR, 1, true), BorderFactory.createEmptyBorder(8, 8, 8, 8)));
        JLabel interrupted = new JLabel(I18N.getGUILabel("getting_started.info_interrupted", new Object[0]));
        interrupted.setForeground(WARNING_TEXT_COLOR);
        interrupted.setFont(GettingStartedDialog.OPEN_SANS_SEMIBOLD_14);
        GridBagConstraints c = new GridBagConstraints();
        c.gridx = 0;
        c.gridy = 0;
        recoverPanel.add(interrupted, c);
        JPanel buttonPanel = this.createRecoverButtonPanel(autosave);
        c.gridy = 1;
        c.insets = new Insets(10, 0, 0, 0);
        recoverPanel.add(buttonPanel, c);
        return recoverPanel;
    } else {
        return null;
    }
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:24,代码来源:OpenProcessCard.java

示例2: getAutoSave

import com.rapidminer.gui.autosave.AutoSave; //导入依赖的package包/类
/**
 * @return the object that handles autosave information
 */
public static AutoSave getAutoSave() {
	return autosave;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:7,代码来源:RapidMinerGUI.java

示例3: createRecoverButtonPanel

import com.rapidminer.gui.autosave.AutoSave; //导入依赖的package包/类
private JPanel createRecoverButtonPanel(final AutoSave autosave) {
    final JPanel buttonPanel = new JPanel();
    buttonPanel.setBackground(WARNING_BACKGROUND_COLOR);
    final JLabel recoverLabel = new JLabel(I18N.getGUILabel("getting_started.label.recover", new Object[0]));
    recoverLabel.setIcon(SwingTools.createIcon("16/loading.gif"));
    recoverLabel.setFont(GettingStartedDialog.OPEN_SANS_SEMIBOLD_14);
    recoverLabel.setForeground(WARNING_TEXT_COLOR);
    recoverLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 8, 0));
    String autosavedPath = autosave.getAutosavedPath();
    JButton recoverButton = new JButton(new ResourceAction("getting_started.recover", new Object[]{autosavedPath == null?"autosaved process":autosavedPath}) {
        private static final long serialVersionUID = 1L;

        public void actionPerformed(ActionEvent e) {
            if(OpenProcessCard.this.entryList != null) {
                OpenProcessCard.this.entryList.setFocusable(false);
            }

            buttonPanel.removeAll();
            buttonPanel.add(recoverLabel);
            buttonPanel.revalidate();
            (new ProgressThread("recover_process") {
                public void run() {
                    autosave.recoverAutosavedProcess();
                    SwingTools.invokeLater(new Runnable() {
                        public void run() {
                            if(OpenProcessCard.this.entryList != null) {
                                OpenProcessCard.this.entryList.setFocusable(true);
                            }

                            OpenProcessCard.this.owner.dispose();
                        }
                    });
                }
            }).start();
        }
    });
    this.styleButton(recoverButton);
    buttonPanel.add(recoverButton);
    this.owner.getRootPane().setDefaultButton(recoverButton);
    return buttonPanel;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:42,代码来源:OpenProcessCard.java


注:本文中的com.rapidminer.gui.autosave.AutoSave类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。