本文整理汇总了Java中java.awt.Dialog.ModalityType.APPLICATION_MODAL属性的典型用法代码示例。如果您正苦于以下问题:Java ModalityType.APPLICATION_MODAL属性的具体用法?Java ModalityType.APPLICATION_MODAL怎么用?Java ModalityType.APPLICATION_MODAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.awt.Dialog.ModalityType
的用法示例。
在下文中一共展示了ModalityType.APPLICATION_MODAL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SQLQueryBuilder
public SQLQueryBuilder(Window owner, DatabaseHandler databaseHandler) {
super(owner, "build_sql_query", ModalityType.APPLICATION_MODAL, new Object[0]);
this.tableList = new JList(new DefaultListModel());
this.attributeList = new JList(new DefaultListModel());
this.whereTextArea = new JTextArea(4, 15);
this.sqlQueryTextArea = new SQLEditor();
this.surroundingDialog = null;
this.connectionStatus = new JLabel();
this.gridPanel = new JPanel(createGridLayout(1, 3));
this.attributeNameMap = new LinkedHashMap();
this.databaseHandler = databaseHandler;
this.cache = TableMetaDataCache.getInstance();
if(!"false".equals(ParameterService.getParameterValue("rapidminer.gui.fetch_data_base_table_names"))) {
try {
this.retrieveTableNames();
} catch (SQLException var4) {
SwingTools.showSimpleErrorMessage("db_connection_failed_simple", var4, new Object[0]);
this.databaseHandler = null;
}
}
}
示例2: showMacroEditorDialog
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: LicenseUpgradeDialog
public LicenseUpgradeDialog(ResourceAction action, boolean isDowngradeInformation, String key, boolean modal, boolean forceLicenseInstall, boolean useResourceAction, int size, Object... arguments) {
super(ApplicationFrame.getApplicationFrame(), key, modal?ModalityType.APPLICATION_MODAL:ModalityType.MODELESS, arguments);
this.setResizable(false);
this.action = action;
this.useResourceAction = useResourceAction;
if(arguments.length < 2) {
throw new IllegalArgumentException("You need to specify at least the name and the edition of the product that needs to be upgraded.");
} else {
this.setModal(modal);
this.productName = String.valueOf(arguments[0]);
this.productEdition = isDowngradeInformation?String.valueOf(arguments[2]):String.valueOf(arguments[1]);
this.layoutDefault(this.makeButtonPanel(), size, new AbstractButton[0]);
if(forceLicenseInstall) {
this.setDefaultCloseOperation(0);
}
}
}
示例4: showWhoIsDialog
/**
* Show a dialog with whois data for the given point
* @param parent
* @param whois
* @param point
*/
public static void showWhoIsDialog(final JComponent parent, final ServiceFactory services, final GeoPoint point) {
final WhoIsPanel panel = new WhoIsPanel(services);
final JDialog dialog = new JDialog(SwingUtilities.getWindowAncestor(parent), "Who is " + point.getIp(), ModalityType.APPLICATION_MODAL) {
private static final long serialVersionUID = 1258611715478157956L;
@Override
public void dispose() {
panel.dispose();
super.dispose();
}
};
dialog.getContentPane().add(panel, BorderLayout.CENTER);
final JPanel bottom = new JPanel();
final JButton close = new JButton(Resources.getLabel("close.button"));
close.addActionListener(e -> dialog.dispose());
bottom.add(close);
dialog.getContentPane().add(bottom, BorderLayout.SOUTH);
services.getWhois().whoIs(point.getIp());
SwingUtilities4.setUp(dialog);
dialog.setVisible(true);
}
示例5: ContentPaneBuilderUsingDialogConfiguration
public ContentPaneBuilderUsingDialogConfiguration(
final IPreferences preferences,
final IMessage message,
final IContentPaneBuilder contentPaneBuilder,
final DialogType dialogType) {
super(
preferences,
true,
message,
net.anwiba.commons.swing.icon.GuiIcons.EMPTY_ICON,
DataState.UNKNOWN,
ModalityType.APPLICATION_MODAL,
dialogType,
true,
new ObjectModel<Void>());
this.contentPaneBuilder = contentPaneBuilder;
}
示例6: layoutDialog
protected void layoutDialog() {
Dialog.getInstance().initLaf();
ModalityType modality = this.getModalityType();
if (this.isCallerIsEDT()) {
modality = ModalityType.APPLICATION_MODAL;
}
this.dialog = new InternDialog<T>(this, modality);
if (this.preferredSize != null) {
this.dialog.setPreferredSize(this.preferredSize);
}
this.timerLbl = new JLabel(TimeFormatter.formatMilliSeconds(this.getCountdown(), 0));
this.timerLbl.setEnabled(this.isCountdownPausable());
}
示例7: actionEvent
@Override
public void actionEvent(ActionEvent e)
{
final FilterDialog dlg = new FilterDialog(null, ModalityType.APPLICATION_MODAL);
dlg.setFilter(filter);
dlg.setVisible(true);
if (dlg.isAccepted())
{
filteredModel.update();
try
{
filter.toConfig(Config.getInstance(), configPrefix + "filter");
Config.getInstance().save();
}
catch (Exception ex)
{
Dialogs.showExceptionDialog(ex, I18n.getMessage("Error.saveFilter"));
}
}
filterButton.setSelected(filter.isEnabled());
}
示例8: OnboardingDialog
public OnboardingDialog(WelcomeType welcomeType) {
super(ApplicationFrame.getApplicationFrame(), "onboarding", ModalityType.APPLICATION_MODAL, new Object[0]);
this.sharedObjects = new HashedMap();
this.cardPool = new HashedMap();
this.welcomeType = WelcomeType.FIRST_WELCOME;
this.reminderType = ReminderType.REMINDER;
this.welcomeType = welcomeType;
this.initGUI();
}
示例9: LicenseEnteringDialog
public LicenseEnteringDialog(Window owner, String key, Object... arguments) {
super(owner, key, ModalityType.APPLICATION_MODAL, arguments);
this.textArea = new JTextArea();
this.statusLabel = new JLabel();
this.startDateLabel = new JLabel();
this.expirationDateLabel = new JLabel();
this.registeredToLabel = new JLabel();
this.productLabel = new JLabel();
this.editionLabel = new JLabel();
this.parseError = true;
if(arguments.length > 0) {
this.productName = String.valueOf(arguments[0]);
}
this.mainPanel = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = 1;
c.gridx = 0;
c.gridy = 0;
this.detailsPanel = this.makeDetailsPanel();
this.mainPanel.add(this.detailsPanel, c);
this.textPane = this.makeTextPane("");
c.gridy = 1;
c.insets = new Insets(10, 0, 0, 0);
this.mainPanel.add(this.textPane, c);
this.installButton = this.makeInstallButton();
PromptSupport.setForeground(Color.GRAY, this.textArea);
PromptSupport.setPrompt(I18N.getGUILabel("license.paste_here", new Object[0]), this.textArea);
PromptSupport.setFontStyle(Integer.valueOf(2), this.textArea);
PromptSupport.setFocusBehavior(FocusBehavior.SHOW_PROMPT, this.textArea);
this.textArea.setText(this.getLicenseKeyFromClipboard());
this.setValuesForDetailsPanel();
this.layoutDefault(this.mainPanel, this.makeButtonPanel());
this.setResizable(false);
}
示例10: LicenseDialog
public LicenseDialog(Object... arguments) {
super(ApplicationFrame.getApplicationFrame(), "license_dialog", ModalityType.APPLICATION_MODAL, arguments);
this.addWindowListener(this.windowListener);
ProductConstraintManager.INSTANCE.registerLicenseManagerListener(this.licenseManagerListener);
this.activeLicenses = LicenseManagerRegistry.INSTANCE.get().getAllActiveLicenses();
this.setResizable(false);
this.setLayout(new BorderLayout());
this.contentPanel = new LicenseContentPanel(this.activeLicenses);
this.contentPanel.addHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent event) {
if(event.getEventType() == EventType.ACTIVATED && event.getURL() != null) {
try {
RMUrlHandler.browse(event.getURL().toURI());
} catch (IOException | URISyntaxException var3) {
LicenseDialog.LOGGER.log(Level.SEVERE, "Failed to parse URL for My Account page.", var3);
}
}
}
});
final JScrollPane scrollPane = new JScrollPane();
scrollPane.setPreferredSize(this.contentPanel.getPreferredSize());
scrollPane.getViewport().add(this.contentPanel);
this.add(scrollPane, "Center");
SwingUtilities.invokeLater(new Runnable() {
public void run() {
scrollPane.getVerticalScrollBar().setValue(0);
}
});
JPanel buttonPanel = this.makeButtonPanel();
buttonPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.DARK_GRAY));
this.add(buttonPanel, "South");
this.pack();
this.setLocationRelativeTo(RapidMinerGUI.getMainFrame());
}
示例11: startEditorDialog
public static void startEditorDialog(JComponent comp, String title, KdxPreference<?> pref) {
KdxplorePreferenceEditor editor = new KdxplorePreferenceEditor(title);
editor.preferenceTreePanel.setInitialPreference(pref);
JDialog dlg = new JDialog(GuiUtil.getOwnerWindow(comp),
title, ModalityType.APPLICATION_MODAL);
dlg.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dlg.setContentPane(editor.getJPanel());
dlg.pack();
dlg.setVisible(true);
}
示例12: FieldDimensionsDialog
FieldDimensionsDialog(Window owner, String title){
super(owner, title, ModalityType.APPLICATION_MODAL);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setContentPane(new JLabel("<HTML>Will prompt for"
+ "<br>Inter-row Spacing"
+ "<br>Row Length"
+ "<br>Alley Length"
));
pack();
}
示例13: onSettingsMenu
public void onSettingsMenu() {
JDialog dialog = new JDialog(SolrMeterMain.mainFrame, I18n.get("menu.edit.settings"), ModalityType.APPLICATION_MODAL);
dialog.setContentPane(new SettingsPanelContainer(dialog, this.isSettingsEditable(), repository));
dialog.setSize(new Dimension(700, 400));
SwingUtils.centerWindow(dialog);
dialog.setVisible(true);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
}
示例14: onExtractMenu
public void onExtractMenu() {
JDialog dialog = new JDialog(SolrMeterMain.mainFrame, I18n.get("menu.tools.extract"), ModalityType.APPLICATION_MODAL);
dialog.setSize(new Dimension(400, 220));
dialog.setContentPane(new ExtractFromLogFilePanelContainer(dialog));
SwingUtils.centerWindow(dialog);
dialog.setVisible(true);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
}
示例15: initUI
private void initUI() {
List<Image> frameIcons = IconCache.getInstance().getIconImageList(
"fixprotocol", 16, 24, 32, 48);
pnlFixMessageTextArea = new FIXMessageTextAreaPanel();
pnlFixMsgTable = new FIXFieldTablePanel();
pnlFixMessageTextArea.addFIXMessageListener(pnlFixMsgTable);
// fixMsgListPanel = new FIXMessageListPanel();
// fixMsgListPanel.addListSelectionListener(new SelectionListener());
// pnlFixMessageTextArea.addFIXMessageListener(fixMsgListPanel);
fixMessageMetaTablePanel = new FIXMessageMetaTablePanel();
fixMessageMetaTablePanel.addListSelectionListener(new SelectionListener());
pnlFixMessageTextArea.addFIXMessageListener(fixMessageMetaTablePanel);
splitPaneListTbl = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
true, pnlFixMessageTextArea, pnlFixMsgTable);
splitPaneMain = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
true, fixMessageMetaTablePanel, splitPaneListTbl);
Window ancestor = SwingUtilities.getWindowAncestor(this);
dictionariesDialog = new DataDictionaryFileDialog(ancestor,
"Data Dictionaries", ModalityType.APPLICATION_MODAL);
dictionariesDialog.addDataDictionaryListener(this);
dictionariesDialog.setIconImages(frameIcons);
dictionariesDialog.setSize(640, 320);
dictionariesDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
JToolBar toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.add(new SetDataDictionaryAction());
setLayout(new BorderLayout());
add(splitPaneMain);
add(toolBar, BorderLayout.NORTH);
}