本文整理匯總了Java中org.openide.NotifyDescriptor.PLAIN_MESSAGE屬性的典型用法代碼示例。如果您正苦於以下問題:Java NotifyDescriptor.PLAIN_MESSAGE屬性的具體用法?Java NotifyDescriptor.PLAIN_MESSAGE怎麽用?Java NotifyDescriptor.PLAIN_MESSAGE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.openide.NotifyDescriptor
的用法示例。
在下文中一共展示了NotifyDescriptor.PLAIN_MESSAGE屬性的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: btnAddMimeActionPerformed
private void btnAddMimeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddMimeActionPerformed
List<MimeIdentifier> allMimeItems = loadMimeTypes();
allMimeItems.removeAll(mimeIdentifiers);
IdentifierPickerPanel picker = new IdentifierPickerPanel(allMimeItems, extensionIdentifiers);
final NotifyDescriptor extensionDialog = new NotifyDescriptor(
picker,
NbBundle.getMessage(ToDoCustomizer.class, "LBL_PickMime"), //NOI18N
NotifyDescriptor.OK_CANCEL_OPTION,
NotifyDescriptor.PLAIN_MESSAGE,
null,
NotifyDescriptor.OK_OPTION);
picker.addValidityListener(extensionDialog);
if (DialogDisplayer.getDefault().notify(extensionDialog) == NotifyDescriptor.OK_OPTION) {
addSelectedToModel(picker.getSelectedMimeTypes());
}
}
示例2: showCategoryNameDialog
private boolean showCategoryNameDialog(CategoryNamePanel panel, String message) {
categoryNameDialog = new NotifyDescriptor(
panel,
message,
NotifyDescriptor.OK_CANCEL_OPTION,
NotifyDescriptor.PLAIN_MESSAGE,
null,
NotifyDescriptor.OK_OPTION);
categoryNameDialog.setValid(false);
if (categoryNameListener == null) {
categoryNameListener = new CategoryNameDocumentListener();
}
panel.addDocumentListener(categoryNameListener);
boolean confirm = DialogDisplayer.getDefault().notify(categoryNameDialog) == NotifyDescriptor.OK_OPTION;
panel.removeDocumentListener(categoryNameListener);
return confirm;
}
示例3: addURL
private void addURL(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addURL
final NotifyDescriptor.InputLine nd = new NotifyDescriptor.InputLine(
NbBundle.getMessage(SelectRootsPanel.class,"TXT_RemoteJavadoc"),
NbBundle.getMessage(SelectRootsPanel.class,"TXT_RemoteJavadoc_Title"),
NotifyDescriptor.OK_CANCEL_OPTION,
NotifyDescriptor.PLAIN_MESSAGE);
if (DialogDisplayer.getDefault().notify(nd) == NotifyDescriptor.OK_OPTION) {
final String inputText = nd.getInputText();
final DefaultListModel<URI> lm = (DefaultListModel<URI>) sources.getModel();
final Set<URI> contained = new HashSet<>(Collections.list(lm.elements()));
int index = sources.getSelectedIndex();
index = index < 0 ? lm.getSize() : index + 1;
try {
URI uri = new URI(inputText);
if (!contained.contains(uri)) {
lm.add(index, uri);
select(Collections.<Integer>singleton(index));
index++;
}
} catch (URISyntaxException ex) {
DialogDisplayer.getDefault().notify(
new NotifyDescriptor.Message(
NbBundle.getMessage(SelectRootsPanel.class, "TXT_InvalidRoot", inputText),
NotifyDescriptor.ERROR_MESSAGE));
}
}
}
示例4: actionPerformed
@Override
@Messages("HINT_Build_WithDependencies=<html><h2>Please note:</h2>Build with Dependencies delegates to the action of the same name and performs it before the current action is performed.<p> The Build with Dependencies action relies on Maven's --project-list and --also-make switches to perform its duties.")
public void actionPerformed(ActionEvent e) {
MappingWrapper map = (MappingWrapper)lstMappings.getSelectedValue();
if (map != null) {
if (!map.isUserDefined()) {
NetbeansActionMapping mapping = map.getMapping();
if (mapping == null) {
mapping = new NetbeansActionMapping();
mapping.setActionName(map.getActionName());
}
getActionMappings().addAction(mapping);
map.setUserDefined(true);
updateColor(map);
}
if (cbBuildWithDeps.isSelected()) {
if (!shown && DontShowAgainSettings.getDefault().showWarningAboutBuildWithDependencies()) {
WarnPanel panel = new WarnPanel(HINT_Build_WithDependencies());
NotifyDescriptor dd = new NotifyDescriptor.Message(panel, NotifyDescriptor.PLAIN_MESSAGE);
DialogDisplayer.getDefault().notify(dd);
if (panel.disabledWarning()) {
DontShowAgainSettings.getDefault().dontShowWarningAboutBuildWithDependenciesAnymore();
}
shown = true;
}
map.getMapping().setPreAction(ActionProviderImpl.BUILD_WITH_DEPENDENCIES);
} else {
map.getMapping().setPreAction(null);
}
if (handle != null) {
handle.markAsModified(getActionMappings());
}
}
}
示例5: getMessageTypeDescription
private static String getMessageTypeDescription(int messageType) {
switch(messageType) {
case NotifyDescriptor.ERROR_MESSAGE:
return NbBundle.getBundle(NbPresenter.class).getString("ACSD_ErrorMessage"); // NOI18N
case NotifyDescriptor.WARNING_MESSAGE:
return NbBundle.getBundle(NbPresenter.class).getString("ACSD_WarningMessage"); // NOI18N
case NotifyDescriptor.QUESTION_MESSAGE:
return NbBundle.getBundle(NbPresenter.class).getString("ACSD_QuestionMessage"); // NOI18N
case NotifyDescriptor.INFORMATION_MESSAGE:
return NbBundle.getBundle(NbPresenter.class).getString("ACSD_InformationMessage"); // NOI18N
case NotifyDescriptor.PLAIN_MESSAGE:
return NbBundle.getBundle(NbPresenter.class).getString("ACSD_PlainMessage"); // NOI18N
}
return ""; // NOI18N
}
示例6: reportInvalidUrl
private void reportInvalidUrl( String location, Throwable ex ) {
if( null != ex ) {
Logger.getLogger( WebBrowserImpl.class.getName() ).log( Level.INFO, null, ex );
}
NotifyDescriptor nd = new NotifyDescriptor.Message(
NbBundle.getMessage( WebBrowserImpl.class, "Err_InvalidURL", location),
NotifyDescriptor.PLAIN_MESSAGE );
DialogDisplayer.getDefault().notifyLater( nd );
}
示例7: actionPerformed
@Override
public void actionPerformed(ActionEvent e) {
SortPanel panel = new SortPanel();
NotifyDescriptor categoryNameDialog = new NotifyDescriptor(
panel,
NbBundle.getMessage(Actions.class, "MSG_SortDialog"),
NotifyDescriptor.OK_CANCEL_OPTION,
NotifyDescriptor.PLAIN_MESSAGE,
null,
NotifyDescriptor.OK_OPTION);
if (DialogDisplayer.getDefault().notify(categoryNameDialog) == NotifyDescriptor.OK_OPTION) {
panel.saveAttributes();
}
}
示例8: addTask
public void addTask(TaskNode... taskNodes) {
final CategoryPicker picker = new CategoryPicker(taskNodes);
final NotifyDescriptor nd = new NotifyDescriptor(
picker,
NbBundle.getMessage(DashboardTopComponent.class, "LBL_AddTaskToCat"), //NOI18N
NotifyDescriptor.OK_CANCEL_OPTION,
NotifyDescriptor.PLAIN_MESSAGE,
null,
NotifyDescriptor.OK_OPTION);
picker.setCategoryListener(new CategoryPicker.CategoryComboListener() {
@Override
public void comboItemsChanged(boolean categoryAvailable) {
nd.setValid(categoryAvailable);
}
});
nd.setValid(false);
if (DialogDisplayer.getDefault().notify(nd) == NotifyDescriptor.OK_OPTION) {
Category category = picker.getChosenCategory();
dashboard.addTaskToCategory(category, taskNodes);
if(!openedByUserAction && !isOpened()) {
openedByUserAction = true;
activate();
}
}
}
示例9: quickSearchTask
public static void quickSearchTask(RepositoryImpl repositoryImpl) {
JButton open = new JButton(NbBundle.getMessage(DashboardTopComponent.class, "OPTION_Open"));
open.setEnabled(false);
JButton cancel = new JButton(NbBundle.getMessage(DashboardTopComponent.class, "OPTION_Cancel"));
QuickSearchPanel quickSearchPanel = new QuickSearchPanel(repositoryImpl);
NotifyDescriptor quickSearchDialog = new NotifyDescriptor(
quickSearchPanel,
NbBundle.getMessage(DashboardTopComponent.class, "LBL_QuickTitle", repositoryImpl.getDisplayName()), //NOI18N
NotifyDescriptor.OK_CANCEL_OPTION,
NotifyDescriptor.PLAIN_MESSAGE,
new Object[]{open, cancel},
open);
quickSearchDialog.setValid(false);
QuickSearchListener quickSearchListener = new QuickSearchListener(quickSearchPanel, open);
quickSearchPanel.addQuickSearchListener(quickSearchListener);
Object result = DialogDisplayer.getDefault().notify(quickSearchDialog);
if (result == open) {
IssueImpl issueImpl = quickSearchPanel.getSelectedTask();
IssueAction.openIssue(issueImpl.getRepositoryImpl(), issueImpl.getID());
Category selectedCategory = quickSearchPanel.getSelectedCategory();
if (selectedCategory != null) {
DashboardViewer.getInstance().addTaskToCategory(selectedCategory, new TaskNode(issueImpl, null));
}
}
quickSearchPanel.removeQuickSearchListener(quickSearchListener);
}