本文整理汇总了Java中org.openide.DialogDescriptor.addPropertyChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java DialogDescriptor.addPropertyChangeListener方法的具体用法?Java DialogDescriptor.addPropertyChangeListener怎么用?Java DialogDescriptor.addPropertyChangeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.DialogDescriptor
的用法示例。
在下文中一共展示了DialogDescriptor.addPropertyChangeListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDialogDescriptor
import org.openide.DialogDescriptor; //导入方法依赖的package包/类
static DialogDescriptor createDialogDescriptor( JComponent content, String label ) {
final JButton[] buttons = new JButton[2];
buttons[0] = new JButton(NbBundle.getMessage(GeneratorUtils.class, "LBL_generate_button") );
buttons[0].getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(GeneratorUtils.class, "A11Y_Generate"));
buttons[1] = new JButton(NbBundle.getMessage(GeneratorUtils.class, "LBL_cancel_button") );
final DialogDescriptor dd = new DialogDescriptor(content, label, true, buttons, buttons[0], DialogDescriptor.DEFAULT_ALIGN, null, null);
dd.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (DialogDescriptor.PROP_VALID.equals(evt.getPropertyName())) {
buttons[0].setEnabled(dd.isValid());
}
}
});
return dd;
}
示例2: ViewerChangeDialog
import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private ViewerChangeDialog(String title, ElementValue value, ViewerPanel viewerpanel, ChangePanel panel) {
this.value = value;
this.panel = panel;
this.viewerpanel = viewerpanel;
panel.setText(value.getText());
dd = new DialogDescriptor(
panel,
title,
false, //isModal,
DialogDescriptor.OK_CANCEL_OPTION,
DialogDescriptor.OK_OPTION,
new DialogDoneListener()
);
dd.setClosingOptions(new Object[]{});
dd.addPropertyChangeListener(dcl);
DialogDisplayer.getDefault().notifyLater(dd);
}
示例3: VersionUpdaterDialog
import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private VersionUpdaterDialog(String title, ElementValue value, VersionUpdaterPanel versionpanel, ChangePanel panel) {
this.panel = panel;
this.versionpanel = versionpanel;
this.value = value;
panel.setText(value.getText());
dd = new DialogDescriptor(
panel,
title,
false, //isModal,
DialogDescriptor.OK_CANCEL_OPTION,
DialogDescriptor.OK_OPTION,
new DialogDoneListener()
);
dd.setClosingOptions(new Object[]{});
dd.addPropertyChangeListener(dcl);
DialogDisplayer.getDefault().notifyLater(dd);
}
示例4: ViewerWarningDialog
import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private ViewerWarningDialog(String title, ViewerWarningPanel panel) {
dd = new DialogDescriptor(
panel,
title,
false, //isModal,
DialogDescriptor.OK_CANCEL_OPTION,
DialogDescriptor.OK_OPTION,
new DialogDoneListener()
);
dd.setClosingOptions(new Object[]{});
dd.addPropertyChangeListener(dcl);
DialogDisplayer.getDefault().notifyLater(dd);
}