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


Java DialogDescriptor.setHelpCtx方法代码示例

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


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

示例1: selectPatchContext

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private File selectPatchContext() {
    PatchContextChooser chooser = new PatchContextChooser();
    ResourceBundle bundle = NbBundle.getBundle(IDEServicesImpl.class);
    JButton ok = new JButton(bundle.getString("LBL_Apply")); // NOI18N
    JButton cancel = new JButton(bundle.getString("LBL_Cancel")); // NOI18N
    DialogDescriptor descriptor = new DialogDescriptor(
            chooser,
            bundle.getString("LBL_ApplyPatch"), // NOI18N
            true,
            NotifyDescriptor.OK_CANCEL_OPTION,
            ok,
            null);
    descriptor.setOptions(new Object [] {ok, cancel});
    descriptor.setHelpCtx(new HelpCtx("org.netbeans.modules.bugtracking.patchContextChooser")); // NOI18N
    File context = null;
    DialogDisplayer.getDefault().createDialog(descriptor).setVisible(true);
    if (descriptor.getValue() == ok) {
        context = chooser.getSelectedFile();
    }
    return context;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:IDEServicesImpl.java

示例2: editBrowserButtonActionPerformed

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private void editBrowserButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editBrowserButtonActionPerformed
    final WebBrowsersOptionsModel wbModel = new WebBrowsersOptionsModel();
    WebBrowsersOptionsPanel wbPanel = new WebBrowsersOptionsPanel(wbModel, cbWebBrowser.getSelectedItem().toString());
    DialogDescriptor dialogDesc = new DialogDescriptor (wbPanel, loc("LBL_WebBrowsersPanel_Title"), true, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (DialogDescriptor.OK_OPTION.equals(e.getSource())) {
                    wbModel.applyChanges();
                } else {
                    wbModel.discardChanges();
                }
            }
        });
    dialogDesc.setHelpCtx( new HelpCtx("WebBrowsersManager") ); //NOI18N
    DialogDisplayer.getDefault().createDialog(dialogDesc).setVisible(true);
    if (dialogDesc.getValue().equals(DialogDescriptor.OK_OPTION)) {
        updateWebBrowsers();
        for (int i = 0, items = cbWebBrowser.getItemCount(); i < items; i++) {
            Object item = cbWebBrowser.getItemAt(i);
            if (item.equals(wbModel.getSelectedValue())) {
                cbWebBrowser.setSelectedItem(item);
                break;
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:GeneralOptionsPanel.java

示例3: show

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
void show(boolean valid) {
    setValid(valid);
    
    String title = NbBundle.getMessage(SvnOptionsController.class, "CTL_ManageLabels");
    String accesibleDescription = NbBundle.getMessage(SvnOptionsController.class, "ACSD_ManageLabels");
    HelpCtx helpCtx = new HelpCtx(AnnotationSettings.class);
    
    dialogDescriptor = new DialogDescriptor(panel, title);
    dialogDescriptor.setModal(true);
    dialogDescriptor.setHelpCtx(helpCtx);
    dialogDescriptor.setValid(valid);
    
    Dialog dialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor);
    dialog.getAccessibleContext().setAccessibleDescription(accesibleDescription);
    //dialog.setModal(false);
    dialog.setAlwaysOnTop(false);
    dialog.setVisible(true);                
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:AnnotationSettings.java

示例4: actionPerformed

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
public void actionPerformed (ActionEvent evt) {
    bOk = new JButton (NbBundle.getMessage (ConnectAction.class, "CTL_Ok")); // NOI18N
    bCancel = new JButton (NbBundle.getMessage (ConnectAction.class, "CTL_Cancel")); // NOI18N
    bOk.getAccessibleContext ().setAccessibleDescription (NbBundle.getMessage (ConnectAction.class, "ACSD_CTL_Ok")); // NOI18N
    bCancel.getAccessibleContext ().setAccessibleDescription (NbBundle.getMessage (ConnectAction.class, "ACSD_CTL_Cancel")); // NOI18N
    bCancel.setDefaultCapable(false);
    cp = new ConnectorPanel ();
    descr = new DialogDescriptor (
        cp,
        NbBundle.getMessage (ConnectAction.class, "CTL_Connect_to_running_process"),
        true, // modal
        new ConnectListener (cp)
    );
    descr.setOptions (new JButton[] {
        bOk, bCancel
    });
    notificationSupport = descr.createNotificationLineSupport();
    descr.setClosingOptions (new Object [0]);
    descr.setHelpCtx(HelpCtx.findHelp(cp)); // This is mandatory so that the descriptor tracks the changes in help correctly.
    dialog = DialogDisplayer.getDefault ().createDialog (descr);
    dialog.setVisible(true);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:ConnectAction.java

示例5: show

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private boolean show() {
    final DialogDescriptor dialogDescriptor =
            new DialogDescriptor(getBrowserPanel(), NbBundle.getMessage(Browser.class, "CTL_Browser_BrowseFolders_Title")); // NOI18N
    dialogDescriptor.setModal(true);
    dialogDescriptor.setHelpCtx(new HelpCtx(helpID));
    dialogDescriptor.setValid(false);

    addPropertyChangeListener(new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            if( ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName()) ) {
                Node[] nodes = getSelectedNodes();
                if (nodes != null && nodes.length > 0) {
                    selectedNodes = nodes;
                    dialogDescriptor.setValid(nodes.length > 0);
                }
            }
        }
    });

    Dialog dialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor);
    dialog.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(Browser.class, "CTL_Browser_BrowseFolders_Title")); // NOI18N
    dialog.setVisible(true);

    return DialogDescriptor.OK_OPTION.equals(dialogDescriptor.getValue());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:Browser.java

示例6: FileSelector

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
/** Creates new form RootSelectorPanel */
public FileSelector(String text, String title, HelpCtx helpCtx, Preferences pref) {
    this.text = text;
    this.title = title;
    this.helpCtx = helpCtx;
    this.pref = pref;

    initComponents();

    filesList.addListSelectionListener(this);

    dialogDescriptor = new DialogDescriptor(this, title);

    okButton = new JButton(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Select"));
    okButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Select"));
    okButton.setEnabled(false);
    cancelButton = new JButton(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Cancel"));                                      // NOI18N
    cancelButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(FileSelector.class, "CTL_FileSelector_Cancel"));    // NOI18N
    dialogDescriptor.setOptions(new Object[] {okButton, cancelButton});

    dialogDescriptor.setModal(true);
    dialogDescriptor.setHelpCtx(new HelpCtx(this.getClass()));
    dialogDescriptor.setValid(false);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:FileSelector.java

示例7: prepare

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private DialogDescriptor prepare (String title, String prompt, List<String> strings, JPanel options) {
    Mnemonics.setLocalizedText(promptLabel, prompt);
    listValues.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    setChoices(strings);
    if (options != null) {
        optionsPanel.add(BorderLayout.WEST, options);
    }

    DialogDescriptor descriptor = new DialogDescriptor(this, title);
    descriptor.setClosingOptions(null);
    descriptor.setHelpCtx(null);

    Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor);
    dialog.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(StringSelector.class, "ACSD_StringSelectorDialog"));  // NOI18N
    putClientProperty(Dialog.class, dialog);
    putClientProperty(DialogDescriptor.class, descriptor);
    dialog.setVisible(true);
    return descriptor;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:StringSelector.java

示例8: showTestDialog

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
/** Opens modal dialog with OK, Cancel, Yes, No, Close and Help buttons. 
 * @param testDialogTitle title of test dialog
 */
protected void showTestDialog(String testDialogTitle) {
    Object[] options = new Object[]{
        DialogDescriptor.OK_OPTION,
        DialogDescriptor.CANCEL_OPTION,
        DialogDescriptor.YES_OPTION,
        DialogDescriptor.NO_OPTION,
        DialogDescriptor.CLOSED_OPTION
    };
    label = new TestLabel(TEST_DIALOG_LABEL);
    DialogDescriptor dd = new DialogDescriptor(label, testDialogTitle, false,
            options, null, DialogDescriptor.BOTTOM_ALIGN, null, label);
    dd.setHelpCtx(new HelpCtx("org.netbeans.api.javahelp.MASTER_ID"));
    DialogDisplayer.getDefault().createDialog(dd).setVisible(true);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:NbDialogOperatorTest.java

示例9: propertyChange

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
public void propertyChange(PropertyChangeEvent evt) {
    if(ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) {
        DialogDescriptor dd = descriptorRef.get();
        if(dd != null) {
            dd.setHelpCtx(getHelpCtx());
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:OptionsAction.java

示例10: show

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private void show() {
    JavaCodeGenerator codeGen = (JavaCodeGenerator) FormEditor.getCodeGenerator(formModel);
    codeGen.regenerateCode(); // to have fresh code for code completion

    DialogDescriptor dd = new DialogDescriptor(codeView,
            NbBundle.getMessage(CodeCustomizer.class, "TITLE_CodeCustomizer"), // NOI18N
            true, DialogDescriptor.OK_CANCEL_OPTION, null, null);
    dd.setHelpCtx(new HelpCtx("gui.codecustomizer")); // NOI18N
    Object res = DialogDisplayer.getDefault().notify(dd);
    if (DialogDescriptor.OK_OPTION.equals(res)) {
        retreiveCurrentData();
        storeChanges();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:CodeCustomizer.java

示例11: showDialog

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
public void showDialog() {
    descriptor = new DialogDescriptor(this, NbBundle.getMessage(ManageGroupsPanel.class, "Dlg_DOCUMENT_GROUPS"), true, 
            new Object[] { btnSelect, DialogDescriptor.CANCEL_OPTION }, btnSelect, DialogDescriptor.DEFAULT_ALIGN, null, null);
    descriptor.setHelpCtx( new HelpCtx("org.netbeans.core.windows.documentgroup.ManageGroupsPanel") ); //NOI18N
    descriptor.setValid( false );
    dialog = DialogDisplayer.getDefault().createDialog( descriptor );
    dialog.setVisible( true );
    GroupsMenuAction.refreshMenu();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:ManageGroupsPanel.java

示例12: showDialog

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
private void showDialog(DialogDescriptor dialogDescriptor, HelpCtx helpCtx) {
    dialogDescriptor.setModal(true);
    dialogDescriptor.setHelpCtx(helpCtx);        

    Dialog dialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor);        
    dialog.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(Repository.class, "ACSD_RepositoryPanel"));
    dialog.getAccessibleContext().setAccessibleName(NbBundle.getMessage(Repository.class, "ACSN_RepositoryPanel"));
    dialog.setVisible(true);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:Repository.java

示例13: showDialog

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
public boolean showDialog() {
    DialogDescriptor dialogDescriptor = new DialogDescriptor(panel, org.openide.util.NbBundle.getMessage(UpdateTo.class, "CTL_UpdateToDialog")); // NOI18N
    dialogDescriptor.setOptions(new Object[] {okButton, cancelButton});

    dialogDescriptor.setModal(true);
    dialogDescriptor.setHelpCtx(new HelpCtx(this.getClass()));
    dialogDescriptor.setValid(false);

    Dialog dialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor);
    dialog.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(UpdateTo.class, "ACSD_UpdateToDialog")); // NOI18N
    dialog.setVisible(true);
    dialog.setResizable(false);
    boolean ret = dialogDescriptor.getValue() == okButton;
    return ret;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:UpdateTo.java

示例14: openProperties

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
public static void openProperties(File[] roots, String ctxDisplayName) {
    if(!Subversion.getInstance().checkClientAvailable()) {            
        return;
    }       

    final PropertiesPanel panel = new PropertiesPanel();
    final PropertiesTable propTable;
    propTable = new PropertiesTable(panel.labelForTable, PropertiesTable.PROPERTIES_COLUMNS, new String[] { PropertiesTableModel.COLUMN_NAME_VALUE});
    panel.setPropertiesTable(propTable);

    JComponent component = propTable.getComponent();
    panel.propsPanel.setLayout(new BorderLayout());
    panel.propsPanel.add(component, BorderLayout.CENTER);
    SvnProperties svnProperties = new SvnProperties(panel, propTable, roots);
    JButton btnClose = new JButton();
    Mnemonics.setLocalizedText(btnClose, getString("CTL_Properties_Action_Close"));   //NOI18N
    btnClose.getAccessibleContext().setAccessibleDescription(getString("CTL_Properties_Action_Close")); //NOI18N
    btnClose.getAccessibleContext().setAccessibleName(getString("CTL_Properties_Action_Close"));    //NOI18N

    DialogDescriptor dd = new DialogDescriptor(panel, org.openide.util.NbBundle.getMessage(SvnPropertiesAction.class, "CTL_PropertiesDialog_Title", ctxDisplayName)); // NOI18N
    dd.setModal(true);
    dd.setOptions(new Object[] {btnClose});
    dd.setHelpCtx(new HelpCtx(SvnPropertiesAction.class));

    panel.putClientProperty("contentTitle", ctxDisplayName);  // NOI18N
    panel.putClientProperty("DialogDescriptor", dd); // NOI18N
    Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);
    dialog.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(SvnPropertiesAction.class, "CTL_PropertiesAction")); // NOI18N
    dialog.pack();
    dialog.setVisible(true);        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:32,代码来源:SvnPropertiesAction.java

示例15: AddQueryParameterDlg

import org.openide.DialogDescriptor; //导入方法依赖的package包/类
/** Creates new form AddQueryParameterDlg */
public AddQueryParameterDlg(boolean modal, String columnName) {

    initComponents();
    // try to make it so that the default information in the field is pre-selected so that the user
    // can simply type over it without having to select it.
    valueTxtField.setSelectionEnd(valueTxtField.getText().length());
    parmTxtField.setSelectionStart(0);
    parmTxtField.setSelectionEnd(parmTxtField.getText().length());

    ActionListener listener = new ActionListener () {

            public void actionPerformed (ActionEvent evt) {
                Object o = evt.getSource();
                if (o == NotifyDescriptor.CANCEL_OPTION) {
                    returnStatus = RET_CANCEL;
                } else if (o == NotifyDescriptor.OK_OPTION) {
                    // do something useful
                    returnStatus = RET_OK;
                } // else if HELP ...
            }
        };

    // Note - we may want to use the version that also has help (check with Jeff)
    DialogDescriptor dlg =
        new DialogDescriptor(this,
                NbBundle.getMessage(AddQueryParameterDlg.class,
                             "ADD_QUERY_CRITERIA_TITLE"),     // NOI18N
                             modal, listener);

    dlg.setHelpCtx (
        new HelpCtx( "projrave_ui_elements_dialogs_add_query_criteria" ) );        // NOI18N

    setColumnName(columnName);
    dialog = DialogDisplayer.getDefault().createDialog(dlg);
    dialog.setVisible(true);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:38,代码来源:AddQueryParameterDlg.java


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