当前位置: 首页>>代码示例>>Java>>正文


Java Dialog.toFront方法代码示例

本文整理汇总了Java中java.awt.Dialog.toFront方法的典型用法代码示例。如果您正苦于以下问题:Java Dialog.toFront方法的具体用法?Java Dialog.toFront怎么用?Java Dialog.toFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.Dialog的用法示例。


在下文中一共展示了Dialog.toFront方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showMakeSharableWizard

import java.awt.Dialog; //导入方法依赖的package包/类
/**
 * Show a multistep wizard for converting a non-sharable project to a sharable, self-contained one.
 * @param helper
 * @param ref
 * @param libraryNames
 * @param jarReferences
 * @return true is migration was performed, false when aborted.
 */
@Messages({
    "TIT_MakeSharableWizard=New Libraries Folder",
    "ACSD_MakeSharableWizard=Wizard dialog that guides you through the process of making the project self-contained and sharable in respect to binary dependencies."
})
public static boolean showMakeSharableWizard(final AntProjectHelper helper, ReferenceHelper ref, List<String> libraryNames, List<String> jarReferences) {

    final CopyIterator cpIt = new CopyIterator(helper);
    final WizardDescriptor wizardDescriptor = new WizardDescriptor(cpIt);
    // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
    wizardDescriptor.setTitle(TIT_MakeSharableWizard());
    wizardDescriptor.putProperty(PROP_HELPER, helper);
    wizardDescriptor.putProperty(PROP_REFERENCE_HELPER, ref);
    wizardDescriptor.putProperty(PROP_LIBRARIES, libraryNames);
    wizardDescriptor.putProperty(PROP_JAR_REFS, jarReferences);
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    dialog.getAccessibleContext().setAccessibleDescription(ACSD_MakeSharableWizard());
    dialog.setVisible(true);
    dialog.toFront();
    return wizardDescriptor.getValue() == WizardDescriptor.FINISH_OPTION && cpIt.isSuccess();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:SharableLibrariesUtils.java

示例2: 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();
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:NbPlatformCustomizer.java

示例3: runProjectWizard

import java.awt.Dialog; //导入方法依赖的package包/类
public static @CheckForNull NbModuleProject runProjectWizard(
        final NewNbModuleWizardIterator iterator, final String titleBundleKey) {
    WizardDescriptor wd = new WizardDescriptor(iterator);
    wd.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wd.setTitle(NbBundle.getMessage(ApisupportAntUIUtils.class, titleBundleKey));
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wd);
    dialog.setVisible(true);
    dialog.toFront();
    NbModuleProject project = null;
    boolean cancelled = wd.getValue() != WizardDescriptor.FINISH_OPTION;
    if (!cancelled) {
        FileObject folder = iterator.getCreateProjectFolder();
        if (folder == null) {
            return null;
        }
        try {
            project = (NbModuleProject) ProjectManager.getDefault().findProject(folder);
            OpenProjects.getDefault().open(new Project[] { project }, false);
        } catch (IOException e) {
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
        }
    }
    return project;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:ApisupportAntUIUtils.java

示例4: show

import java.awt.Dialog; //导入方法依赖的package包/类
boolean show () {
    wizardIterator = new PanelsIterator();
    wizardDescriptor = new WizardDescriptor(wizardIterator);        
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(PushWizard.class, "LBL_PushWizard.title")); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    setErrorMessage(wizardIterator.selectUriStep.getErrorMessage());
    dialog.setVisible(true);
    dialog.toFront();
    Object value = wizardDescriptor.getValue();
    boolean finnished = value == WizardDescriptor.FINISH_OPTION;
    if (!finnished) {
        // wizard wasn't properly finnished ...
        if (value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) {
            // wizard was closed or canceled -> reset all steps & kill all running tasks
            wizardIterator.selectUriStep.cancelBackgroundTasks();
        }            
    }
    return finnished;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:PushWizard.java

示例5: show

import java.awt.Dialog; //导入方法依赖的package包/类
boolean show () {
    wizardIterator = new PanelsIterator();
    wizardDescriptor = new WizardDescriptor(wizardIterator);        
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(PullWizard.class, "LBL_PullWizard.title")); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    setErrorMessage(wizardIterator.selectUriStep.getErrorMessage());
    dialog.setVisible(true);
    dialog.toFront();
    Object value = wizardDescriptor.getValue();
    boolean finnished = value == WizardDescriptor.FINISH_OPTION;
    if (!finnished) {
        // wizard wasn't properly finnished ...
        if (value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) {
            // wizard was closed or canceled -> reset all steps & kill all running tasks
            wizardIterator.selectUriStep.cancelBackgroundTasks();
        }            
    }
    return finnished;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:PullWizard.java

示例6: show

import java.awt.Dialog; //导入方法依赖的package包/类
boolean show () {
    wizardIterator = new PanelsIterator();
    wizardDescriptor = new WizardDescriptor(wizardIterator);        
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(FetchWizard.class, "LBL_FetchWizard.title")); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    setErrorMessage(wizardIterator.selectUriStep.getErrorMessage());
    dialog.setVisible(true);
    dialog.toFront();
    Object value = wizardDescriptor.getValue();
    boolean finnished = value == WizardDescriptor.FINISH_OPTION;
    if (!finnished) {
        // wizard wasn't properly finnished ...
        if (value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) {
            // wizard was closed or canceled -> reset all steps & kill all running tasks
            wizardIterator.selectUriStep.cancelBackgroundTasks();
            wizardIterator.fetchBranchesStep.cancelBackgroundTasks();
        }            
    }
    return finnished;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:FetchWizard.java

示例7: show

import java.awt.Dialog; //导入方法依赖的package包/类
public boolean show() {
    wizardIterator = new PanelsIterator();
    wizardDescriptor = new WizardDescriptor(wizardIterator);        
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(CheckoutWizard.class, "CTL_Checkout")); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    dialog.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CheckoutWizard.class, "CTL_Checkout"));
    dialog.setVisible(true);
    dialog.toFront();
    Object value = wizardDescriptor.getValue();
    boolean finnished = value == WizardDescriptor.FINISH_OPTION;
    
    if(finnished) {
        onFinished();
    } else {
        // wizard wasn't properly finnished ...
        if(value == WizardDescriptor.CLOSED_OPTION || 
           value == WizardDescriptor.CANCEL_OPTION ) 
        {
            // wizard was closed or canceled -> reset all steps & kill all running tasks
            repositoryStep.stop();                          
        }            
    }
    return finnished;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:CheckoutWizard.java

