Package com.sun.javatest.tool
Class UIFactory
java.lang.Object
com.sun.javatest.tool.UIFactory
- Direct Known Subclasses:
UIFactory.UIFactoryExt
A factory for GUI components, providing support for
internationalization, tool tips, context sensitive help, and on.
UIFactory objects use a resource bundle specific to the client
class to provide the internationalization support.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
Extension to the UIFactory that allows to use more than one resource bundle. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a UIFactory object for a specific component.Create a UIFactory object for a specific class.Create a UIFactory object for a specific class. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addColorChangeObserver
(Preferences.Observer observer) Add Preferences observer to color changesvoid
addTab
(JTabbedPane tPane, String uiKey, JComponent comp) Add a component to a tabbed pane, using resources to specify the name and the tool tip for the tab.void
addToolBarActions
(JToolBar tb, Action... actions) Add a set of actions to an existing toolbar.createButton
(String uiKey) Create a button, using resources to specify the name and the tool tip.createButton
(String uiKey, ActionListener l) Create a button, using resources to specify the name and the tool tip, and with a specified ActionListener.createButton
(String uiKey, ActionListener l, String cmd) Create a button, using resources to specify the name and the tool tip, and with a specified ActionListener and action command.createButton
(String uiKey, Icon icon) Create a button containing an Icon.Create a button based on the information in an Action.createCancelButton
(String uiKey) Special method to create a cancel button.createCancelButton
(String uiKey, ActionListener l) Special method to create a cancel button.createCheckBox
(String uiKey) Create a check box, using resources to specify the name and the tool tip.createCheckBox
(String uiKey, boolean state) Create a check box, using resources to specify the name and the tool tip.createCheckBox
(String uiKey, boolean state, ButtonGroup group) Create a check box, using resources to specify the name and the tool tip, within a specified button group.createCheckBoxMenuItem
(String uiKey, String name, boolean state) Create a check box menu item, using resources to specify the name and the tool tip.<E> JComboBox
<E> createChoice
(String uiKey) Create an empty choice item, using a resource to specify the tool tip.<E> JComboBox
<E> createChoice
(String uiKey, boolean editable) Same as single parameter version, except you can select a component that allows freeform editing of the user's response.<E> JComboBox
<E> createChoice
(String uiKey, boolean editable, JLabel label) Combination of the two parameter methods, allowing you to select a mutable response and associate a label.createChoice
(String uiKey, String... choiceKeys) Create a choice item, using resources to specify the choices and the tool tip.createChoice
(String uiKey, String[] choiceKeys, boolean editable) Same as the two parametercreateChoice
, except you can make this an mutable choice component (freeform editing of the response).<E> JComboBox
<E> createChoice
(String uiKey, JLabel label) Same as the one parameter version, except a label can be associated with this component.createCloseButton
(String uiKey) Create a Close button, that will close the containing window when pressed, using a resource to specify the information for the button.createCloseButton
(String uiKey, boolean needMnemonic) Create a Close button, that will close the containing window when pressed, using a resource to specify the information for the button.createColorChooseButton
(String cs, JLabel label, ActionListener l) Creates a color-choosing button with background color set by preferences color namecreateDialog
(String uiKey, Component parent) Create an empty dialog.createDialog
(String uiKey, JFrame owner) Create an empty dialog.createDialog
(String uiKey, JFrame owner, String title, Container content) Create an empty dialog.createDialog
(String uiKey, JFrame owner, String title, Container content, Dialog.ModalityType type) Create an empty dialog.createFrame
(String uiKey, String title, Container content) Create an empty frame.createGlue
(String uiKey) Create a filler that expands to fill the available space.createHeading
(String uiKey) Create a text field for use as a heading, using a resource to specify the heading.createHelpButton
(String uiKey, String helpID) Create a Help button, that will display a specific help topic when pressed, using a resource to specify the tool tip for the button.createHelpMenuItem
(String uiKey, String helpID) Create a Help menu item, that will display a specific help topic when pressed, using resources to specify the name and mnemonic for the item.createHorizontalBox
(String uiKey) Create a horizontal placeholder "box".createHorizontalGlue
(String uiKey) Create a horizontal filler that expands to fill the available space.createHorizontalStrut
(int width) Create a horizontal filler of a given width.createIcon
(String uiKey) Create an icon, using a resource to specify the image.createIconButton
(String uiKey) Create a button containing an icon, using resources to specify the icon image and the tool tip.createIconButton
(String uiKey, ActionListener l) Create a button containing an icon, using resources to specify the icon image and the tool tip.createIconLabel
(String uiKey) Create a label containing an icon, using a resource to specify the icon image.Create an image from a named resource.createInputField
(String uiKey) Create an input text field, using a resource to specify the tool tip.createInputField
(String uiKey, int cols) Create an input text field with a specified number of columns, using a resource to specify the tool tip.createInputField
(String uiKey, int cols, JLabel label) Create an input text field with a specified number of columns, using a resource to specify the tool tip.createInputField
(String uiKey, JLabel label) Create an input text field, using a resource to specify the tool tip.createLabel
(String uiKey) Create a label, using a resource to specify the text.createLabel
(String uiKey, boolean need508) Create a label, using a resource to specify the text and an optional mnemonic.
The resource used is: uiKey.lbl the text for the label uiKey.tip the tooltip text for the label uiKey.mne the mnemonic for the label<E> JList
<E> createList
(String uiKey) Create an input text field, using a resource to specify the tool tip.<E> JList
<E> createList
(String uiKey, ListModel<E> model) Create a list component with a given data model.<E> JComboBox
<E> createLiteralChoice
(String uiKey, E... choices) Create an choice item containing literal choices, and using a resource to specify the tool tip.createLiteralMenuItem
(String literal, ActionListener l) Create a menu item for a literal string and a specified listener.createMenu
(String uiKey) Create an empty menu, using resources to specify the name and mnemonic.createMenu
(String uiKey, String[] actions, ActionListener l) Create a menu using resources and an action listener to specify the menu items, and using resources to specify the name and mnemonic.createMenu
(String uiKey, Action... actions) Create a menu, using actions to specify the menu items, and using resources to specify the name and mnemonic.createMenuBar
(String uiKey) Create an empty menu bar, using resources to specify the accessible info.
The resources used are: uiKey.name the accessible name text uiKey.desc accessible description textcreateMenuItem
(String uiKey, String action, ActionListener l) Create a menu item, using resources to specify the text and mnemonic.createMenuItem
(Action action) Create a menu item for an action.createMessageArea
(String uiKey) Create a message area, using a resource to specify the content.createMessageArea
(String uiKey, Object arg) Create a message area, using a resource to specify the content.createMessageArea
(String uiKey, Object... args) Create a message area, using a resource to specify the content.createOutputField
(String uiKey) Create an output text field, using a resource to specify the tool tip.createOutputField
(String uiKey, int cols) Create an output text field with a specified number of columns, and using a resource to specify the tool tip.createOutputField
(String uiKey, int cols, JLabel label) Create an output text field with a specified number of columns, using a resource to specify the tool tip, with an attached label.createOutputField
(String uiKey, int cols, JLabel label, boolean autoSelect) Create an output text field with a specified number of columns, using a resource to specify the tool tip, with an attached label, which can automaticly select contained text.
The resource used is: uiKey.tip the tool tip for the field uiKey.name accessible name In addition, the name of the output field is set to uiKey.createOutputField
(String uiKey, String value) Create an output text field containing a specified value, and using a resource to specify the tool tip.createOutputField
(String uiKey, String value, int cols) Create an output text field containing a specified value, with a specified number of columns, and using a resource to specify the tool tip.createOutputField
(String uiKey, String value, int cols, JLabel label) Create an output text field containing a specified value, with a specified number of columns, using a resource to specify the tool tip, with a label referencing this new field.
The resource used is: uiKey.tip the tool tip for the field uiKey.name accessible name In addition, the name of the output field is set to uiKey.createOutputField
(String uiKey, String value, int cols, JLabel label, boolean autoSelect) Create an output text field containing a specified value, with a specified number of columns, using a resource to specify the tool tip, with a label referencing this new field, which can automaticly select contained text.
The resource used is: uiKey.tip the tool tip for the field uiKey.name accessible name In addition, the name of the output field is set to uiKey.createOutputField
(String uiKey, String value, JLabel label) Create an output text field containing a specified value, using a resource to specify the tool tip, with an attached label.createOutputField
(String uiKey, JLabel label) Same as the single parameter version, except a label, which labels this new component, will be set.createOutputField
(String uiKey, JLabel label, boolean autoSelect) Create an output text field with a specified number of columns, using a resource to specify the tool tip, which can automaticly select contained text.
The label'ssetLabelFor()
will be set.createPanel
(String uiKey) Create an empty panel.createPanel
(String uiKey, boolean focusable) Create an empty panel.createPanel
(String uiKey, LayoutManager layout) Create an empty panel with a specific layout manager.createPanel
(String uiKey, LayoutManager layout, boolean focusable) Create an empty panel with a specific layout manager.createPopupMenu
(String uiKey) Create an empty popup menu.createPopupMenu
(String uiKey, String[] actions, ActionListener l) Create an popup menu.createProgressBar
(String uiKey, int orient) Create a basic progress bar.createProgressBar
(String uiKey, int orient, BoundedRangeModel model) Create a basic progress bar.createRadioButton
(String uiKey, ButtonGroup group) Create a radio button, using resources to specify the name and tool tip.createRadioButtonMenuItem
(String uiKey, String name) Create a check box menu item, using resources to specify the name and the tool tip.Surround a component in a scroll pane.createScrollPane
(JComponent c, int vsp, int hsp) Same as the single argument version, with options for altering the scrollbar appearance policy.createSlider
(String uiKey, int min, int max, int value) Create a slider, using resources to specify the the tool tip.createSplitPane
(int orient) Create an empty split pane with the given orientation.createSplitPane
(int orient, Component c1, Component c2) Create an empty split pane with the given components inside.createTabbedPane
(String uiKey) Create an empty tabbed pane.createTabbedPane
(String uiKey, JComponent... children) Create a tabbed pane with a given set of component panes, using resources to determine the name and tool tip for each tab.createTable
(String uiKey, TableModel model) Create a table with a given data model.createTextArea
(String uiKey) Create a text area, using a resource to specify the tool tip.createTextArea
(String uiKey, JLabel label) Create a text area, using a resource to specify the tool tip.createTitledBorder
(String uiKey) Create a titled border, using a resource to specify the title.createToolBar
(String uiKey) Create an empty toolbar.createToolBar
(String uiKey, Action... actions) Create a toolbar, using actions to specify the buttons, and using resources to specify the name and mnemonic.createToolBar
(String uiKey, JButton... buttons) Create a toolbar, using buttons.createWaitDialog
(String uiKey, Component parent) Create a dialog which will ask the user to wait.createWaitDialog
(String uiKey, JFrame owner) Create a dialog which will ask the user to wait.void
dispose()
Dispose of any owned resources.static Font
static Color
Get default input color (while by default)int
Get the screen resolution, in dots per inch, as provided by the default AWT toolkit.com.sun.javatest.tool.jthelp.HelpBroker
Get the help broker associated with this factory.getI18NColor
(String key) Get a color from the resource bundle.int
getI18NMnemonic
(String key) Get a keycode from the resource bundle.Get the resource bundle used to obtain the resources for the components create by this factory.getI18NString
(String key) Get a string from the resource bundle.getI18NString
(String key, Object arg) Get a string from the resource bundle.getI18NString
(String key, Object... args) Get a string from the resource bundle.getIconURL
(String uiKey) Get the resource URL for an icon specified in a resource bundle.static Color
Get invalid input color (red by default)static Color
Get valid input color (green by default)void
initDialog
(JDialog d, String uiKey) Configure a dialog with accessibility information.void
Configure a frame with accessibility information and an icon.void
Initialize an empty menu, using resources to specify the name and mnemonic.void
initMenu
(JMenu m, String uiKey, String[] actions, ActionListener l) Initialize a menu using resources and an action listener to specify the menu items, and using resources to specify the name and mnemonic.void
Set properties on an existing panel.void
initPanel
(JPanel p, String uiKey, LayoutManager layout, boolean focusable) Set properties on an existing panel, including the layout manager.void
setAccessibleDescription
(Component c, String uiKey) Sets only the accessible description for the given context, using the given key.void
setAccessibleDescription
(AccessibleContext c, String uiKey) Sets only the accessible description for the given context, using the given key.void
setAccessibleInfo
(Component c, String uiKey) Sets the accessible name and description for the given component.void
setAccessibleInfo
(AccessibleContext c, String uiKey) Sets the accessibility name and description for the given context using the given key as the base.void
setAccessibleName
(Component c, String uiKey) Sets only the accessible name for the given context, using the given key.void
setAccessibleName
(AccessibleContext c, String uiKey) Sets only the accessible name for the given context, using the given key.static void
setColorByName
(String name, Color c) Set Color by preferences namestatic void
Set all colors to default valuesstatic void
setDefaultInputColor
(Color newColor) Set default input colorvoid
Set the parent component to be used for dialogs created by this factory.void
Set the help ID for the context-sensitive help for a component.static void
setInvalidInputColor
(Color newColor) Set invalid input colorvoid
setMnemonic
(AbstractButton b, String uiKey) Set the mnemonic a button.void
setToolTip
(JComponent c, String uiKey) Set a tool tip for a component from a resource in the factory's resource bundle.static void
setValidInputColor
(Color newColor) Set valid input colorvoid
showCustomInfoDialog
(String uiKey, Object msg) Show a dialog which provides the user with an informational message.int
showCustomYesNoDialog
(String uiKey, Component msg) Show a confirmation dialog with Yes and No buttons, using a resource to specify the title and component for the message.
The resources used are: uiKey.title the title for the dialog The method will block until the dialog is dismissed by the user.void
Show an error dialog, using a resource to specify the error message.void
Show an error dialog, using a resource to specify the error message.void
Show an error dialog, using a resource to specify the error message.void
Show an error dialog containing stack trace information, using a resource to specify the error message.void
showInformation
(String uiKey) Show an information dialog, using a resource to specify the error message.void
showInformationDialog
(String uiKey, Object... args) Show a message only dialog, no user feedback.void
showInformationDialog
(String uiKey, Object[] args, Component parent) void
showLiteralError
(String title, String msg) Show a error dialog to the user, using previously localized (or unlocalized) strings for the message and title.int
showOKCancelDialog
(String uiKey) Show a confirmation dialog with OK and Cancel buttons, using a resource to specify the message and title.int
showOKCancelDialog
(String uiKey, Object arg) Show a confirmation dialog with OK and Cancel buttons, using a resource to specify the message and title.int
showOKCancelDialog
(String uiKey, Object... args) Show a confirmation dialog with OK and Cancel buttons, using a resource to specify the message and title.int
showYesNoCancelDialog
(String uiKey) Show a confirmation dialog with Yes, No and Cancel buttons, using a resource to specify the message and title.int
showYesNoCancelDialog
(String uiKey, Object arg) Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.int
showYesNoCancelDialog
(String uiKey, Object... args) Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.int
showYesNoDialog
(String uiKey) Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.int
showYesNoDialog
(String uiKey, Object arg) Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.int
showYesNoDialog
(String uiKey, Object... args) Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.
-
Field Details
-
CANCEL
Constant to identify the cancellation option.- See Also:
-
-
Constructor Details
-
UIFactory
Create a UIFactory object for a specific class. The class is used to determine the resource bundle for i18n strings; the bundle is named i18n.properties in the same package as the specified class.- Parameters:
c
- the class used to determine the i18n propertieshelpBroker
- the help broker to be used when creating help buttons
-
UIFactory
Create a UIFactory object for a specific component. The component's class is used to determine the resource bundle for i18n strings; the bundle is named i18n.properties in the same package as the specified class.- Parameters:
c
- the component used to determine the i18n propertieshelpBroker
- the help broker to be used when creating help buttons
-
UIFactory
Create a UIFactory object for a specific class. The class is used to determine the resource bundle for i18n strings; the bundle is named i18n.properties in the same package as the specified class.- Parameters:
c
- the class used to determine the i18n propertiesp
- the parent component to be used for any dialogs that are createdhelpBroker
- the help broker to be used when creating help buttons
-
-
Method Details
-
getBaseFont
-
getInvalidInputColor
Get invalid input color (red by default)- Returns:
- Color of invalid input
-
setInvalidInputColor
Set invalid input color- Parameters:
newColor
- new invalid input color
-
getValidInputColor
Get valid input color (green by default)- Returns:
- Color of valid input
-
setValidInputColor
Set valid input color- Parameters:
newColor
- new valid input color
-
getDefaultInputColor
Get default input color (while by default)- Returns:
- Color of default input
-
setDefaultInputColor
Set default input color- Parameters:
newColor
- new default input color
-
setColorByName
Set Color by preferences name- Parameters:
name
- Color's preferences namec
- new Color to set
-
setDefaultColors
public static void setDefaultColors()Set all colors to default values -
addColorChangeObserver
Add Preferences observer to color changes- Parameters:
observer
-
-
createColorChooseButton
Creates a color-choosing button with background color set by preferences color name- Parameters:
cs
- preferences color name. Used to set background color and is set as JButton.namelabel
- JLabel for buttonl
- ActionListener for button- Returns:
- color-choosing button
-
setDialogParent
Set the parent component to be used for dialogs created by this factory. This setting cannot be changed after it is set.- Parameters:
p
- The parent component, should not be null.
-
getDotsPerInch
public int getDotsPerInch()Get the screen resolution, in dots per inch, as provided by the default AWT toolkit.- Returns:
- the screen resolution, in dots per inch
-
getHelpBroker
public com.sun.javatest.tool.jthelp.HelpBroker getHelpBroker()Get the help broker associated with this factory.- Returns:
- the help broker associated with this factory
-
getI18NResourceBundle
Get the resource bundle used to obtain the resources for the components create by this factory.- Returns:
- the resource bundle used to obtain the resources for the components create by this factory
-
getI18NMnemonic
Get a keycode from the resource bundle.- Parameters:
key
- the name of the resource to be returned- Returns:
- the first character of the string that was found
-
getI18NColor
Get a color from the resource bundle.- Parameters:
key
- the base name of the resource to be returned- Returns:
- the color identified in the resource
-
getI18NString
Get a string from the resource bundle.- Parameters:
key
- the name of the resource to be returned- Returns:
- the string that was found
-
getI18NString
Get a string from the resource bundle.- Parameters:
key
- the name of the resource to be returnedarg
- an argument to be formatted into the result usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- the formatted string
-
getI18NString
Get a string from the resource bundle.- Parameters:
key
- the name of the resource to be returnedargs
- an array of arguments to be formatted into the result usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- the formatted string
-
setHelp
Set the help ID for the context-sensitive help for a component.- Parameters:
comp
- the component for which to set the help IDhelpID
- the help ID identifying the context sensitive help for the component
-
setToolTip
Set a tool tip for a component from a resource in the factory's resource bundle.
By convention, tool tip resources end in ".tip". Most components created by this factory will already have a tool tip set, so this method need not be called for them.
Also, the component's accessible description text will automatically be set to the supplied tooltip text.
The resources used are:uiKey.tip the tool tip for the component - Parameters:
c
- the component for which to set the tool tipuiKey
- the base name of the resource to be used
-
setAccessibleDescription
Sets only the accessible description for the given context, using the given key.uiKey.desc accessible description - Parameters:
c
- the component to modifyuiKey
- the base name of the resource to be used- See Also:
-
setAccessibleDescription
Sets only the accessible description for the given context, using the given key.uiKey.desc accessible description - Parameters:
c
- the context object to modifyuiKey
- the base name of the resource to be used
-
setAccessibleName
Sets only the accessible name for the given context, using the given key.- Parameters:
c
- the component object to modifyuiKey
- the base name of the resource to be used- See Also:
-
setAccessibleName
Sets only the accessible name for the given context, using the given key.uiKey.name accessible name - Parameters:
c
- the context object to modifyuiKey
- the base name of the resource to be used
-
setAccessibleInfo
Sets the accessible name and description for the given component.- Parameters:
c
- the component object to modifyuiKey
- the base name of the resource to be used- See Also:
-
setAccessibleInfo
Sets the accessibility name and description for the given context using the given key as the base. The resources used are:uiKey.name accessible name uiKey.desc accessible description text - Parameters:
c
- the context object to modifyuiKey
- the base name of the resource to be used
-
createTitledBorder
Create a titled border, using a resource to specify the title.
The resource used is:uiKey.bdr the text for the title - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the border that was created
-
createHorizontalGlue
Create a horizontal filler that expands to fill the available space. The name of the glue component will be set to uikey. No resource strings are required at this time.- Parameters:
uiKey
- the base name of the resource to be used- Returns:
- a filler component that expands to fill the available space
-
createGlue
Create a filler that expands to fill the available space.- Parameters:
uiKey
- the base name of the resource to be used- Returns:
- a filler component that expands to fill the available space
-
createHorizontalStrut
Create a horizontal filler of a given width.- Parameters:
width
- the desired width of the filler component- Returns:
- a filler component of a given width
-
createButton
Create a button, using resources to specify the name and the tool tip.
The resources used are:
In addition, the name of the button and the action command for the button is set to uiKey.uiKey.btn the name for the button uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resources to be used- Returns:
- the button that was created
- See Also:
-
createButton
Create a button based on the information in an Action.- Parameters:
a
- the Action for which to define the button- Returns:
- the button that was created
-
createButton
Create a button containing an Icon.- Parameters:
uiKey
- the base name of the resource to be usedicon
- the icon to appear in the button- Returns:
- the button that was created
-
createButton
Create a button, using resources to specify the name and the tool tip, and with a specified ActionListener.
The resources used are:
In addition, the name of the button and the action command for the button is set to uiKey.uiKey.btn the name for the button uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resources to be usedl
- the ActionListener to be add to the button- Returns:
- the button that was created
-
createButton
Create a button, using resources to specify the name and the tool tip, and with a specified ActionListener and action command.
The resources used are:
In addition, the name of the button is set to uiKey.uiKey.btn the name for the button uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resources to be usedl
- the ActionListener to be add to the buttoncmd
- the action command to be set for the button- Returns:
- the button that was created
-
createCancelButton
Special method to create a cancel button. Differs from a standard button because it does not require a mnemonic, per the Java Look and Feel standard.- Parameters:
uiKey
- key to use to get the tooltip with- Returns:
- the button that was created
-
createCancelButton
Special method to create a cancel button. Differs from a standard button because it does not require a mnemonic, per the Java Look and Feel standard.- Parameters:
uiKey
- key to use to get the tooltip withl
- listener to attach to the created button- Returns:
- the button that was created
-
createCloseButton
Create a Close button, that will close the containing window when pressed, using a resource to specify the information for the button.
The resources used are:
In addition, the name of the button is set to uiKey.uiKey.btn the name for the button uiKey.mne the mnemonic for the button uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resources to be used- Returns:
- the button that was created
- See Also:
-
createCloseButton
Create a Close button, that will close the containing window when pressed, using a resource to specify the information for the button.
The resources used are:
In addition, the name of the button is set to uiKey.uiKey.btn the name for the button uiKey.mne the mnemonic for the button, if required uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resources to be usedneedMnemonic
- a boolean indicating whether or not a mnemonic should be set on the button. If the button is going to be the default button for a dialog, it does not need a mnemonic.- Returns:
- the button that was created
- See Also:
-
createHelpButton
Create a Help button, that will display a specific help topic when pressed, using a resource to specify the tool tip for the button.
The resource used is:
In addition, the name of the button is set to uiKey.uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resources to be usedhelpID
- the help ID for the help topic to be displayed when the button is pressed- Returns:
- the button that was created
- See Also:
-
createIconButton
Create a button containing an icon, using resources to specify the icon image and the tool tip.
The resources used are:uiKey.icon the name of the resource for the icon image uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the button that was created
-
createIconButton
Create a button containing an icon, using resources to specify the icon image and the tool tip.
The resources used are:uiKey.icon the name of the resource for the icon image uiKey.tip the tool tip for the button - Parameters:
uiKey
- the base name of the resource to be usedl
- the action listener to attach to the new button- Returns:
- the button that was created
-
createRadioButton
Create a radio button, using resources to specify the name and tool tip.
The button is initially set tofalse
. The resources used are:
In addition, the name of the button is set to uiKey.uiKey.rb the label for the button uiKey.tip the tool tip for the button uiKey.mne the mnemonic for the button - Parameters:
uiKey
- the base name of the resources to be usedgroup
- the group to which the check box will be added- Returns:
- the radio button that was created
- See Also:
-
setMnemonic
Set the mnemonic a button. The resources used are:uiKey.mne The keystroke to use - Parameters:
b
- the button to modifyuiKey
- the base name of the resources to be used- See Also:
-
createCheckBox
Create a check box, using resources to specify the name and the tool tip.
The resources used are:
In addition, the name of the check box is set to uiKey.uiKey.ckb the name for the check box uiKey.tip the tool tip for the button uiKey.mne the mnemonic for the button - Parameters:
uiKey
- the base name of the resources to be used- Returns:
- the check box that was created
- See Also:
-
createCheckBox
Create a check box, using resources to specify the name and the tool tip.
The resources used are:
In addition, the name of the check box is set to uiKey.uiKey.ckb the name for the check box uiKey.tip the tool tip for the button uiKey.mne the mnemonic for the button - Parameters:
uiKey
- the base name of the resources to be usedstate
- the initial state of the check box- Returns:
- the check box that was created
- See Also:
-
createCheckBox
Create a check box, using resources to specify the name and the tool tip, within a specified button group.
The resources used are:
In addition, the name of the check box is set to uiKey.uiKey.ckb the name for the check box uiKey.tip the tool tip for the button uiKey.mne the mnemonic for the button - Parameters:
uiKey
- the base name of the resources to be usedstate
- the initial state of the check boxgroup
- the group to which the check box will be added- Returns:
- the check box that was created
-
createChoice
Create a choice item, using resources to specify the choices and the tool tip.
The resources used are:
In addition, the name of the choice is set to uiKey. Note: the choice item is created with the choices set to the names of the resources used -- not the values. This means that the client can examine and manipulate the choices, including the selected choice, as location-independent resource names. A custom renderer is used to ensure that the correctly localized value is displayed to the user.uiKey.choiceKeysi.chc the choice to appear in the item, for 0 <= i < choiceKeys.length uiKey.name the accessible name for the selector uiKey.tip the tool tip for the choice item - Parameters:
uiKey
- the base name of the resources to be used for the menuchoiceKeys
- an array of strings used to construct the resource names for the choices.- Returns:
- the choice item that was created
- See Also:
-
createChoice
Same as the two parametercreateChoice
, except you can make this an mutable choice component (freeform editing of the response). If the component is to be editable, an additional uiKey.ed resource is needed to set the component name of the editable field which will be onscreen.- Parameters:
uiKey
- the base name of the resources to be used for the menuchoiceKeys
- an array of strings used to construct the resource names for the choices.editable
- True if the choice component should allow freeform editing of the response.- Returns:
- a choice box with the attributes indicated by the parameters
- See Also:
-
createChoice
Create an empty choice item, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the choice is set to uiKey.uiKey.tip the tool tip for the choice item - Parameters:
uiKey
- the base name of the resources to be used for the menu- Returns:
- the choice component that was created
-
createChoice
Same as single parameter version, except you can select a component that allows freeform editing of the user's response.- Parameters:
uiKey
- the base name of the resources to be used for the menueditable
- True if the user should be allowed to edit the response.- Returns:
- the choice component that was created
- See Also:
-
createChoice
Same as the one parameter version, except a label can be associated with this component. This is to support accessibility.- Parameters:
uiKey
- the base name of the resources to be used for the menulabel
- Label to associate with this component- Returns:
- the choice component that was created
- See Also:
-
createChoice
Combination of the two parameter methods, allowing you to select a mutable response and associate a label.- Parameters:
uiKey
- the base name of the resources to be used for the menueditable
- True if the user should be allowed to edit the response.label
- Label to associate with this component- Returns:
- a choice box with the attributes indicated by the parameters
- See Also:
-
createLiteralChoice
Create an choice item containing literal choices, and using a resource to specify the tool tip. The choices appear as given: for example, this method might be used to create a choice item containing a set of filenames from which to choose.
Note that if the choices are strings, they should probably be localized, and if they are otherwise should probably be shown to the user using a renderer which produces localized output. The resource used is:
In addition, the name of the choice is set to uiKey.uiKey.tip the tool tip for the choice item - Parameters:
uiKey
- the base name of the resources to be used for the menuchoices
- the choices to appear in the choice item- Returns:
- the choice item that was created
- See Also:
-
createIcon
Create an icon, using a resource to specify the image.
The resource used is:uiKey.icon the name of a resource containing the image - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the icon that was created
- Throws:
MissingResourceException
- if the image resource cannot be found- See Also:
-
getIconURL
Get the resource URL for an icon specified in a resource bundle.
The resource used is:uiKey.icon the name of a resource containing the image - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the URL for the resource obtained from the resource bundle
- Throws:
MissingResourceException
- if the image resource cannot be found
-
createIconLabel
Create a label containing an icon, using a resource to specify the icon image.
The resource used is:uiKey.icon the name of the resource for the icon image - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the image that was created
- Throws:
MissingResourceException
- if the image resource cannot be found- See Also:
-
createImage
Create an image from a named resource.- Parameters:
r
- The resource containing the image data.- Returns:
- the image that was created
- Throws:
MissingResourceException
- if the image resource cannot be found
-
createLabel
Create a label, using a resource to specify the text.
The resource used is:uiKey.lbl the text for the label - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the label that was created
- See Also:
-
createLabel
Create a label, using a resource to specify the text and an optional mnemonic.
The resource used is:uiKey.lbl the text for the label uiKey.tip the tooltip text for the label uiKey.mne the mnemonic for the label - Parameters:
uiKey
- the base name of the resource to be usedneed508
- whether or not a mnemonic and tooltip should be set for this label- Returns:
- the label that was created
- See Also:
-
createList
Create an input text field, using a resource to specify the tool tip.
The resource used is:uiKey.tip the tool tip for the field /** Create an empty list component.
Note: list components do not currently support tool tips. When they do, this method will use a resource to specify the tool tip. The resources used are:uiKey.name the accessible name of the list uiKey.desc the accessible description of the list - Parameters:
uiKey
- the base name of the resource to be used (currently ignored)- Returns:
- the list that was created
-
createList
Create a list component with a given data model.
Note: list components do not currently support tool tips. When they do, this method will use a resource to specify the tool tip. The resources used are:uiKey.name the accessible name of the list uiKey.desc the accessible description of the list - Parameters:
uiKey
- the base name of the resource to be used (currently ignored)model
- the data model for this list- Returns:
- the list that was created
-
createMenuBar
Create an empty menu bar, using resources to specify the accessible info.
The resources used are:uiKey.name the accessible name text uiKey.desc accessible description text - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the menu bar that was created
-
createMenu
Create an empty menu, using resources to specify the name and mnemonic.
The resources used are:uiKey.menu the display name of the menu uiKey.mne the single character mnemonic for the menu uiKey.desc accessible description text - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the menu that was created
- See Also:
-
initMenu
Initialize an empty menu, using resources to specify the name and mnemonic.
The resources used are:uiKey.menu the display name of the menu uiKey.mne the single character mnemonic for the menu uiKey.desc accessible description text - Parameters:
m
- the menu the be initializeduiKey
- the base name of the resource to be used- See Also:
-
createMenu
Create a menu, using actions to specify the menu items, and using resources to specify the name and mnemonic.
The resources used are:uiKey.menu the display name of the menu uiKey.mne the single character mnemonic for the menu - Parameters:
uiKey
- the base name of the resources to be usedactions
- the actions from which to create the menu items; use null in the array to indicate if and where a separator is required- Returns:
- the menu that was created
- See Also:
-
createMenu
Create a menu using resources and an action listener to specify the menu items, and using resources to specify the name and mnemonic.
The resources used are:uiKey.menu the display name of the menu uiKey.mne the single character mnemonic for the menu uiKey.actionsi.mit the text for the menu item, for 0 <= i < choiceKeys.length uiKey.actionsi.mne the single character mnemonic for the menu item, for 0 <= i < choiceKeys.length - Parameters:
uiKey
- the base name of the resources to be usedactions
- the qualifying names for the resources for the individual menu items; use null in the array to indicate if and where a separator is requiredl
- the action listener to be used for each menu item- Returns:
- the menu that was created
- See Also:
-
initMenu
Initialize a menu using resources and an action listener to specify the menu items, and using resources to specify the name and mnemonic.
The resources used are:uiKey.menu the display name of the menu uiKey.mne the single character mnemonic for the menu uiKey.actionsi.mit the text for the menu item, for 0 <= i < choiceKeys.length uiKey.actionsi.mne the single character mnemonic for the menu item, for 0 <= i < choiceKeys.length - Parameters:
m
- the menu the be initializeduiKey
- the base name of the resources to be usedactions
- the qualifying names for the resources for the individual menu items; use null in the array to indicate if and where a separator is requiredl
- the action listener to be used for each menu item- See Also:
-
createPopupMenu
Create an empty popup menu.- Parameters:
uiKey
- the base name of the resource to be used (currently ignored)- Returns:
- the popup menu that was created
- See Also:
-
createPopupMenu
Create an popup menu.- Parameters:
uiKey
- the base name of the resource to be usedactions
- the qualifying names for the resources for the individual menu items; use null in the array to indicate if and where a separator is requiredl
- the action listener to be used for each menu item- Returns:
- the popup menu that was created
- See Also:
-
createMenuItem
Create a menu item for an action. The name of the item is set to the action name.- Parameters:
action
- from which to create the menu item- Returns:
- the menu item that was created
- See Also:
-
createMenuItem
Create a menu item, using resources to specify the text and mnemonic.
The resources used are:uiKey.action.mit the text for the menu item uiKey.action.mne the single character mnemonic for the menu item - Parameters:
uiKey
- the base name of the resources to be usedaction
- the qualifying name for the resources for the menu iteml
- the action listener for the menu item- Returns:
- the menu item that was created
- See Also:
-
createCheckBoxMenuItem
Create a check box menu item, using resources to specify the name and the tool tip.
The resources used are:
In addition, the name of the check box is set to uiKey.uiKey.name.ckb the name for the menu item uiKey.name.tip the tool tip for the menu item - Parameters:
uiKey
- the base name of the resources to be usedname
- a qualifying name for the resources used for this menu itemstate
- the initial state of the check box- Returns:
- the check box that was created
-
createHelpMenuItem
Create a Help menu item, that will display a specific help topic when pressed, using resources to specify the name and mnemonic for the item.
The resource used is:
In addition, the name of the choice is set to uiKey.uiKey.mit the text for the menu item uiKey.mne the mnemonic for the menu item - Parameters:
uiKey
- the base name of the resources to be usedhelpID
- the help ID for the help topic to be displayed when the button is pressed- Returns:
- the button that was created
- See Also:
-
createLiteralMenuItem
Create a menu item for a literal string and a specified listener. No mnemonic key nor descriptive action is added.- Parameters:
literal
- the text for the menu iteml
- the action listener to add to the menu item- Returns:
- the menu item that was created
-
createRadioButtonMenuItem
Create a check box menu item, using resources to specify the name and the tool tip.
The resources used are:
In addition, the name of the radio button is set to uiKey.uiKey.name.ckb the name for the menu item uiKey.name.tip the tool tip for the menu item - Parameters:
uiKey
- the base name of the resources to be usedname
- a qualifying name for the resources used for this menu item- Returns:
- the check box that was created
-
createScrollPane
Surround a component in a scroll pane. The name of the scroll pane component is set toc.getName()
plus the .sp suffix.- Parameters:
c
- The component to put into the scroll pane.- Returns:
- a scroll pane component with the given component inside
-
createScrollPane
Same as the single argument version, with options for altering the scrollbar appearance policy.- Parameters:
c
- The component to put into the scroll pane.vsp
- vertical scrollbar policy settinghsp
- horizontal scrollbar policy setting- Returns:
- a scroll pane component with the given component inside
- See Also:
-
createSlider
Create a slider, using resources to specify the the tool tip.
The resource used is:uiKey.name.tip the tool tip for the menu item - Parameters:
uiKey
- the base name of the resources to be usedmin
- the minimum value for the slidermax
- the maximum value for the slidervalue
- the initial value for the slider- Returns:
- the slider that was created
-
createSplitPane
Create an empty split pane with the given orientation.- Parameters:
orient
- The split's orientation.- Returns:
- The empty split pane component.
- See Also:
-
createSplitPane
Create an empty split pane with the given components inside.- Parameters:
orient
- The split's orientation.c1
- first component (left)c2
- first component (right)- Returns:
- The populated split pane component.
- See Also:
-
createTabbedPane
Create an empty tabbed pane.- Parameters:
uiKey
- the base name of the resources to be used- Returns:
- an empty (no tabs) tabbed pane
The resources used are:
The tooltip will automatically be transferred to the pane's accessible description. UseuiKey. name
the accessible name for the tab pane. Where name
is the literal string "name".uiKey. tip
the accessible name for the tab pane. Where tip
is the literal string "tip".setAccessibleDescription()
to set it independently.
-
createTabbedPane
Create a tabbed pane with a given set of component panes, using resources to determine the name and tool tip for each tab.
The resources used are:
The tooltip will automatically be transferred to the pane's accessible description. UseuiKey.namei.tab the display name for the tab, where namei is the component name for children[i] uiKey.namei.tip the tool tip for the tab, where namei is the component name for children[i] uiKey. name
the accessible name for the tab pane. Where name
is the literal string "name".uiKey. tip
the accessible name for the tab pane. Where tip
is the literal string "tip".setAccessibleDescription()
to set it independently.- Parameters:
uiKey
- the base name of the resources to be usedchildren
- an array of components to be added into the tabbed pane- Returns:
- the tabbed pane that was created
- See Also:
-
addTab
Add a component to a tabbed pane, using resources to specify the name and the tool tip for the tab.
The resources used are:uiKey.tab the name for the tab uiKey.tip the tool tip for the tab - Parameters:
tPane
- the tabbed pane to which to add the componentuiKey
- the base name of the resources to be usedcomp
- the component to be added
-
createTable
Create a table with a given data model. Resources used:
The tooltip will automatically be transferred to the pane's accessible description. UseuiKey. name
the accessible name for the tab pane. Where name
is the literal string "name".uiKey. tip
the accessible name for the tab pane. Where tip
is the literal string "tip".setAccessibleDescription()
to set it independently.- Parameters:
uiKey
- the base name of the resources to be used (currently ignored)model
- the data model for the table- Returns:
- the table that was created
- See Also:
-
createHeading
Create a text field for use as a heading, using a resource to specify the heading.
The resource used is:
In addition, the name of the output field is set to uiKey.uiKey.txt the text for the heading - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the text field that was created
-
createInputField
Create an input text field, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the input field is set to uiKey. By default, the input field is 10 characters wide.uiKey.tip the tool tip for the field - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the input field that was created
-
createInputField
Create an input text field, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the input field is set to uiKey. By default, the input field is 10 characters wide.uiKey.tip the tool tip for the field - Parameters:
uiKey
- the base name of the resource to be usedlabel
- the label to associate with this component- Returns:
- the input field that was created
-
createInputField
Create an input text field with a specified number of columns, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the input field is set to uiKey.uiKey.tip the tool tip for the field - Parameters:
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characters- Returns:
- the input field that was created
- See Also:
-
createInputField
Create an input text field with a specified number of columns, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the input field is set to uiKey.uiKey.tip the tool tip for the field - Parameters:
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characterslabel
- the label to associate with this component- Returns:
- the input field that was created
- See Also:
-
createMessageArea
Create a message area, using a resource to specify the content. The message area will be transparent, uneditable, and word-wrapped.
The resource used is:uiKey.txt the text for the message area - Parameters:
uiKey
- the name of the resource to be used- Returns:
- the message area that was created
-
createMessageArea
Create a message area, using a resource to specify the content. The message area will be transparent, uneditable, and word-wrapped.
The resource used is:uiKey.txt the text for the message area uiKey.name accessible name uiKey.desc accessible description text - Parameters:
uiKey
- the name of the resource to be usedarg
- an argument to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- the message area that was created
-
createMessageArea
Create a message area, using a resource to specify the content. The message area will be transparent, uneditable, and word-wrapped.
The resource used is:uiKey.txt the text for the message area uiKey.name accessible name uiKey.desc accessible description text - Parameters:
uiKey
- the name of the resource to be usedargs
- an array of arguments to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- the message area that was created
-
createOutputField
Create an output text field, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the output field is set to uiKey. By default, the output field is empty and is 10 characters wide.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the empty output field that was created
- See Also:
-
createOutputField
Same as the single parameter version, except a label, which labels this new component, will be set. The label'ssetLabelFor()
will be set.- Parameters:
uiKey
- the base name of the resource to be usedlabel
- the label which is labeling this field- Returns:
- the output field that was created
- See Also:
-
createOutputField
Create an output text field with a specified number of columns, using a resource to specify the tool tip, which can automaticly select contained text.
The label'ssetLabelFor()
will be set.- Parameters:
uiKey
- the base name of the resource to be usedlabel
- the label which is labeling this fieldautoSelect
- automaticly select text containing in the field on focus- Returns:
- the output field that was created
- See Also:
-
createOutputField
Create an output text field with a specified number of columns, and using a resource to specify the tool tip.
The resource used is:
In addition, the name of the output field is set to uiKey. The output field is initially empty.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characters- Returns:
- the empty output field that was created
-
createOutputField
Create an output text field with a specified number of columns, using a resource to specify the tool tip, with an attached label.
The resource used is:
In addition, the name of the output field is set to uiKey. The output field is initially empty.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characterslabel
- the label which is labeling this field- Returns:
- the empty output field that was created
-
createOutputField
Create an output text field with a specified number of columns, using a resource to specify the tool tip, with an attached label, which can automaticly select contained text.
The resource used is:
In addition, the name of the output field is set to uiKey. The output field is initially empty.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characterslabel
- the label which is labeling this fieldautoSelect
- automaticly select text containing in the field on focus- Returns:
- the empty output field that was created
-
createOutputField
Create an output text field containing a specified value, and using a resource to specify the tool tip.
The resource used is:
In addition, the name of the output field is set to uiKey. By default, the output field is 10 characters wide.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedvalue
- the initial text to appear in the output field- Returns:
- the output field that was created
-
createOutputField
Create an output text field containing a specified value, using a resource to specify the tool tip, with an attached label.
The resource used is:
In addition, the name of the output field is set to uiKey. By default, the output field is 10 characters wide.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedvalue
- the text to appear in the output fieldlabel
- the label which is labeling this field- Returns:
- the output field that was created
-
createOutputField
Create an output text field containing a specified value, with a specified number of columns, and using a resource to specify the tool tip.
The resource used is:
In addition, the name of the output field is set to uiKey.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedvalue
- the text to appear in the output fieldcols
- the default width of the field, in characters- Returns:
- the output field that was created
-
createOutputField
Create an output text field containing a specified value, with a specified number of columns, using a resource to specify the tool tip, with a label referencing this new field.
The resource used is:
In addition, the name of the output field is set to uiKey.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedvalue
- the text to appear in the output fieldcols
- the default width of the field, in characterslabel
- the label which is labeling this field- Returns:
- the output field that was created
-
createOutputField
public JTextField createOutputField(String uiKey, String value, int cols, JLabel label, boolean autoSelect) Create an output text field containing a specified value, with a specified number of columns, using a resource to specify the tool tip, with a label referencing this new field, which can automaticly select contained text.
The resource used is:
In addition, the name of the output field is set to uiKey.uiKey.tip the tool tip for the field uiKey.name accessible name - Parameters:
uiKey
- the base name of the resource to be usedvalue
- the text to appear in the output fieldcols
- the default width of the field, in characterslabel
- the label which is labeling this fieldautoSelect
- automaticly select text containing in the field on focus- Returns:
- the output field that was created
-
createTextArea
Create a text area, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the text area is set to uiKey.uiKey.tip the tool tip for the text area - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- the text area that was created
-
createTextArea
Create a text area, using a resource to specify the tool tip.
The resource used is:
In addition, the name of the text area is set to uiKey.uiKey.tip the tool tip for the text area - Parameters:
uiKey
- the base name of the resource to be usedlabel
- the label that labels this text area. May be null.- Returns:
- the text area that was created
-
createProgressBar
Create a basic progress bar. The resource used is:uiKey.name accessible name uiKey.tip the tool tip for the text area - Parameters:
uiKey
- the base name of the resource to be usedorient
- Value fromJProgressBar
- Returns:
- Returns a progress bar component with the specified attributes.
- See Also:
-
createProgressBar
Create a basic progress bar. The resources used are:uiKey.name accessible name uiKey.tip the tool tip for the text area - Parameters:
uiKey
- the base name of the resource to be usedorient
- Value fromJProgressBar
model
- Model to use for the progress bar.- Returns:
- Returns a progress bar component with the specified attributes.
- See Also:
-
createToolBar
Create an empty toolbar. The resources used are:uiKey.name accessible name uiKey.desc accessible description text - Parameters:
uiKey
- Used to obtain accessibility info and name the component- Returns:
- the tool bar that was created
-
createToolBar
Create a toolbar, using actions to specify the buttons, and using resources to specify the name and mnemonic.
The components on the toolbar which are derived from the actions will have their accessible description set to the short description of the action. The resources used are:uiKey.name accessible name uiKey.desc accessible description text - Parameters:
uiKey
- used to obtain accessibility info and name the componentactions
- the actions from which to create the buttons; use null in the array to indicate if and where a separator is required- Returns:
- the tool bar that was created
- See Also:
-
createToolBar
Create a toolbar, using buttons. The resources used are:uiKey.name accessible name uiKey.desc accessible description text - Parameters:
uiKey
- used to obtain accessibility info and name the componentbuttons
- the buttons to be included in the bar.
use null in the array to indicate if and where a separator is required- Returns:
- the tool bar that was created
-
addToolBarActions
Add a set of actions to an existing toolbar.- Parameters:
tb
- The toolbar to modify, must not be null.actions
- the actions from which to create the buttons; use null in the array to indicate if and where a separator is required- See Also:
-
showInformation
Show an information dialog, using a resource to specify the error message.
The resource used is:
The method will block until the dialog is dismissed by the user.uiKey.err the information message to be displayed - Parameters:
uiKey
- the base name of the resource to be used
-
showError
Show an error dialog, using a resource to specify the error message.
The resource used is:
The method will block until the dialog is dismissed by the user.uiKey.err the error message to be displayed - Parameters:
uiKey
- the base name of the resource to be used
-
showError
Show an error dialog, using a resource to specify the error message.
The resource used is:uiKey.err the error message to be displayed - Parameters:
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
The method will block until the dialog is dismissed by the user.
-
showError
Show an error dialog, using a resource to specify the error message.
The resource used is:uiKey.err the error message to be displayed - Parameters:
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
The method will block until the dialog is dismissed by the user.
-
showError
Show an error dialog containing stack trace information, using a resource to specify the error message.
The resource used is:uiKey.err the error message to be displayed - Parameters:
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content usingtrace
- an array of arguments containing stack trace information to be added to scrollable pane The method will block until the dialog is dismissed by the user.
-
showLiteralError
Show a error dialog to the user, using previously localized (or unlocalized) strings for the message and title.- Parameters:
title
- Title string for the dialog. If null, a generic title will be used.msg
- Message to show to the user.- See Also:
-
showOKCancelDialog
Show a confirmation dialog with OK and Cancel buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showOKCancelDialog
Show a confirmation dialog with OK and Cancel buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showOKCancelDialog
Show a confirmation dialog with OK and Cancel buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showYesNoDialog
Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showYesNoDialog
Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showCustomYesNoDialog
Show a confirmation dialog with Yes and No buttons, using a resource to specify the title and component for the message.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedmsg
- the GUI component to be used as the dialogs message payload- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showYesNoDialog
Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showYesNoCancelDialog
Show a confirmation dialog with Yes, No and Cancel buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showYesNoCancelDialog
Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showYesNoCancelDialog
Show a confirmation dialog with Yes and No buttons, using a resource to specify the message and title.
The resources used are:
The method will block until the dialog is dismissed by the user.uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content usingMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
- Returns:
- an integer signifying how the dialog was dismissed
- See Also:
-
showInformationDialog
Show a message only dialog, no user feedback. The resources used are:uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedargs
- any arguments to be used to create the message
-
showInformationDialog
-
showCustomInfoDialog
Show a dialog which provides the user with an informational message.The resources used are:
uiKey.title the title for the dialog - Parameters:
uiKey
- the base name of the resource to be usedmsg
- the body of the dialog, which should have already been localized
-
createHorizontalBox
Create a horizontal placeholder "box".
The name of this new box component will be set to uiKey.- Parameters:
uiKey
- the base name of the resource to be used- Returns:
- A Box component
- See Also:
-
createPanel
Create an empty panel.
In the J2SE 1.4 and greater world, panels are focusable by default, so this panel will be focusable. Because of this, accessibility information must be set, therefore the following resources are required from the resource bundle:
The name of this new component will be set to uiKey.uiKey.name the accessible name of the panel uiKey.desc accessible description text - Parameters:
uiKey
- the base name of the resource to be used- Returns:
- An empty panel component
-
createPanel
Create an empty panel.
In the J2SE 1.4 and greater world, panels are focusable by default, so this panel will be focusable. Use this method to control whether or not the panel remains focusable. If you choose 'true', the following must be provided in the resource bundle:
The name of this new component will be set to uiKey.uiKey.name the accessible name of the panel uiKey.desc accessible description text - Parameters:
uiKey
- the base name of the resource to be usedfocusable
- If true, the panel will accept focus in the GUI. If false it will not. Note that if it is focusable, you need to provide accessibility text.- Returns:
- An empty panel component
-
createPanel
Create an empty panel with a specific layout manager.
In the J2SE 1.4 and greater world, panels are focusable by default, so this panel will be focusable. Because of this, accessibility information must be set, therefore the following resources are required from the resource bundle:
The name of this new component will be set to uiKey.uiKey.name the accessible name of the panel uiKey.desc accessible description text - Parameters:
uiKey
- the base name of the resource to be usedlayout
- the layout manager instance to use in this panel- Returns:
- An empty panel component
-
createPanel
Create an empty panel with a specific layout manager.
In the J2SE 1.4 and greater world, panels are focusable by default, so this panel will be focusable. Use this method to control whether or not the panel remains focusable. If you choose 'true', the following must be provided in the resource bundle:
The name of this new component will be set to uiKey.uiKey.name the accessible name of the panel uiKey.desc accessible description text - Parameters:
uiKey
- the base name of the resource to be usedlayout
- the layout manager instance to use in this panelfocusable
- If true, the panel will accept focus in the GUI. If false it will not. Note that if it is focusable, you need to provide accessibility text.- Returns:
- An empty panel component
-
initPanel
Set properties on an existing panel.- Parameters:
p
- the panel to modifyuiKey
- the base name of the resource to be usedfocusable
- If true, the panel will accept focus in the GUI. If false it will not. Note that if it is focusable, you need to provide accessibility text.
-
initPanel
Set properties on an existing panel, including the layout manager.- Parameters:
p
- the panel to modifyuiKey
- the base name of the resource to be usedlayout
- the layout manager instance that this panel should usefocusable
- If true, the panel will accept focus in the GUI. If false it will not. Note that if it is focusable, you need to provide accessibility text.
-
createDialog
Create an empty dialog.
SeeinitDialog(JDialog,String)
for required resources.- Parameters:
uiKey
- the base name of the resource to be usedparent
- the parent component of this dialog- Returns:
- an empty dialog component
- See Also:
-
createDialog
Create an empty dialog.
SeeinitDialog(JDialog,String)
for required resources.- Parameters:
uiKey
- the base name of the resource to be usedowner
- the parent frame of this dialog- Returns:
- an empty dialog component
- See Also:
-
createDialog
Create an empty dialog.
SeeinitDialog(JDialog,String)
for required resources.- Parameters:
uiKey
- the base name of the resource to be usedowner
- the parent frame of this dialog. If owner is null - icon is set to the dialogtitle
- the localized title of this new dialogcontent
- the content to go into the dialog- Returns:
- an dialog component with the given content component and title
- See Also:
-
createDialog
public JDialog createDialog(String uiKey, JFrame owner, String title, Container content, Dialog.ModalityType type) Create an empty dialog.
SeeinitDialog(JDialog,String)
for required resources.- Parameters:
uiKey
- the base name of the resource to be usedowner
- the parent frame of this dialog. If owner is null - icon is set to the dialogtitle
- the localized title of this new dialogcontent
- the content to go into the dialogtype
- specifies whether dialog blocks input to other windows when shown. null value and unsupported modality types are equivalent to MODELESS- Returns:
- an dialog component with the given content component and title
- See Also:
-
createFrame
Create an empty frame. Unlike to dialogcreateDialog(String uiKey, JFrame owner, String title, Container content)
it can't be modal, it's always free-floating and it has minimize and maximize buttons. SeeinitFrame(JFrame,String)
for required resources.- Parameters:
uiKey
- the base name of the resource to be usedtitle
- the localized title of this new framecontent
- the content to go into the frame- Returns:
- a frame component with the given content component and title
- See Also:
-
createWaitDialog
Create a dialog which will ask the user to wait. The resources used are:uiKey.txt the message to be displayed uiKey.title the title for the dialog - Parameters:
uiKey
- The prefix to retrieve strings to be displayed.parent
- The parent component of this new dialog.- Returns:
- a dialog appropriate for asking the user to wait
-
createWaitDialog
Create a dialog which will ask the user to wait. The resources used are:uiKey.txt the message to be displayed uiKey.title the title for the dialog uiKey.desc accessible description of the dialog uiKey.name accessible name of the dialog - Parameters:
uiKey
- The prefix to retrieve strings to be displayed.owner
- The frame which will own this new dialog.- Returns:
- a dialog appropriate for asking the user to wait
-
initDialog
Configure a dialog with accessibility information.uiKey.desc accessible description of the dialog uiKey.name accessible name of the dialog uiKey.root component name for the root pane of the dialog - Parameters:
d
- the dialog to upgradeuiKey
- Key to retrieve the new properties with
-
initFrame
Configure a frame with accessibility information and an icon.uiKey.desc accessible description of the frame uiKey.name accessible name of the frame uiKey.root component name for the root pane of the frame - Parameters:
d
- the frame to upgradeuiKey
- Key to retrieve the new properties with
-
dispose
public void dispose()Dispose of any owned resources.
-