use of org.openide.WizardDescriptor in project gephi by gephi.
the class ImportWizard method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
WizardIterator wizardIterator = new WizardIterator();
WizardDescriptor wizardDescriptor = new WizardDescriptor(wizardIterator);
wizardDescriptor.setTitleFormat(new MessageFormat("{0} ({1})"));
wizardDescriptor.setTitle(NbBundle.getMessage(getClass(), "ImportWizard.wizard.title"));
Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
dialog.setVisible(true);
dialog.toFront();
boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
if (!cancelled) {
ImporterWizardUI wizardUI = wizardIterator.getCurrentWizardUI();
// Get Importer
WizardImporter importer = null;
for (WizardImporterBuilder wizardBuilder : Lookup.getDefault().lookupAll(WizardImporterBuilder.class)) {
WizardImporter im = wizardBuilder.buildImporter();
if (wizardUI.isUIForImporter(im)) {
importer = im;
}
}
if (importer == null) {
NotifyDescriptor.Message msg = new NotifyDescriptor.Message(NbBundle.getMessage(getClass(), "ImportWizard.error_no_matching_importer"), NotifyDescriptor.WARNING_MESSAGE);
DialogDisplayer.getDefault().notify(msg);
return;
}
// Unsetup
wizardIterator.unsetupPanels(importer);
ImportControllerUI importControllerUI = Lookup.getDefault().lookup(ImportControllerUI.class);
importControllerUI.importWizard(importer);
}
}
use of org.openide.WizardDescriptor in project gephi by gephi.
the class TopDialog method updateMessage.
public void updateMessage() {
if (messageComponent != null) {
getContentPane().remove(messageComponent);
}
// System.err.println("updateMessage: " + nd.getMessage());
messageComponent = message2Component(nd.getMessage());
if (!(nd instanceof WizardDescriptor) && nd.getNotificationLineSupport() != null) {
JComponent toAdd = new JPanel(new BorderLayout());
toAdd.add(messageComponent, BorderLayout.CENTER);
// NOI18N
nbErrorForeground = UIManager.getColor("nb.errorForeground");
if (nbErrorForeground == null) {
// nbErrorForeground = new Color(89, 79, 191); // RGB suggested by Bruce in #28466
// RGB suggested by jdinga in #65358
nbErrorForeground = new Color(255, 0, 0);
}
// NOI18N
nbWarningForeground = UIManager.getColor("nb.warningForeground");
if (nbWarningForeground == null) {
// Label.foreground
nbWarningForeground = new Color(51, 51, 51);
}
// NOI18N
nbInfoForeground = UIManager.getColor("nb.warningForeground");
if (nbInfoForeground == null) {
// NOI18N
nbInfoForeground = UIManager.getColor("Label.foreground");
}
notificationLine = new FixedHeightLabel();
NotificationLineSupport nls = nd.getNotificationLineSupport();
if (nls.getInformationMessage() != null) {
updateNotificationLine(this, MSG_TYPE_INFO, nls.getInformationMessage());
} else if (nls.getWarningMessage() != null) {
updateNotificationLine(this, MSG_TYPE_WARNING, nls.getWarningMessage());
} else if (nls.getErrorMessage() != null) {
updateNotificationLine(this, MSG_TYPE_ERROR, nls.getErrorMessage());
}
toAdd.add(notificationLine, BorderLayout.SOUTH);
messageComponent = toAdd;
}
getContentPane().add(messageComponent, BorderLayout.CENTER);
}
use of org.openide.WizardDescriptor in project Aspose.BarCode-for-Java by aspose-barcode.
the class AsposeMavenBasicWizardPanel method storeSettings.
/**
* @param settings
*/
@Override
public void storeSettings(Object settings) {
WizardDescriptor d = (WizardDescriptor) settings;
component.store(d);
}
use of org.openide.WizardDescriptor in project Aspose.Cells-for-Java by aspose-cells.
the class AsposeMavenBasicWizardPanel method storeSettings.
/**
* @param settings
*/
@Override
public void storeSettings(Object settings) {
WizardDescriptor d = (WizardDescriptor) settings;
component.store(d);
}
use of org.openide.WizardDescriptor in project enclojure by EricThorsen.
the class ClojureTemplateWizardPanel method storeSettings.
public void storeSettings(Object settings) {
WizardDescriptor d = (WizardDescriptor) settings;
component.store(d);
}
Aggregations