|
What this is
Other links
The source code/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.editor;
import java.awt.event.*;
import java.awt.Dialog;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import org.netbeans.editor.DialogSupport;
import org.openide.DialogDescriptor;
import org.openide.util.HelpCtx;
import java.util.HashMap;
/** The NetBeans way of handling Dialogs is through TopManager,
* prividing it with DialogDescriptor.
*
* @author Petr Nejedly
* @version 1.0
*/
public class NbDialogSupport implements DialogSupport.DialogFactory {
/**
* Hash map containing string (ClassNames) <-> string (HelpID).
*/
private static HashMap helpIDs;
private static final String HELP_ID_MacroSavePanel = "editing.macros.recording"; // !!! NOI18N
private static final String HELP_ID_FindPanel = "editing.find"; // !!! NOI18N
private static final String HELP_ID_GotoDialogPanel = "editing.goto"; // !!! NOI18N
private static final String HELP_ID_JavaFastImportPanel = "editing.fastimport"; // !!! NOI18N
private static final String HELP_ID_JavaFastOpenPanel = "editing.fastopen"; // !!! NOI18N
private static final String HELP_ID_ScrollCompletionPane = "editing.codecompletion"; // !!! NOI18N
public NbDialogSupport()
{
if (helpIDs == null)
{
helpIDs = new HashMap(7);
helpIDs.put("org.netbeans.editor.MacroSavePanel", HELP_ID_MacroSavePanel); // NOI18N
helpIDs.put("org.netbeans.editor.ext.FindDialogSupport$FindPanel", HELP_ID_FindPanel); // NOI18N
helpIDs.put("org.netbeans.editor.ext.GotoDialogPanel", HELP_ID_GotoDialogPanel); // NOI18N
helpIDs.put("org.netbeans.editor.ext.ScrollCompletionPane", HELP_ID_ScrollCompletionPane); // NOI18N
helpIDs.put("org.netbeans.editor.ext.java.JavaFastImportPanel", HELP_ID_JavaFastImportPanel); // NOI18N
helpIDs.put("org.netbeans.editor.ext.java.JavaFastOpenPanel", HELP_ID_JavaFastOpenPanel); // NOI18N
}
}
/**
* The method for creating a dialog with specified properties.
* @param title The title of created dialog.
* @param panel The content of the dialog to be displayed.
* @param modal Whether the dialog should be modal.
* @param buttons The array of JButtons to be added to the dialog.
* @param sidebuttons The buttons could be placed under the panel (false),
* or on the right side of the panel (true).
* @param defaultIndex The index of default button in the buttons array,
* if
|
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.