|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.ui.ApplicationSupport
public final class ApplicationSupport
Provides support for Swing applications. If the application is using a tool
bar, then the application main panel should be put in the center of the tool
bar panel. For example,
getContentPane().add( ApplicationSupport.getToolBarPanel(),
BorderLayout.CENTER );
Hierarchy:
getContentPane().add( ApplicationSupport.createStatusBar( new int[] { 100,
50, 25 } ), BorderLayout.SOUTH );
getToolBarPanel().add( mainPanel, BorderLayout.CENTER );
JFrame > ContentPane > ( ToolBarPanel:CENTER > ( JToolBar:NORTH
MainPanel:CENTER ) ) StatusBar:SOUTH
Method Summary | |
---|---|
static JMenu |
addMenu(Container container,
String titleKey,
int mnemonic,
String[] itemKeys)
Add a new menu with menu items for the given strings. |
static JMenu |
addMenu(JApplet a,
String titleKey,
int mnemonic,
String[] itemKeys)
Add a new menu with menu items for the given strings. |
static JMenu |
addMenu(JFrame f,
String titleKey,
int mnemonic,
String[] itemKeys)
Add a new menu with menu items for the given strings. |
protected static JMenu |
addMenuHelper(JMenuBar mb,
String titleKey,
String[] itemKeys)
Add a new menu with menu items for the given strings. |
protected static void |
addMenuTo(Container container,
JMenu menu)
Return the requested menu, creating it and adding it to the menu bar if neccessary. |
protected static void |
clear()
Clear. |
static JLabel |
createLabel(String key)
Create a properly formatted label for use with an edit field. |
static StatusBar |
createStatusBar(int[] relativeSizes)
Create the status bar with the given cells. |
static JToolBar |
createToolBar()
Create the tool bar. |
static String |
formatLabelString(String key)
Create a properly formatted label for use with an edit field. |
static String |
formatMessage(String patternKey,
String[] params)
Return a formatted message made up of the resource obtained from the pattern key and the parameters. |
static AudioClip |
getAudioClip(String key)
Return the audio clip specified by the given key. |
static boolean |
getBoolean(String key)
Return the boolean specified by the given key. |
static boolean |
getBoolean(String key,
boolean defaultValue)
Return the boolean specified by the given key, or the given
default value if the key is not found. |
static Class |
getClass(String key)
Return the Class specified by the given key. |
static Color |
getColor(String key)
Return the color specified by the given key. |
static Color |
getColor(String key,
Color defaultColor)
Return the color specified by the given key. |
static Color |
getColorPreference(String key)
Return the color specified by the given key in the preferences bundle. |
static String |
getConfigBundleName()
Return the configuration bundle name. |
static JMenu |
getEditMenu(Container container)
Return the edit menu. |
static JMenu |
getEditMenuDefault(Container container)
Return the default edit menu. |
static int |
getExitConfirmation(JFrame frame)
Show a dialog requesting confirmation of the exit action. |
static JMenu |
getFileMenu(Container container)
Return the file menu. |
static JMenu |
getFileMenuDefault(Container container)
Return the default file menu. |
static Font |
getFont(String key)
Return the font specified by the given key. |
static Font |
getFontPreference(String key)
Return the font specified by the given key in the preferences bundle. |
static JMenu |
getHelpMenu(Container container)
Return the help menu. |
static JMenu |
getHelpMenuDefault(Container container)
Return the default help menu. |
static Icon |
getIcon(String key)
Return the icon specified by the given key. |
static int |
getInt(String key)
Return the int specified by the given key. |
static int |
getInt(String key,
int defaultValue)
Return the int specified by the given key, or the given
default value if the key is not found. |
static Locale |
getLocale()
Return the locale. |
static JMenuBar |
getMenuBar(JApplet a)
Return the menu bar from the given frame, creating it if necessary. |
static JMenuBar |
getMenuBar(JFrame f)
Return the menu bar from the given frame, creating it if necessary. |
protected static JMenu |
getMenuFor(Container container,
String actionName,
String[] itemKeys)
Return the requested menu, creating it and adding it to the menu bar if neccessary. |
static JMenu |
getMenuNamed(JMenuBar menuBar,
String menuName)
Return the menu with the given name. |
static JMenu |
getOptionsMenu(Container container)
Return the options menu. |
static String |
getPreference(String key)
Return the preference for the given key. |
static String |
getResource(String key)
Return the resource for the given key. |
static String |
getResource(String key,
Object[] args)
Return the resource for the given key using the given message arguments. |
static String |
getResource(String key,
String defaultValue)
Return the resource for the given key. |
static StatusBar |
getStatusBar()
Return the status bar. |
static String |
getStringBundleName()
Return the string bundle name. |
static JToolBar |
getToolBar()
Return the tool bar. |
static JPanel |
getToolBarPanel()
Return the tool bar. |
static JMenu |
getViewMenu(Container container)
Return the view menu. |
static JMenu |
getViewMenuDefault(Container container)
Return the default view menu. |
static void |
launch(JFrame f,
String title,
Image image,
int x,
int y,
int w,
int h)
Launch the application in the given frame with the given title with the given bounds. |
static void |
openURL(AbstractApp app,
String urlString)
Show the given URL in the default browser. |
static void |
openURL(AbstractApp app,
URL url)
Show the given URL in the default browser. |
protected static void |
openURLFromApplet(JApplet applet,
URL url)
Show the given URL in the applet's browser. |
static void |
quitActionPerformed(JFrame frame)
Perform the quit action. |
static void |
setConfigBundleName(String bundleName)
Set the configuration bundle name. |
static void |
setCursorBusy(JFrame frame,
boolean busy)
Set the cursor to busy depending upon the given state. |
static void |
setOwner(Object owner)
Set the owner object. |
static void |
setStringBundleName(String bundleName)
Set the string bundle name. |
static void |
showStatus(int area,
String s)
Show the given string in the status area of the status bar. |
static void |
showStatus(int area,
String s,
int displayTime)
Show the given string in the status area of the status bar. |
static void |
showStatus(String s)
Show the given string in the status area of the status bar. |
static void |
showStatus(String s,
int displayTime)
Show the given string in the status area of the status bar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static JMenu addMenu(Container container, String titleKey, int mnemonic, String[] itemKeys)
public static JMenu addMenu(JFrame f, String titleKey, int mnemonic, String[] itemKeys)
public static JMenu addMenu(JApplet a, String titleKey, int mnemonic, String[] itemKeys)
public static JLabel createLabel(String key)
public static StatusBar createStatusBar(int[] relativeSizes)
public static JToolBar createToolBar()
public static String formatLabelString(String key)
public static String formatMessage(String patternKey, String[] params)
public static AudioClip getAudioClip(String key)
key
- Key which identifies the desired resource.public static boolean getBoolean(String key)
boolean
specified by the given key.
public static boolean getBoolean(String key, boolean defaultValue)
boolean
specified by the given key, or the given
default value if the key is not found.
public static Class getClass(String key)
Class
specified by the given key.
key
- Key which identifies the desired resource.public static Color getColor(String key)
key
- Key which identifies the desired resource.public static Color getColor(String key, Color defaultColor)
key
- Key which identifies the desired resource.public static Color getColorPreference(String key)
key
- Key which identifies the desired resource.public static String getConfigBundleName()
public static JMenu getEditMenu(Container container)
public static JMenu getEditMenuDefault(Container container)
public static int getExitConfirmation(JFrame frame)
public static JMenu getFileMenu(Container container)
public static JMenu getFileMenuDefault(Container container)
public static Font getFont(String key)
key
- Key which identifies the desired resource.public static Font getFontPreference(String key)
key
- Key which identifies the desired resource.public static JMenu getHelpMenu(Container container)
public static JMenu getHelpMenuDefault(Container container)
public static Icon getIcon(String key)
key
- Key which identifies the desired resource.public static int getInt(String key)
int
specified by the given key.
key
- Key which identifies the desired resource.public static int getInt(String key, int defaultValue)
int
specified by the given key, or the given
default value if the key is not found.
key
- Key which identifies the desired resource.public static Locale getLocale()
public static JMenuBar getMenuBar(JApplet a)
public static JMenuBar getMenuBar(JFrame f)
public static JMenu getMenuNamed(JMenuBar menuBar, String menuName)
menuBar
- The menu bar to search.menuName
- The (possibly localized) name of the menu to find.public static JMenu getOptionsMenu(Container container)
public static String getPreference(String key)
public static String getResource(String key)
public static String getResource(String key, String defaultValue)
public static String getResource(String key, Object[] args)
key
- Message key.args
- Message arguments.public static StatusBar getStatusBar()
IllegalStateException
- if the status bar has not yet been
created.public static String getStringBundleName()
public static JToolBar getToolBar()
public static JPanel getToolBarPanel()
public static JMenu getViewMenu(Container container)
public static JMenu getViewMenuDefault(Container container)
public static void launch(JFrame f, String title, Image image, int x, int y, int w, int h)
public static void openURL(AbstractApp app, URL url) throws IOException
IOException
public static void openURL(AbstractApp app, String urlString) throws IOException
IOException
public static void quitActionPerformed(JFrame frame)
public static void setConfigBundleName(String bundleName)
public static void setCursorBusy(JFrame frame, boolean busy)
public static void setOwner(Object owner)
public static void setStringBundleName(String bundleName)
public static void showStatus(String s)
public static void showStatus(String s, int displayTime)
public static void showStatus(int area, String s)
public static void showStatus(int area, String s, int displayTime)
protected static JMenu addMenuHelper(JMenuBar mb, String titleKey, String[] itemKeys)
protected static void addMenuTo(Container container, JMenu menu)
protected static void clear()
protected static JMenu getMenuFor(Container container, String actionName, String[] itemKeys)
protected static void openURLFromApplet(JApplet applet, URL url) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |