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


Java ButtonDialog类代码示例

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


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

示例1: BinaryImportDestinationChooser

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
/**
 * Creates a new {@link RepositoryLocationChooser} that allows to specify a media or MIME type
 * for the given data source.
 *
 * @param source
 *            the data source
 * @param initialDestination
 *            the initial location (optional)
 */
public BinaryImportDestinationChooser(BinaryDataSource source, String initialDestination) {
	super(null, null, initialDestination, true, false, true, true, Colors.WHITE);

	// Use generic mime type as default and try to guess more specific.
	String type = "application/octet-stream";
	Tika tika = new Tika();
	try {
		type = tika.detect(source.getLocation());
	} catch (IOException e) {
		// ignore
	}

	JLabel mediaTypelabel = new ResourceLabel("repository_chooser.mime_type");
	mediaType = new JTextArea(type);

	GridBagConstraints c = new GridBagConstraints();
	c.insets = new Insets(ButtonDialog.GAP, 0, 0, ButtonDialog.GAP);
	c.gridwidth = GridBagConstraints.RELATIVE;
	add(mediaTypelabel, c);

	c.insets = new Insets(ButtonDialog.GAP, 0, 0, 0);
	c.gridwidth = GridBagConstraints.REMAINDER;
	c.fill = GridBagConstraints.HORIZONTAL;
	add(mediaType, c);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:35,代码来源:BinaryImportDestinationChooser.java

示例2: 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;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:26,代码来源:ProcessBackgroundImageVisualizer.java

示例3: getComponent

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
@Override
protected JComponent getComponent() {
	JPanel errorTolerancePanel = new JPanel(ButtonDialog.createGridLayout(2, 2));
	errorTolerancePanel.setBorder(ButtonDialog.createTitledBorder("Error Handling"));
	errorTolerancePanel.add(tolerateErrorCheckBox, 0);
	errorTolerancePanel.add(validationButtonsPanel, 1);

	errorTolerancePanel.add(new JPanel(), 2);
	errorTolerancePanel.add(errorPreviewButtonsPanel, 3);
	editor.setBorder(ButtonDialog.createTitledBorder("Data Preview"));

	JPanel panel = new JPanel(new BorderLayout(0, ButtonDialog.GAP));
	panel.add(errorTolerancePanel, BorderLayout.NORTH);
	panel.add(editor, BorderLayout.CENTER);
	return panel;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:17,代码来源:MetaDataDeclerationWizardStep.java

示例4: initGUI

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
/**
 * Inits the GUI.
 */
private void initGUI() {
	JPanel outerPanel = new JPanel(new BorderLayout());
	outerPanel.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));

	threadPanel = new JPanel(new GridBagLayout());
	threadPanel.setOpaque(true);
	threadPanel.setBackground(Color.WHITE);

	// add thread panel to outer panel
	JScrollPane scrollPane = new ExtendedJScrollPane(threadPanel);
	scrollPane.setBorder(null);
	outerPanel.add(scrollPane, BorderLayout.CENTER);

	setDefaultSize(ButtonDialog.NORMAL);
	layoutDefault(outerPanel, makeCancelButton("hide"));
	setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
	setModalityType(ModalityType.APPLICATION_MODAL);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:22,代码来源:ProgressThreadDialog.java

示例5: 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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:22,代码来源:MacroEditor.java

示例6: NominalValueDialog

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
/**
 * Creates a new {@link NominalValueDialog} instance.
 *
 * @param listOfValues
 */
public NominalValueDialog(Window owner, List<ValueAndCount> listOfValues) {
	super(owner, "attribute_statistics.nominal_values_dialog", ModalityType.APPLICATION_MODAL, new Object[] {});

	JPanel tablePanel = new JPanel();
	tablePanel.setLayout(new GridLayout(1, 1));
	TableModel model = new NominalValueTableModel(listOfValues);
	ExtendedJTable dataTable = new ExtendedJTable(model, true);
	dataTable.setRowHighlighting(true);

	// change JTable settings
	dataTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
	dataTable.getColumnModel().getColumn(NominalValueTableModel.INDEX_INDEX).setPreferredWidth(10);

	// add to GUI
	JScrollPane scrollpane = new ExtendedJScrollPane(dataTable);
	scrollpane.setBorder(null);
	tablePanel.add(scrollpane);

	setDefaultSize(ButtonDialog.MESSAGE_EXTENDED);
	layoutDefault(tablePanel, makeCloseButton());
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:27,代码来源:NominalValueDialog.java

示例7: 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;
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:26,代码来源:ProcessBackgroundImageVisualizer.java

示例8: startVisualization

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
public void startVisualization(final Object objId) {
	remapIds();
	JDialog dialog = new ButtonDialog("example_visualizer_dialog", false,new Object[] {objId}) {
		private static final long serialVersionUID = 1L;
		{
			double idValue = Double.NaN;

			if (idAttribute.isNominal()) {
				idValue = objId instanceof String ? idAttribute.getMapping().mapString((String) objId) : (Double) objId;		
			} else {
				idValue = objId instanceof String ? Double.parseDouble((String)objId) : (Double) objId;	
			}

			Example example = exampleSet.getExampleFromId(idValue);

			JComponent main;
			if (example != null) {
				main = makeMainVisualizationComponent(example);					
			} else {
				main = new JLabel("No information available for object '" + objId + "'.");					
			}
			layoutDefault(main, NARROW, makeCloseButton());
		}			
	};
	dialog.setVisible(true);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:27,代码来源:ExampleVisualizer.java

示例9: getComponent

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
@Override
protected JComponent getComponent() {
	JPanel detectionPanel = new JPanel(ButtonDialog.createGridLayout(4, 2));
	detectionPanel.add(new JLabel("Guess the value types of all attributes"));
	detectionPanel.add(super.guessingButtonsPanel);
	detectionPanel.add(new JLabel("Decimal Character"));
	detectionPanel.add(decimalPointCharacterTextField);
	detectionPanel.add(groupNumbersBox);
	detectionPanel.add(groupingCharacterTextField);
	detectionPanel.add(new JLabel("Date Format"));
	detectionPanel.add(dateFormatTextField);
	detectionPanel.setBorder(ButtonDialog.createTitledBorder("Type Detection"));

	
	JPanel parsingPanel = new JPanel(ButtonDialog.createGridLayout(1, 2));
	parsingPanel.add(detectionPanel);

	JComponent editorPanel = super.getComponent();
	editorPanel.setBorder(null);

	JPanel panel = new JPanel(new BorderLayout(0, ButtonDialog.GAP));
	panel.add(parsingPanel, BorderLayout.NORTH);
	panel.add(editorPanel, BorderLayout.CENTER);
	return panel;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:26,代码来源:ParseValueTypesWizardStep.java

示例10: 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);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:20,代码来源:MacroEditor.java

示例11: 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);
    }

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:14,代码来源:CheckForJDBCDriversAction.java

示例12: makePanel

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
/**
 * Creates a panel containing a settings panel at the top, a preview table in the middle and an
 * error panel at the bottom.
 */
private void makePanel() {
	this.setLayout(new BorderLayout(0, ButtonDialog.GAP));
	this.add(makeSettingsPanel(), BorderLayout.NORTH);

	this.add(makePreviewTable(), BorderLayout.CENTER);

	this.add(collapsibleErrorTable, BorderLayout.SOUTH);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:13,代码来源:CSVFormatSpecificationPanel.java

示例13: build

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
/**
 * Builds and layouts the configured {@link ImportWizard} dialog.
 *
 * @param owner
 *            the dialog owner
 * @return the new {@link ImportWizard} instance
 */
public ImportWizard build(Window owner) {
	DataImportWizard wizard = new DataImportWizard(owner, ModalityType.DOCUMENT_MODAL, null);

	// add common steps
	TypeSelectionStep typeSelectionStep = new TypeSelectionStep(wizard);
	wizard.addStep(typeSelectionStep);
	wizard.addStep(new LocationSelectionStep(wizard));
	wizard.addStep(new StoreToRepositoryStep(wizard));
	wizard.addStep(new ConfigureDataStep(wizard));

	// check whether a local file data source was specified
	if (localFileDataSourceFactory != null) {
		setDataSource(wizard, localFileDataSourceFactory,
				localFileDataSourceFactory.createNew(wizard, filePath, fileDataSourceFactory));
	}

	// Start with type selection
	String startingStep = typeSelectionStep.getI18NKey();

	// unless another starting step ID is specified
	if (startingStepID != null) {
		startingStep = startingStepID;
	}

	wizard.layoutDefault(ButtonDialog.HUGE, startingStep);
	return wizard;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:35,代码来源:DataImportWizardBuilder.java

示例14: PrintAndExportDialog

import com.rapidminer.gui.tools.dialogs.ButtonDialog; //导入依赖的package包/类
public PrintAndExportDialog(List<PrintableComponent> components) {
	super(ApplicationFrame.getApplicationFrame(), "export_and_print", ModalityType.APPLICATION_MODAL, new Object[] {});
	this.components = components;
	this.previewPanels = new LinkedList<>();
	layoutDefault(createPreviewContent(), createButtonPanel(), ButtonDialog.LARGE);
	setResizable(false);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:8,代码来源:PrintAndExportDialog.java

示例15: 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.");

}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:12,代码来源:RMUrlHandler.java


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