示例8: showProperties

import java.awt.Dialog; //导入方法依赖的package包/类
/** Opens a modal propertySheet on given Node
* @param n the node to show properties for
*/
public void showProperties (Node n) {
    Dialog d = findCachedPropertiesDialog( n );
    if( null == d ) {
        Node[] nds = new Node[] { n };
        openProperties(new NbSheet(), nds);
    } else {
        d.setVisible( true );
        //#131724 - PropertySheet clears its Nodes in removeNotify and keeps
        //only a weakref which is being reused in subsequent addNotify
        //so we should set the Nodes again in case the weakref got garbage collected
        //pls note that PropertySheet code checks for redundant calls of setNodes
        NbSheet sheet = findCachedSheet( d );
        if( null != sheet )
            sheet.setNodes(new Node[] { n });
        d.toFront();
        FocusTraversalPolicy ftp = d.getFocusTraversalPolicy();
        if( null != ftp && null != ftp.getDefaultComponent(d) ) {
            ftp.getDefaultComponent(d).requestFocusInWindow();
        } else {
            d.requestFocusInWindow();
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:NodeOperationImpl.java

示例9: start

import java.awt.Dialog; //导入方法依赖的package包/类
/** Starts Eclipse importer wizard. */
public void start() {
    final EclipseWizardIterator iterator = new EclipseWizardIterator();
    final WizardDescriptor wizardDescriptor = new WizardDescriptor(iterator);
    iterator.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, // NOI18N
                    iterator.getErrorMessage());
        }
    });
    wizardDescriptor.setTitleFormat(new java.text.MessageFormat("{1}")); // NOI18N
    wizardDescriptor.setTitle(
            ProjectImporterWizard.getMessage("CTL_WizardTitle")); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    dialog.setVisible(true);
    dialog.toFront();
    cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
    if (!cancelled) {
        projects = iterator.getProjects();
        //showAdditionalInfo(projects);
        destination = iterator.getDestination();
        recursively = iterator.getRecursively();
        numberOfImportedProjects = iterator.getNumberOfImportedProject();
        extraPanels = iterator.getExtraPanels();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:ProjectImporterWizard.java

示例10: actionPerformed

import java.awt.Dialog; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
    LOGGER.log(Level.INFO, "Initializing chipKIT Import procedure");
    
    LanguageToolchain languageToolchain = checkLanguageToolchain();
    if ( languageToolchain == null ) {
        return;
    }
    
    ArduinoConfig arduinoConfig = ArduinoConfig.getInstance();

    ChipKitImportWizardIterator wizIterator = new ChipKitImportWizardIterator( languageToolchain, arduinoConfig );
    WizardDescriptor wiz = new WizardDescriptor(wizIterator);

    Dialog dialog = DialogDisplayer.getDefault().createDialog(wiz);
    dialog.setVisible(true);
    dialog.toFront();

    if ( wiz.getValue() == WizardDescriptor.FINISH_OPTION ) {
        openImportedProject(wiz);
    }
}
 
开发者ID:chipKIT32,项目名称:chipKIT-importer,代码行数:23,代码来源:ShowChipKitImportWizardAction.java

示例11: perform

