本文整理汇总了Java中java.awt.Dialog.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java Dialog.setTitle方法的具体用法?Java Dialog.setTitle怎么用?Java Dialog.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.Dialog
的用法示例。
在下文中一共展示了Dialog.setTitle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPlatform
import java.awt.Dialog; //导入方法依赖的package包/类
@Messages("CTL_AddNetbeansPlatformTitle=Add NetBeans Platform")
private void addPlatform(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addPlatform
PlatformChooserWizardPanel chooser = new PlatformChooserWizardPanel(null);
PlatformInfoWizardPanel info = new PlatformInfoWizardPanel(null);
WizardDescriptor wd = new WizardDescriptor(new BasicWizardPanel[] {chooser, info});
initPanel(chooser, wd, 0);
initPanel(info, wd, 1);
wd.setTitleFormat(new MessageFormat("{0}")); // NOI18N
Dialog dialog = DialogDisplayer.getDefault().createDialog(wd);
dialog.setTitle(CTL_AddNetbeansPlatformTitle());
dialog.setVisible(true);
dialog.toFront();
if (wd.getValue() == WizardDescriptor.FINISH_OPTION) {
String plafDir = (String) wd.getProperty(PLAF_DIR_PROPERTY);
String plafLabel = (String) wd.getProperty(PLAF_LABEL_PROPERTY);
String id = plafLabel.replace(' ', '_');
NbPlatform plaf = getPlafListModel().addPlatform(id, plafDir, plafLabel);
if (plaf != null) {
platformsList.setSelectedValue(plaf, true);
refreshPlatform();
}
}
}
示例2: main
import java.awt.Dialog; //导入方法依赖的package包/类
public static void main(String[] args) {
final Frame frame = new Frame("Test");
frame.setSize(400, 400);
frame.setBackground(FRAME_COLOR);
frame.setVisible(true);
final Dialog modalDialog = new Dialog(null, true);
modalDialog.setTitle("Modal Dialog");
modalDialog.setSize(400, 200);
modalDialog.setBackground(DIALOG_COLOR);
modalDialog.setModal(true);
new Thread(new Runnable() {
@Override
public void run() {
runTest(modalDialog, frame);
}
}).start();
modalDialog.setVisible(true);
}
示例3: showModalDialog
import java.awt.Dialog; //导入方法依赖的package包/类
private static void showModalDialog(Frame targetFrame) {
Dialog dialog = new Dialog(targetFrame, true);
dialog.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
passed = true;
dialog.dispose();
}
});
dialog.setSize(400, 300);
dialog.setTitle("Modal Dialog!");
clickOnModalDialog(dialog);
dialog.setVisible(true);
}
示例4: showCustomizer
import java.awt.Dialog; //导入方法依赖的package包/类
@Override
@NbBundle.Messages("MSG_CustomizerForbidden=The customizer is disabled, using it would revert manual changes done to the nbproject/project.xml file.")
public void showCustomizer() {
AuxiliaryProperties props = project.getLookup().lookup(AuxiliaryProperties.class);
String show = props.get("show.customizer", true);
if (show != null && "false".equals(show)) {
String message = props.get("show.customizer.message", true);
if (message == null) {
message = MSG_CustomizerForbidden();
}
NotifyDescriptor nd = new NotifyDescriptor.Message(message, NotifyDescriptor.WARNING_MESSAGE);
DialogDisplayer.getDefault().notify(nd);
return;
}
Dialog dialog = project2Dialog.get (project);
if ( dialog != null ) {
dialog.setVisible(true);
}
else {
InstanceContent ic = new InstanceContent();
Lookup context = new AbstractLookup(ic);
ic.add(project);
ic.add(project.getLookup().lookup(ProjectAccessor.class));
ic.add(project.getLookup().lookup(AuxiliaryConfiguration.class));
//TODO replace with generic apis..
ic.add(ic);
OptionListener listener = new OptionListener();
dialog = ProjectCustomizer.createCustomizerDialog(CUSTOMIZER_FOLDER_PATH, context, null, listener, null );
dialog.addWindowListener( listener );
dialog.setTitle( MessageFormat.format(
NbBundle.getMessage( ProjectCustomizerProvider.class, "LBL_Customizer_Title" ), // NOI18N
new Object[] { ProjectUtils.getInformation(project).getDisplayName() } ) );
project2Dialog.put(project, dialog);
dialog.setVisible(true);
}
}