當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。