當前位置: 首頁>>代碼示例>>Java>>正文


Java Utils.setDontShowDialog方法代碼示例

本文整理匯總了Java中weka.core.Utils.setDontShowDialog方法的典型用法代碼示例。如果您正苦於以下問題:Java Utils.setDontShowDialog方法的具體用法?Java Utils.setDontShowDialog怎麽用?Java Utils.setDontShowDialog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在weka.core.Utils的用法示例。


在下文中一共展示了Utils.setDontShowDialog方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: pleaseCloseAppWindowsPopUp

import weka.core.Utils; //導入方法依賴的package包/類
private void pleaseCloseAppWindowsPopUp() {
  if (!Utils
    .getDontShowDialog("weka.gui.PackageManager.PleaseCloseApplicationWindows")) {
    JCheckBox dontShow = new JCheckBox("Do not show this message again");
    Object[] stuff = new Object[2];
    stuff[0] =
      "Please close any open Weka application windows\n"
        + "(Explorer, Experimenter, KnowledgeFlow, SimpleCLI)\n"
        + "before proceeding.\n";
    stuff[1] = dontShow;

    JOptionPane.showMessageDialog(PackageManager.this, stuff,
      "Weka Package Manager", JOptionPane.OK_OPTION);

    if (dontShow.isSelected()) {
      try {
        Utils
          .setDontShowDialog("weka.gui.PackageManager.PleaseCloseApplicationWindows");
      } catch (Exception ex) {
        // quietly ignore
      }
    }
  }
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:25,代碼來源:PackageManager.java

示例2: toggleLoadStatusRequiresRestartPopUp

import weka.core.Utils; //導入方法依賴的package包/類
private void toggleLoadStatusRequiresRestartPopUp() {
  if (!Utils
    .getDontShowDialog("weka.gui.PackageManager.ToggleLoadStatusRequiresRestart")) {
    JCheckBox dontShow = new JCheckBox("Do not show this message again");
    Object[] stuff = new Object[2];
    stuff[0] =
      "Changing a package's load status will require a restart for the change to take affect\n";

    stuff[1] = dontShow;

    JOptionPane.showMessageDialog(PackageManager.this, stuff,
      "Weka Package Manager", JOptionPane.OK_OPTION);

    if (dontShow.isSelected()) {
      try {
        Utils
          .setDontShowDialog("weka.gui.PackageManager.ToggleLoadStatusRequiresRestart");
      } catch (Exception ex) {
        // quietly ignore
      }
    }
  }
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:24,代碼來源:PackageManager.java

示例3: done

import weka.core.Utils; //導入方法依賴的package包/類
@Override
public void done() {
  m_progress.setValue(m_progress.getMinimum());
  if (m_unsuccessfulUninstalls.size() == 0) {
    m_detailLabel.setText("Packages removed successfully.");

    if (!Utils
      .getDontShowDialog("weka.gui.PackageManager.RestartAfterUninstall")) {
      JCheckBox dontShow = new JCheckBox("Do not show this message again");
      Object[] stuff = new Object[2];
      stuff[0] =
        "Weka might need to be restarted for\n"
          + "the changes to come into effect.\n";
      stuff[1] = dontShow;

      JOptionPane.showMessageDialog(PackageManager.this, stuff,
        "Weka Package Manager", JOptionPane.OK_OPTION);

      if (dontShow.isSelected()) {
        try {
          Utils
            .setDontShowDialog("weka.gui.PackageManager.RestartAfterUninstall");
        } catch (Exception ex) {
          // quietly ignore
        }
      }
    }
  } else {
    StringBuffer failedPackageNames = new StringBuffer();
    for (String p : m_unsuccessfulUninstalls) {
      failedPackageNames.append(p + "\n");
    }
    displayErrorDialog(
      "The following package(s) could not be uninstalled\n"
        + "for some reason (check the log)\n"
        + failedPackageNames.toString(), "");
    m_detailLabel.setText("Finished uninstalling.");
  }

  m_unofficialBut.setEnabled(true);
  m_refreshCacheBut.setEnabled(true);
  m_availableBut.setEnabled(true);
  m_allBut.setEnabled(true);
  m_installedBut.setEnabled(true);

  // force refresh of installed and available packages
  m_installedPackages = null;
  m_availablePackages = null;
  // m_installBut.setEnabled(true);
  m_installing = false;
  updateTable();
  if (m_table.getSelectedRow() >= 0) {
    // mainly to update the install/uninstall button status
    // displayPackageInfo(m_table.getSelectedRow());
    updateInstallUninstallButtonEnablement();
  }
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:58,代碼來源:PackageManager.java


注:本文中的weka.core.Utils.setDontShowDialog方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。