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