本文整理汇总了Java中org.openide.util.HelpCtx.DEFAULT_HELP属性的典型用法代码示例。如果您正苦于以下问题:Java HelpCtx.DEFAULT_HELP属性的具体用法?Java HelpCtx.DEFAULT_HELP怎么用?Java HelpCtx.DEFAULT_HELP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.openide.util.HelpCtx
的用法示例。
在下文中一共展示了HelpCtx.DEFAULT_HELP属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHelpCtx
public HelpCtx getHelpCtx () {
Object o = getDataObject().getPrimaryFile().getAttribute(EA_HELPCTX);
if (o != null) {
return new HelpCtx(o.toString());
}
// now try the original DataObject (assume it is a folder-thing)
HelpCtx ctx = getDataObject().getHelpCtx();
if (ctx != null &&
ctx != HelpCtx.DEFAULT_HELP &&
!FOLDER_DEFAULT_HELP.equals(ctx)) {
return ctx;
}
// try the parent node:
Node n = getParentNode();
if (n != null)
ctx = n.getHelpCtx();
return ctx;
}
示例2: showWindow
public boolean showWindow() {
DialogDescriptor dd = new DialogDescriptor(this, NbBundle.getMessage(FilterEditor.class, "LBL_FilterEditor"), true, //NOI18N
new Object[]{btnOk, btnCancel}, btnOk, DialogDescriptor.DEFAULT_ALIGN, HelpCtx.DEFAULT_HELP, null);
Dialog dlg = DialogDisplayer.getDefault().createDialog(dd);
dlg.setVisible(true);
if (btnOk.equals(dd.getValue())) {
updateFilters();
return true;
}
return false;
}
示例3: getHelpCtx
@Override
public org.openide.util.HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
}
示例4: getHelpCtx
@Override
public HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
}
示例5: getHelp
public HelpCtx getHelp() {
return HelpCtx.DEFAULT_HELP;
}
示例6: getHelpCtx
public final HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
}
示例7: getHelpCtx
public @Override HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
}
示例8: getHelpCtx
public HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
}
示例9: createDialog
static Dialog createDialog(
final String title,
final GoToPanelImpl panel,
final GoToPanelImpl.ContentProvider contentProvider,
final JButton okButton) {
okButton.setEnabled (false);
panel.getAccessibleContext().setAccessibleName( NbBundle.getMessage( GoToSymbolAction.class, "AN_GoToSymbol") ); //NOI18N
panel.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage( GoToSymbolAction.class, "AD_GoToSymbol") ); //NOI18N
DialogDescriptor dialogDescriptor = new DialogDescriptor(
panel, // innerPane
title, // displayName
true,
new Object[] {okButton, DialogDescriptor.CANCEL_OPTION},
okButton,
DialogDescriptor.DEFAULT_ALIGN,
HelpCtx.DEFAULT_HELP,
new DialogButtonListener(panel, okButton));
dialogDescriptor.setClosingOptions(new Object[] {okButton, DialogDescriptor.CANCEL_OPTION});
Dialog d = DialogDisplayer.getDefault().createDialog( dialogDescriptor );
// Set size when needed
final int width = UiOptions.GoToSymbolDialog.getWidth();
final int height = UiOptions.GoToSymbolDialog.getHeight();
if (width != -1 && height != -1) {
d.setPreferredSize(new Dimension(width,height));
}
// Center the dialog after the size changed.
Rectangle r = Utilities.getUsableScreenBounds();
int maxW = (r.width * 9) / 10;
int maxH = (r.height * 9) / 10;
final Dimension dim = d.getPreferredSize();
dim.width = Math.min(dim.width, maxW);
dim.height = Math.min(dim.height, maxH);
d.setBounds(Utilities.findCenterBounds(dim));
initialDimension = dim;
d.addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {
contentProvider.closeDialog();
}
});
return d;
}
示例10: select
/** Opens explorer for specified root in modal mode. The set
* of selected components is returned as a result. The acceptor
* should be asked each time selected nodes changes to accept or
* reject the current result. This should affect for example the
* <EM>OK</EM> button.
*
* @param title is a title that will be displayed as a title of the window
* @param root the root to explore
* @param acceptor the class that is asked for accepting or rejecting
* current selection
* @param top is a component that will be displayed on the top
* @return array of selected (and accepted) nodes
*
* @exception UserCancelException selection interrupted by user
*/
public Node[] select (String title, String rootTitle, Node root, NodeAcceptor acceptor, Component top)
throws UserCancelException {
final FileSelector selector = new FileSelector(rootTitle, root, acceptor, top);
selector.setBorder(new EmptyBorder(12, 12, 0, 12));
DialogDescriptor dd = new DialogDescriptor(selector, title, true,
selector.getOptions(),
selector.getSelectOption(), DialogDescriptor.DEFAULT_ALIGN,
HelpCtx.DEFAULT_HELP, null);
Object ret = DialogDisplayer.getDefault().notify(dd);
if (ret != selector.getSelectOption()) {
throw new UserCancelException ();
}
return selector.getNodes ();
}