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;
}
}
}
项目:rapidminer
文件:MacroEditor.java
public static void showMacroEditorDialog(final ProcessContext context) {
ButtonDialog dialog = new ButtonDialog(ApplicationFrame.getApplicationFrame(),"define_macros",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);
}
项目:rapidminer
文件:LicenseUpgradeDialog.java
public LicenseUpgradeDialog(ResourceAction action,boolean isDowngrade@R_171_4045@ion,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 = isDowngrade@R_171_4045@ion?String.valueOf(arguments[2]):String.valueOf(arguments[1]);
this.layoutDefault(this.makeButtonPanel(),size,new AbstractButton[0]);
if(forceLicenseInstall) {
this.setDefaultCloSEOperation(0);
}
}
}
项目:openvisualtraceroute
文件:WhoIsPanel.java
/**
* 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);
}
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,dialogType,new ObjectModel<Void>());
this.contentPaneBuilder = contentPaneBuilder;
}
项目:kdxplore
文件:HelpUtils.java
static public jdialog getHelpDialog(
Window owner,String title,Class<?> resourceClass,String resourceName)
{
jdialog helpDialog = new jdialog(owner,title,ModalityType.MODELESS);
helpDialog.setDefaultCloSEOperation(jdialog.disPOSE_ON_CLOSE);
String helpText = getHelpText(resourceClass,resourceName);
JLabel label = new JLabel(helpText);
label.setBackground(PALE_YELLOW);
label.setopaque(true);
JScrollPane contentPane = new JScrollPane(label);
contentPane.setBorder(
BorderFactory.createCompoundBorder(new LineBorder(Color.BLUE),new EmptyBorder(4,4,4)));
helpDialog.setContentPane(contentPane);
helpDialog.pack();
return helpDialog;
}
项目:AlphaHearth
文件:PlayerPanel.java
private void openHeroEditor(HearthStoneDb db) {
if (uiAgent == null) {
return;
}
HeroEditorPanel panel = new HeroEditorPanel(db,uiAgent);
Window parent = SwingUtilities.getwindowAncestor(this);
jdialog mainFrame = new jdialog(parent,"Hero Editor",ModalityType.DOCUMENT_MODAL);
mainFrame.getContentPane().setLayout(new GridLayout(1,1));
mainFrame.getContentPane().add(panel);
mainFrame.pack();
mainFrame.setLocationRelativeto(null);
mainFrame.setDefaultCloSEOperation(WindowConstants.disPOSE_ON_CLOSE);
mainFrame.setVisible(true);
}
项目:UtilsPlus
文件:PLoadingScreen.java
/**
* Setting up the user interface
*/
private void initUI() {
pb = new JProgressBar(JProgressBar.HORIZONTAL,value,maxValue == -1 ? 0 : maxValue);
pb.setStringPainted(Boolean.TRUE);
pb.setIndeterminate(indeterminate);
dialog = new jdialog();
dialog.setTitle(title);
dialog.setModalityType(ModalityType.MODELESS);
dialog.setIconImage(null);
dialog.setDefaultCloSEOperation(jdialog.disPOSE_ON_CLOSE);
dialog.add(pb);
dialog.setSize(this.width,this.height);
dialog.setLocationRelativeto(null);
dialog.setVisible(Boolean.TRUE);
animationThread().start();
}
public static void showMacroEditorDialog(final ProcessContext context) {
ButtonDialog dialog = new ButtonDialog(ApplicationFrame.getApplicationFrame(),makeOkButton());
}
@Override
protected void ok() {
super.ok();
}
};
dialog.setVisible(true);
}
项目:moebooru-viewer
文件:MoebooruViewer.java
public void showPostById(int id,java.awt.Component dialogParent){
JOptionPane optionPane = new JOptionPane(Localization.format("retrieval_format",String.valueOf(id)),JOptionPane.@R_171_4045@ION_MESSAGE);
JButton button = new JButton(Localization.getString("cancel"));
optionPane.setoptions(new Object[]{button});
jdialog dialog = optionPane.createDialog(dialogParent,Localization.getString("retrieving"));
button.addActionListener(event -> dialog.dispose());
dialog.setModalityType(ModalityType.MODELESS);
dialog.setVisible(true);
executor.execute(() -> {
List<Post> searchPosts = mapi.listPosts(1,1,"id:" + id);
SwingUtilities.invokelater(() -> {
if (dialog.isdisplayable()){
dialog.dispose();
if (!searchPosts.isEmpty()){
showPostFrame.showPost(searchPosts.get(0));
}else{
JOptionPane.showMessageDialog(null,Localization.getString("id_doesnot_exists"),Localization.getString("error"),JOptionPane.ERROR_MESSAGE);
}
}
});
});
}
项目:icedtea-web
文件:TemporaryPermissionsButton.java
@Override
public void actionPerformed(final ActionEvent e) {
final String rawFilepath = PathsAndFiles.JAVA_POLICY.getFullPath();
String filepath;
try {
filepath = new URL(rawFilepath).getPath();
} catch (final MalformedURLException mfue) {
filepath = null;
}
if (policyEditorWindow == null || policyEditorWindow.getPolicyEditor().isClosed()) {
policyEditorWindow = PolicyEditor.getPolicyEditorDialog(filepath);
policyEditorWindow.getPolicyEditor().openPolicyFileSynchronously();
} else {
policyEditorWindow.asWindow().toFront();
policyEditorWindow.asWindow().repaint();
}
policyEditorWindow.setModalityType(ModalityType.DOCUMENT_MODAL);
policyEditorWindow.getPolicyEditor().addNewEntry(new PolicyIdentifier(null,Collections.<PolicyParser.PrincipalEntry>emptySet(),file.getCodeBase().toString()));
policyEditorWindow.asWindow().setVisible(true);
menu.setVisible(false);
}
项目:AppWoksUtils
文件:AbstractDialog.java
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());
}
项目:MediaMatrix
文件:MediaInspectorPanel.java
private void separatetoggleButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FirsT:event_separatetoggleButtonActionPerformed
if (separatetoggleButton.isSelected()) {
lensDialog = new jdialog(SwingUtilities.getwindowAncestor(this),ModalityType.MODELESS);
lensDialog.setTitle("Lens");
contentSplitPane.remove(lensPanel);
lensDialog.getContentPane().setLayout(new BorderLayout());
lensDialog.getContentPane().add(lensPanel,BorderLayout.CENTER);
lensDialog.setSize(400,400);
lensDialog.setLocationRelativeto(null);
lensDialog.setVisible(true);
} else {
lensDialog.getContentPane().remove(lensPanel);
lensDialog.dispose();
contentSplitPane.setBottomComponent(lensPanel);
}
}
项目:librairie
文件:DialogGenre.java
private void build() {
this.setDefaultCloSEOperation(JFrame.DO_nothing_ON_CLOSE);
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e){
dialog.dispose();
}
});
session = HibernateUtil.instance().openSession();
this.setModalityType(ModalityType.TOOLKIT_MODAL);
this.pack();
this.setLocationRelativeto(null);
this.setVisible(true);
}
项目:RipplePower
文件:SwingUtils.java
static public jdialog addModelessWindow(Window mainWindow,Component jpanel,String title) {
jdialog dialog;
if (mainWindow != null) {
dialog = new jdialog(mainWindow,title);
} else {
dialog = new jdialog();
dialog.setTitle(title);
}
dialog.getContentPane().setLayout(new BorderLayout());
dialog.getContentPane().add(jpanel,BorderLayout.CENTER);
dialog.setDefaultCloSEOperation(jdialog.disPOSE_ON_CLOSE);
dialog.pack();
dialog.setLocationRelativeto(mainWindow);
dialog.setModalityType(ModalityType.MODELESS);
dialog.setSize(jpanel.getPreferredSize());
dialog.setVisible(true);
return dialog;
}
项目:Scratch-ApuC
文件:SavePanel.java
public static File showDialog(boolean sb2,boolean apuc,boolean save) {
loading.setLocationRelativeto(IdeFrame.instance);
loading.setVisible(true);
loading.paint(loading.getGraphics()); // so much hax
// too lazy to get this off the EDT
jdialog d = new jdialog();
d.setModalityType(ModalityType.APPLICATION_MODAL);
SavePanel p = new SavePanel(sb2,save,apuc,d);
d.setContentPane(new JPanel(new BorderLayout()));
d.getContentPane().add(p,BorderLayout.CENTER);
d.pack();
d.setLocationRelativeto(p);
loading.setVisible(false);
d.setVisible(true);
return p.selected;
}
项目:tools-libraries
文件:BusMonitorPanel.java
@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());
}
@Override
public double[] doaifCalculation() {
aif.manager.setName("aif ROIs");
aif.manager.setVisible(true);
JOptionPane jo = new JOptionPane(
"Have you selected your own ROIs?\nSelect the ROIs you want to use"
+ " and click OK",JOptionPane.QUESTION_MESSAGE,JOptionPane.YES_NO_OPTION,null);
jo.setEnabled(true);
jdialog dialog2 = jo.createDialog("aif Validation");
dialog2.setModalityType(ModalityType.DOCUMENT_MODAL);
dialog2.setVisible(true);
return Mathaif.getaif(voxelsROI(voxels),true);
}
项目:rapidminer
文件:CheckForJDBCDriversAction.java
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);
}
}
/**
* 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;
}
项目:rapidminer
文件:OnboardingDialog.java
public OnboardingDialog(WelcomeType welcomeType) {
super(ApplicationFrame.getApplicationFrame(),"onboarding",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();
}
项目:rapidminer
文件:OnboardingDialog.java
public OnboardingDialog(ReminderType reminderType) {
super(ApplicationFrame.getApplicationFrame(),new Object[0]);
this.sharedobjects = new HashedMap();
this.cardPool = new HashedMap();
this.welcomeType = WelcomeType.FirsT_WELCOME;
this.reminderType = ReminderType.REMINDER;
this.welcomeType = WelcomeType.WELCOME_REMINDER;
this.reminderType = reminderType;
this.initGUI();
}
项目:rapidminer
文件:LicenseEnteringDialog.java
public LicenseEnteringDialog(Window owner,Object... arguments) {
super(owner,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);
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);
}
项目:rapidminer
文件:LicenseDialog.java
public LicenseDialog(Object... arguments) {
super(ApplicationFrame.getApplicationFrame(),"license_dialog",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,Color.DARK_GRAY));
this.add(buttonPanel,"South");
this.pack();
this.setLocationRelativeto(rapidminerGUI.getMainFrame());
}
项目:rapidminer
文件:PendingPurchasesInstallationDialog.java
public PendingPurchasesInstallationDialog(List<String> packages) {
super(ApplicationFrame.getApplicationFrame(),"purchased_not_installed",ModalityType.MODELESS,new Object[0]);
this.purchasedModel = new PendingPurchasesInstallationDialog.PurchasednotinstalledModel(this.packageDescriptorCache);
this.neverAskAgain = new JCheckBox(I18N.getMessage(I18N.getGUIBundle(),"gui.dialog.purchased_not_installed.not_check_on_startup",new Object[0]));
this.packages = packages;
this.remindNeverButton = this.remindNeverButton();
this.remindLaterButton = this.remindLaterButton();
this.okButton = this.makeOkButton("install_purchased");
this.layoutDefault(this.makeContentPanel(),new AbstractButton[]{this.okButton,this.remindNeverButton,this.remindLaterButton});
this.setPreferredSize(new Dimension(404,430));
this.setMaximumSize(new Dimension(404,430));
this.setMinimumSize(new Dimension(404,300));
this.setSize(new Dimension(404,430));
}
项目:KernelHive
文件:Wizard.java
项目:KernelHive
文件:Wizard.java
项目:4Space-5
文件:DepLoader.java
@Override
public jdialog makeDialog() {
if (container != null)
return container;
setMessageType(JOptionPane.@R_171_4045@ION_MESSAGE);
setMessage(makeProgresspanel());
setoptions(new Object[]{"Stop"});
addPropertychangelistener(new Propertychangelistener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getSource() == Downloader.this && evt.getPropertyName() == VALUE_PROPERTY) {
requestClose("This will stop minecraft from launching\nAre you sure you want to do this?");
}
}
});
container = new jdialog(null,"Hello",ModalityType.MODELESS);
container.setResizable(false);
container.setLocationRelativeto(null);
container.add(this);
this.updateUI();
container.pack();
container.setMinimumSize(container.getPreferredSize());
container.setVisible(true);
container.setDefaultCloSEOperation(WindowConstants.DO_nothing_ON_CLOSE);
container.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
requestClose("Closing this window will stop minecraft from launching\nAre you sure you wish to do this?");
}
});
return container;
}
public AbstractDialogConfiguration(
final IPreferences preferences,final Dimension preferdSize,final boolean isMessagePanelEnabled,final String title,final IGuiIcon icon,final IGuiIcon image,final ModalityType modality,final DialogType dialogType,final IFunction<String,String,RuntimeException> actionButtonTextFactory,final boolean isResizeable,final int dialogCloseKeyEvent,final List<IAdditionalActionFactory> additionalActionFactories) {
this.preferdSize = preferdSize;
this.title = title;
this.image = image;
this.actionButtonTextFactory = actionButtonTextFactory;
this.dialogCloseKeyEvent = dialogCloseKeyEvent;
this.additionalActionFactories.addAll(additionalActionFactories);
this.windowPreferences = new WindowPreferences(preferences.node(PREFERENCE_NODE_NAME));
this.message = message;
this.icon = icon;
this.modality = modality;
this.dialogType = dialogType;
this.isMessagePanelEnabled = isMessagePanelEnabled;
this.isResizeable = isResizeable;
}
public DialogConfiguration(
final IPreferences preferences,final List<IAdditionalActionFactory> additionalActionFactories,final IContentPaneBuilder contentPaneBuilder) {
super(
preferences,preferdSize,isMessagePanelEnabled,icon,image,modality,actionButtonTextFactory,isResizeable,dialogCloseKeyEvent,additionalActionFactories);
this.contentPaneBuilder = contentPaneBuilder;
}
public AbstractContentPaneBuilderUsingDialogConfiguration(
final IPreferences preferences,final DataState dataState,final IObjectModel<T> model) {
super(
preferences,null,message.getText(),s -> s,KeyEvent.KEY_LOCATION_UNKNowN,new ArrayList<>());
this.preferences = preferences;
this.dataState = dataState;
this.model = model;
}
项目:CodeChickenCore
文件:DepLoader.java
@Override
public jdialog makeDialog() {
if (container != null) {
return container;
}
setMessageType(JOptionPane.@R_171_4045@ION_MESSAGE);
setMessage(makeProgresspanel());
setoptions(new Object[] { "Stop" });
addPropertychangelistener(new Propertychangelistener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getSource() == Downloader.this && evt.getPropertyName() == VALUE_PROPERTY) {
requestClose("This will stop minecraft from launching\nAre you sure you want to do this?");
}
}
});
container = new jdialog(null,ModalityType.MODELESS);
container.setResizable(false);
container.setLocationRelativeto(null);
container.add(this);
this.updateUI();
container.pack();
container.setMinimumSize(container.getPreferredSize());
container.setVisible(true);
container.setDefaultCloSEOperation(WindowConstants.DO_nothing_ON_CLOSE);
container.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
requestClose("Closing this window will stop minecraft from launching\nAre you sure you wish to do this?");
}
});
return container;
}
项目:workcraft
文件:PresetManagerPanel.java
@SuppressWarnings("unchecked")
public void managePresets() {
Preset<T> selected = (Preset<T>) presetCombo.getSelectedItem();
PresetManagerDialog<T> dlg = new PresetManagerDialog<>(dialogowner,presetManager);
dlg.setModalityType(ModalityType.APPLICATION_MODAL);
GUI.centerandSizetoParent(dlg,dialogowner);
dlg.setVisible(true);
presetCombo.removeAllItems();
List<Preset<T>> presets = presetManager.list();
boolean haveOldSelection = false;
for (Preset<T> p : presets) {
presetCombo.addItem(p);
if (p == selected) {
haveOldSelection = true;
}
}
if (haveOldSelection) {
presetCombo.setSelectedItem(selected);
} else {
presetCombo.setSelectedindex(0);
}
}
项目:cmanager
文件:MainWindow.java
private void openLocationDialog(Geocache g)
{
LocationDialog ld = new LocationDialog(this);
if (g != null)
ld.setGeocache(g);
ld.setLocationRelativeto(THIS);
ld.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
ld.setVisible(true);
if (ld.modified)
{
updateLocationComboBox();
propagateSelectedLocationComboBoxEntry();
}
}
项目:cmanager
文件:MainWindow.java
public static void actionWithWaitDialog(final Runnable task,Component parent)
{
final WaitDialog wait = new WaitDialog();
;
wait.setModalityType(ModalityType.APPLICATION_MODAL);
wait.setLocationRelativeto(parent);
new Thread(new Runnable() {
public void run()
{
while (!wait.isVisible())
{
try
{
Thread.sleep(25);
}
catch (InterruptedException e)
{
}
}
task.run();
wait.setVisible(false);
}
}).start();
wait.setVisible(true);
wait.repaint();
}
项目:kdxplore
文件:KdxplorePreferenceEditor.java
public static void startEditorDialog(JComponent comp,KdxPreference<?> pref) {
KdxplorePreferenceEditor editor = new KdxplorePreferenceEditor(title);
editor.preferenceTreePanel.setinitialPreference(pref);
jdialog dlg = new jdialog(GuiUtil.getownerWindow(comp),ModalityType.APPLICATION_MODAL);
dlg.setDefaultCloSEOperation(jdialog.disPOSE_ON_CLOSE);
dlg.setContentPane(editor.getJPanel());
dlg.pack();
dlg.setVisible(true);
}
项目:kdxplore
文件:FieldDimensionsDialog.java
项目:geoxygene
文件:MessageConsole.java
/**
* expanded dialog is used to keep the expanded panel on top of all other
* windows
*
* @return the expanded dialog containing the expanded panel
*/
private jdialog getExpandedDialog() {
if (this.expandedDialog == null) {
this.expandedDialog = new jdialog(
SwingUtilities.getwindowAncestor(this.getGui()),"expanded message console");
this.expandedDialog.add(new JScrollPane(this.getExpandedPanel()));
this.expandedDialog.setModalityType(ModalityType.MODELESS);
this.expandedDialog.setUndecorated(true);
this.expandedDialog.setResizable(true);
this.expandedDialog.addWindowFocusListener(this);
Toolkit.getDefaultToolkit().addAWTEventListener(
new AWTEventListener() {
@Override
public void eventdispatched(AWTEvent event) {
MouseEvent me = (MouseEvent) event;
Component mouseComponent = me.getComponent();
if (mouseComponent == MessageConsole.this.getExpandedDialog()) {
if (me.getID() == MouseEvent.MOUSE_EXITED) {
MessageConsole.this
.requestCloseExpandedDialog();
}
}
}
},AWTEvent.MOUSE_EVENT_MASK);
this.expandedDialog.pack();
}
return this.expandedDialog;
}
项目:geoxygene
文件:TaskManagerPopup.java
/**
* expanded dialog is used to keep the expanded panel on top of all other
* windows
*
* @return the expanded dialog containing the expanded panel
*/
private jdialog getExpandedDialog() {
if (this.expandedDialog == null) {
this.expandedDialog = new jdialog(
SwingUtilities.getwindowAncestor(this.getGui()),"expanded task visualizer");
this.expandedDialog.add(this.getExpandedPanel());
this.expandedDialog.setModalityType(ModalityType.MODELESS);
this.expandedDialog.setUndecorated(true);
}
return this.expandedDialog;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。