当前位置: 首页>>代码示例>>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;未经允许,请勿转载。