本文整理匯總了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);
}
}