本文整理汇总了Java中com.rapidminer.gui.tools.dialogs.ButtonDialog.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java ButtonDialog.setVisible方法的具体用法?Java ButtonDialog.setVisible怎么用?Java ButtonDialog.setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.gui.tools.dialogs.ButtonDialog
的用法示例。
在下文中一共展示了ButtonDialog.setVisible方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeSetBackgroundImageAction
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
/**
* Creates an action which can be used to set the {@link ProcessBackgroundImage}.
*
* @param process
* the process for which to set the background image. Can be {@code null} for first
* process at action event time
* @return the action, never {@code null}
*/
public ResourceAction makeSetBackgroundImageAction(final ExecutionUnit process) {
ResourceAction setBackgroundImage = new ResourceAction(true, "process_background.set") {
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
final ExecutionUnit targetProcess = process != null ? process : view.getModel().getProcess(0);
ButtonDialog dialog = createBackgroundImageDialog(targetProcess, view.getModel());
dialog.setVisible(true);
}
};
return setBackgroundImage;
}
示例2: showMacroEditorDialog
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
public static void showMacroEditorDialog(final ProcessContext context) {
ButtonDialog dialog = new ButtonDialog(ApplicationFrame.getApplicationFrame(), "define_macros",
ModalityType.APPLICATION_MODAL, new Object[] {}) {
private static final long serialVersionUID = 2874661432345426452L;
{
MacroEditor editor = new MacroEditor(false);
editor.setBorder(createBorder());
JButton addMacroButton = new JButton(editor.ADD_MACRO_ACTION);
JButton removeMacroButton = new JButton(editor.REMOVE_MACRO_ACTION);
layoutDefault(editor, NORMAL, addMacroButton, removeMacroButton, makeOkButton());
}
@Override
protected void ok() {
super.ok();
}
};
dialog.setVisible(true);
}
示例3: makeSetBackgroundImageAction
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
/**
* Creates an action which can be used to set the {@link ProcessBackgroundImage}.
*
* @param process
* the process for which to set the background image. Can be {@code null} for first
* process at action event time
* @return the action, never {@code null}
*/
public ResourceAction makeSetBackgroundImageAction(final ExecutionUnit process) {
ResourceAction setBackgroundImage = new ResourceAction(true, "process_background.set") {
private static final long serialVersionUID = 1L;
@Override
public void loggedActionPerformed(ActionEvent e) {
final ExecutionUnit targetProcess = process != null ? process : view.getModel().getProcess(0);
ButtonDialog dialog = createBackgroundImageDialog(targetProcess, view.getModel());
dialog.setVisible(true);
}
};
return setBackgroundImage;
}
示例4: showMacroEditorDialog
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
public static void showMacroEditorDialog(final ProcessContext context) {
ButtonDialog dialog = new ButtonDialog("define_macros", true,new Object[]{}) {
private static final long serialVersionUID = 2874661432345426452L;
{
MacroEditor editor = new MacroEditor(false);
editor.setBorder(createBorder());
JButton addMacroButton = new JButton(editor.ADD_MACRO_ACTION);
JButton removeMacroButton = new JButton(editor.REMOVE_MACRO_ACTION);
layoutDefault(editor, NORMAL, addMacroButton, removeMacroButton, makeOkButton());
}
@Override
protected void ok() {
super.ok();
}
};
dialog.setVisible(true);
}
示例5: actionPerformed
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
if(DatabaseService.checkCommercialDatabaseConstraint("jdbc.manage_drivers") == null) {
DriverInfo[] drivers = DatabaseService.getAllDriverInfos();
JDBCDriverTable driverTable = new JDBCDriverTable(drivers);
driverTable.setBorder((Border)null);
JScrollPane driverTablePane = new JScrollPane(driverTable);
driverTablePane.setBorder((Border)null);
ButtonDialogBuilder builder = new ButtonDialogBuilder("jdbc_drivers");
ButtonDialog dialog = builder.setOwner(ApplicationFrame.getApplicationFrame()).setModalityType(ModalityType.APPLICATION_MODAL).setContent(driverTablePane, 1).setButtons(new DefaultButtons[]{DefaultButtons.CLOSE_BUTTON}).build();
dialog.setVisible(true);
}
}
示例6: showBrowserUnavailableMessage
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
/**
* Displays the uri in a {@link ButtonDialog}
*
* @param uri
*/
private static void showBrowserUnavailableMessage(String uri) {
ButtonDialog dialog = BrowserUnavailableDialogFactory.createNewDialog(uri);
dialog.setVisible(true);
LOGGER.log(Level.SEVERE, "Failed to open web page in browser, browsing is not supported on this platform.");
}
示例7: windowClosed
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
@Override
public void windowClosed(WindowEvent e) {
boolean permissionsActiveNow = Boolean.parseBoolean(
ParameterService.getParameterValue(RapidMiner.PROPERTY_RAPIDMINER_UPDATE_ADDITIONAL_PERMISSIONS));
if (!permissionsActiveBefore && permissionsActiveNow) {
BooleanSupplier isAllowed = () -> ProductConstraintManager.INSTANCE.getActiveLicense()
.getPrecedence() >= StudioLicenseConstants.UNLIMITED_LICENSE_PRECEDENCE
|| ProductConstraintManager.INSTANCE.isTrialLicense();
if (ProductConstraintManager.INSTANCE.isInitialized() && isAllowed.getAsBoolean()) {
ButtonDialog dialog = new ButtonDialogBuilder("additional_permissions")
.setOwner(ApplicationFrame.getApplicationFrame())
.setButtons(DefaultButtons.OK_BUTTON, DefaultButtons.CANCEL_BUTTON)
.setModalityType(ModalityType.APPLICATION_MODAL).setContent(new JPanel(), ButtonDialog.DEFAULT_SIZE)
.build();
dialog.getRootPane().getDefaultButton().setText("Grant");
dialog.getRootPane().getDefaultButton().setMnemonic('G');
dialog.setVisible(true);
if (!dialog.wasConfirmed()) {
ParameterService.setParameterValue(RapidMiner.PROPERTY_RAPIDMINER_UPDATE_ADDITIONAL_PERMISSIONS,
String.valueOf(false));
ParameterService.saveParameters();
}
} else {
ParameterService.setParameterValue(RapidMiner.PROPERTY_RAPIDMINER_UPDATE_ADDITIONAL_PERMISSIONS,
String.valueOf(false));
ParameterService.saveParameters();
ButtonDialog smallLicenseDialog = new ButtonDialogBuilder("small_license")
.setOwner(ApplicationFrame.getApplicationFrame()).setButtons(DefaultButtons.OK_BUTTON)
.setModalityType(ModalityType.APPLICATION_MODAL).setContent(new JPanel(), ButtonDialog.MESSAGE)
.build();
smallLicenseDialog.setVisible(true);
}
}
}
示例8: windowClosed
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
@Override
public void windowClosed(WindowEvent e) {
boolean betaActiveNow = Boolean
.parseBoolean(ParameterService.getParameterValue(RapidMiner.PROPERTY_RAPIDMINER_UPDATE_BETA_FEATURES));
if (!betaActiveBefore && betaActiveNow) {
JTextArea textArea = new JTextArea();
textArea.setColumns(60);
textArea.setRows(15);
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
textArea.setEditable(false);
textArea.setText(loadBetaEULA());
textArea.setBorder(null);
textArea.setCaretPosition(0);
JScrollPane scrollPane = new ExtendedJScrollPane(textArea);
scrollPane.setBorder(BorderFactory.createLineBorder(Colors.TEXTFIELD_BORDER));
ButtonDialog dialog = new ButtonDialogBuilder("beta_features_eula")
.setOwner(ApplicationFrame.getApplicationFrame())
.setButtons(DefaultButtons.OK_BUTTON, DefaultButtons.CANCEL_BUTTON)
.setModalityType(ModalityType.APPLICATION_MODAL).setContent(scrollPane, ButtonDialog.DEFAULT_SIZE)
.build();
dialog.setVisible(true);
if (!dialog.wasConfirmed()) {
ParameterService.setParameterValue(RapidMiner.PROPERTY_RAPIDMINER_UPDATE_BETA_FEATURES,
String.valueOf(false));
ParameterService.saveParameters();
ActionStatisticsCollector.INSTANCE.log(ActionStatisticsCollector.TYPE_BETA_FEATURES,
ActionStatisticsCollector.VALUE_BETA_FEATURES_ACTIVATION, "cancelled");
}
}
}
示例9: actionPerformed
import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
final ButtonDialog dialog = new ButtonDialog("jdbc_drivers", true, new Object[]{}) {
private static final long serialVersionUID = 8300330464175246257L;
{
DriverInfo[] drivers = DatabaseService.getAllDriverInfos();
JDBCDriverTable driverTable = new JDBCDriverTable(drivers);
driverTable.setBorder(null);
JScrollPane driverTablePane = new JScrollPane(driverTable);
driverTablePane.setBorder(createBorder());
layoutDefault(driverTablePane, NORMAL, makeCloseButton());
}
};
dialog.setVisible(true);
}