import java.awt.Dialog; //导入方法依赖的package包/类
private boolean perform() {
    wizardDescriptor.createNotificationLineSupport();
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
    wizardDescriptor.setTitle(NbBundle.getMessage(Clusterize.class, "LAB_ClusterizeWizard"));
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    dialog.setVisible(true);
    dialog.toFront();
    return wizardDescriptor.getValue() == WizardDescriptor.FINISH_OPTION;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:Clusterize.java

示例12: show

import java.awt.Dialog; //导入方法依赖的package包/类
boolean show () {
    wizardIterator = new PanelsIterator();
    wizardDescriptor = new WizardDescriptor(wizardIterator);        
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(CloneWizard.class, "LBL_CloneWizard.title")); // NOI18N
    
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    if(pa != null && forPath != null) {
        Git.getInstance().getRequestProcessor().post(new Runnable() {
            @Override
            public void run () {
                wizardIterator.repositoryStep.waitPopulated();
                // url and credential already provided, so try 
                // to reach the next step ...
                EventQueue.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        wizardDescriptor.doNextClick();
                    }
                });
            }
        });
    }
    setErrorMessage(wizardIterator.repositoryStep.getErrorMessage());
    dialog.setVisible(true);
    dialog.toFront();
    Object value = wizardDescriptor.getValue();
    boolean finished = value == WizardDescriptor.FINISH_OPTION;
    if (finished) {
        onFinished();
    } else {
        // wizard wasn't properly finnished ...
        if (value == WizardDescriptor.CLOSED_OPTION || value == WizardDescriptor.CANCEL_OPTION ) {
            // wizard was closed or canceled -> reset all steps & kill all running tasks
            wizardIterator.repositoryStep.cancelBackgroundTasks();
        }            
    }
    return finished;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:40,代码来源:CloneWizard.java

示例13: show

import java.awt.Dialog; //导入方法依赖的package包/类
public boolean show() {
    wizardIterator = new PanelsIterator();
    wizardDescriptor = new WizardDescriptor(wizardIterator);        
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(URLPatternWizard.class, "CTL_URLPattern")); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    dialog.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(URLPatternWizard.class, "CTL_URLPattern")); // NOI18N
    dialog.setVisible(true);
    dialog.toFront();
    
    return wizardDescriptor.getValue() == WizardDescriptor.FINISH_OPTION;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:URLPatternWizard.java

示例14: show

import java.awt.Dialog; //导入方法依赖的package包/类
public boolean show() {
    wizardIterator = new PanelsIterator();
    wizardDescriptor = new WizardDescriptor(wizardIterator);
    wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
    wizardDescriptor.setTitle(org.openide.util.NbBundle.getMessage(ImportWizard.class, "CTL_Import")); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
    dialog.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ImportWizard.class, "CTL_Import"));
    dialog.setVisible(true);
    dialog.toFront();
    Object value = wizardDescriptor.getValue();
    boolean finnished = value == WizardDescriptor.FINISH_OPTION;
    
    if(!finnished) {
        // wizard wasn't properly finnished ...
        if(value == WizardDescriptor.CLOSED_OPTION || 
           value == WizardDescriptor.CANCEL_OPTION ) 
        {
            // wizard was closed or canceled -> reset all steps & kill all running tasks                
            repositoryStep.stop();
            importStep.stop();
            importPreviewStep.stop();
        }            
    } else if (value == WizardDescriptor.FINISH_OPTION) {
        if(wizardIterator.current() == importStep) {
            setupImportPreviewStep(true);
        } else if (wizardIterator.current() == importPreviewStep) {
            importPreviewStep.storeTableSorter();
            importPreviewStep.startCommitTask(repositoryStep.getRepositoryFile().getRepositoryUrl());
        }            
    }
    return finnished;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:33,代码来源:ImportWizard.java

示例15: actionPerformed

import java.awt.Dialog; //导入方法依赖的package包/类
public @Override void actionPerformed(ActionEvent e) {
    
    Dialog dialog = dialogWRef.get ();

    if (dialog == null || ! dialog.isShowing ()) {

        final CatalogPanel cp = new CatalogPanel ();
        JButton closeButton = new JButton ();
        Mnemonics.setLocalizedText (closeButton,NbBundle.getMessage (CatalogAction.class, "BTN_CatalogPanel_CloseButton")); // NOI18N
        JButton openInEditor = new JButton ();
        openInEditor.setEnabled (false);
        OpenInEditorListener l = new OpenInEditorListener (cp, openInEditor);
        openInEditor.addActionListener (l);
        cp.getExplorerManager ().addPropertyChangeListener (l);
        Mnemonics.setLocalizedText (openInEditor,NbBundle.getMessage (CatalogAction.class, "BTN_CatalogPanel_OpenInEditorButton")); // NOI18N
        DialogDescriptor dd = new DialogDescriptor (cp,NbBundle.getMessage (CatalogAction.class, "LBL_CatalogPanel_Title"),  // NOI18N
                                false, // modal
                                new Object [] { openInEditor, closeButton },
                                closeButton,
                                DialogDescriptor.DEFAULT_ALIGN,
                                null,
                                null);
        dd.setClosingOptions (null);
        // set helpctx to null again, DialogDescriptor replaces null with HelpCtx.DEFAULT_HELP
        dd.setHelpCtx (null);
        
        dialog = DialogDisplayer.getDefault ().createDialog (dd);
        dialog.setVisible (true);
        dialogWRef = new WeakReference<Dialog> (dialog);
        
    } else {
        dialog.toFront ();
    }
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:36,代码来源:CatalogAction.java


注:本文中的java.awt.Dialog.toFront方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。