public class UIFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
UIFactory.Colors |
static class |
UIFactory.UIFactoryExt
Extension to the UIFactory that allows to use more than one resource
bundle.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CANCEL
Constant to identify the cancellation option.
|
Constructor and Description |
---|
UIFactory(java.lang.Class c,
java.awt.Component p,
javax.help.HelpBroker helpBroker)
Create a UIFactory object for a specific class.
|
UIFactory(java.lang.Class c,
javax.help.HelpBroker helpBroker)
Create a UIFactory object for a specific class.
|
UIFactory(java.awt.Component c,
javax.help.HelpBroker helpBroker)
Create a UIFactory object for a specific component.
|
Modifier and Type | Method and Description |
---|---|
static void |
addColorChangeObserver(Preferences.Observer observer)
Add Preferences observer to color changes
|
void |
addTab(javax.swing.JTabbedPane tPane,
java.lang.String uiKey,
javax.swing.JComponent comp)
Add a component to a tabbed pane, using resources to specify
the name and the tool tip for the tab.
|
void |
addToolBarActions(javax.swing.JToolBar tb,
javax.swing.Action[] actions)
Add a set of actions to an existing toolbar.
|
javax.swing.JButton |
createButton(javax.swing.Action a)
Create a button based on the information in an Action.
|
javax.swing.JButton |
createButton(java.lang.String uiKey)
Create a button, using resources to specify the name and the tool tip.
|
javax.swing.JButton |
createButton(java.lang.String uiKey,
java.awt.event.ActionListener l)
Create a button, using resources to specify the name and the tool tip,
and with a specified ActionListener.
|
javax.swing.JButton |
createButton(java.lang.String uiKey,
java.awt.event.ActionListener l,
java.lang.String cmd)
Create a button, using resources to specify the name and the tool tip,
and with a specified ActionListener and action command.
|
javax.swing.JButton |
createButton(java.lang.String uiKey,
javax.swing.Icon icon)
Create a button containing an Icon.
|
javax.swing.JButton |
createCancelButton(java.lang.String uiKey)
Special method to create a cancel button.
|
javax.swing.JButton |
createCancelButton(java.lang.String uiKey,
java.awt.event.ActionListener l)
Special method to create a cancel button.
|
javax.swing.JCheckBox |
createCheckBox(java.lang.String uiKey)
Create a check box, using resources to specify the name and the tool tip.
|
javax.swing.JCheckBox |
createCheckBox(java.lang.String uiKey,
boolean state)
Create a check box, using resources to specify the name and the tool tip.
|
javax.swing.JCheckBox |
createCheckBox(java.lang.String uiKey,
boolean state,
javax.swing.ButtonGroup group)
Create a check box, using resources to specify the name and the tool tip,
within a specified button group.
|
javax.swing.JCheckBoxMenuItem |
createCheckBoxMenuItem(java.lang.String uiKey,
java.lang.String name,
boolean state)
Create a check box menu item, using resources to specify the
name and the tool tip.
|
javax.swing.JComboBox |
createChoice(java.lang.String uiKey)
Create an empty choice item, using a resource to specify the tool tip.
|
javax.swing.JComboBox |
createChoice(java.lang.String uiKey,
boolean editable)
Same as single parameter version, except you can select a
component that allows freeform editing of the user's response.
|
javax.swing.JComboBox |
createChoice(java.lang.String uiKey,
boolean editable,
javax.swing.JLabel label)
Combination of the two parameter methods, allowing you to select
a mutable response and associate a label.
|
javax.swing.JComboBox |
createChoice(java.lang.String uiKey,
javax.swing.JLabel label)
Same as the one parameter version, except a label can be
associated with this component.
|
javax.swing.JComboBox |
createChoice(java.lang.String uiKey,
java.lang.String[] choiceKeys)
Create a choice item, using resources to specify the choices and the
tool tip.
|
javax.swing.JComboBox |
createChoice(java.lang.String uiKey,
java.lang.String[] choiceKeys,
boolean editable)
Same as the two parameter
createChoice , except you can
make this an mutable choice component (freeform editing of the
response). |
javax.swing.JButton |
createCloseButton(java.lang.String uiKey)
Create a Close button, that will close the containing window when pressed,
using a resource to specify the information for the button.
|
javax.swing.JButton |
createCloseButton(java.lang.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.
|
javax.swing.JButton |
createColorChooseButton(java.lang.String cs,
javax.swing.JLabel label,
java.awt.event.ActionListener l)
Creates a color-choosing button with background color set by preferences color name
|
javax.swing.JDialog |
createDialog(java.lang.String uiKey,
java.awt.Component parent)
Create an empty dialog.
|
javax.swing.JDialog |
createDialog(java.lang.String uiKey,
javax.swing.JFrame owner)
Create an empty dialog.
|
javax.swing.JDialog |
createDialog(java.lang.String uiKey,
javax.swing.JFrame owner,
java.lang.String title,
java.awt.Container content)
Create an empty dialog.
|
javax.swing.JDialog |
createDialog(java.lang.String uiKey,
javax.swing.JFrame owner,
java.lang.String title,
java.awt.Container content,
java.awt.Dialog.ModalityType type)
Create an empty dialog.
|
javax.swing.JFrame |
createFrame(java.lang.String uiKey,
java.lang.String title,
java.awt.Container content)
Create an empty frame.
|
java.awt.Component |
createGlue(java.lang.String uiKey)
Create a filler that expands to fill the available space.
|
javax.swing.JTextField |
createHeading(java.lang.String uiKey)
Create a text field for use as a heading, using a resource to specify
the heading.
|
javax.swing.JButton |
createHelpButton(java.lang.String uiKey,
java.lang.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.
|
javax.swing.JMenuItem |
createHelpMenuItem(java.lang.String uiKey,
java.lang.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.
|
javax.swing.Box |
createHorizontalBox(java.lang.String uiKey)
Create a horizontal placeholder "box".
|
java.awt.Component |
createHorizontalGlue(java.lang.String uiKey)
Create a horizontal filler that expands to fill the available space.
|
java.awt.Component |
createHorizontalStrut(int width)
Create a horizontal filler of a given width.
|
javax.swing.Icon |
createIcon(java.lang.String uiKey)
Create an icon, using a resource to specify the image.
|
javax.swing.JButton |
createIconButton(java.lang.String uiKey)
Create a button containing an icon, using resources to specify the
icon image and the tool tip.
|
javax.swing.JButton |
createIconButton(java.lang.String uiKey,
java.awt.event.ActionListener l)
Create a button containing an icon, using resources to specify the
icon image and the tool tip.
|
javax.swing.JLabel |
createIconLabel(java.lang.String uiKey)
Create a label containing an icon, using a resource to specify the
icon image.
|
java.awt.Image |
createImage(java.lang.String r)
Create an image from a named resource.
|
javax.swing.JTextField |
createInputField(java.lang.String uiKey)
Create an input text field, using a resource to specify the tool tip.
|
javax.swing.JTextField |
createInputField(java.lang.String uiKey,
int cols)
Create an input text field with a specified number of columns,
using a resource to specify the tool tip.
|
javax.swing.JTextField |
createInputField(java.lang.String uiKey,
int cols,
javax.swing.JLabel label)
Create an input text field with a specified number of columns,
using a resource to specify the tool tip.
|
javax.swing.JTextField |
createInputField(java.lang.String uiKey,
javax.swing.JLabel label)
Create an input text field, using a resource to specify the tool tip.
|
javax.swing.JLabel |
createLabel(java.lang.String uiKey)
Create a label, using a resource to specify the text.
|
javax.swing.JLabel |
createLabel(java.lang.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 |
javax.swing.JList |
createList(java.lang.String uiKey)
Create an input text field, using a resource to specify the tool tip.
|
javax.swing.JList |
createList(java.lang.String uiKey,
javax.swing.ListModel model)
Create a list component with a given data model.
|
javax.swing.JComboBox |
createLiteralChoice(java.lang.String uiKey,
java.lang.Object[] choices)
Create an choice item containing literal choices,
and using a resource to specify the tool tip.
|
javax.swing.JMenuItem |
createLiteralMenuItem(java.lang.String literal,
java.awt.event.ActionListener l)
Create a menu item for a literal string and a specified listener.
|
javax.swing.JMenu |
createMenu(java.lang.String uiKey)
Create an empty menu, using resources to specify the name and mnemonic.
|
javax.swing.JMenu |
createMenu(java.lang.String uiKey,
javax.swing.Action[] actions)
Create a menu, using actions to specify the menu items,
and using resources to specify the name and mnemonic.
|
javax.swing.JMenu |
createMenu(java.lang.String uiKey,
java.lang.String[] actions,
java.awt.event.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.
|
javax.swing.JMenuBar |
createMenuBar(java.lang.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 text |
javax.swing.JMenuItem |
createMenuItem(javax.swing.Action action)
Create a menu item for an action.
|
javax.swing.JMenuItem |
createMenuItem(java.lang.String uiKey,
java.lang.String action,
java.awt.event.ActionListener l)
Create a menu item, using resources to specify the text and mnemonic.
|
javax.swing.JTextArea |
createMessageArea(java.lang.String uiKey)
Create a message area, using a resource to specify the content.
|
javax.swing.JTextArea |
createMessageArea(java.lang.String uiKey,
java.lang.Object arg)
Create a message area, using a resource to specify the content.
|
javax.swing.JTextArea |
createMessageArea(java.lang.String uiKey,
java.lang.Object[] args)
Create a message area, using a resource to specify the content.
|
javax.swing.JTextField |
createOutputField(java.lang.String uiKey)
Create an output text field, using a resource to specify the tool tip.
|
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
int cols)
Create an output text field with a specified number of columns,
and using a resource to specify the tool tip.
|
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
int cols,
javax.swing.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.
|
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
int cols,
javax.swing.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. |
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
javax.swing.JLabel label)
Same as the single parameter version, except a label, which labels
this new component, will be set.
|
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
javax.swing.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's setLabelFor() will be set. |
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
java.lang.String value)
Create an output text field containing a specified value,
and using a resource to specify the tool tip.
|
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
java.lang.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.
|
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
java.lang.String value,
int cols,
javax.swing.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. |
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
java.lang.String value,
int cols,
javax.swing.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. |
javax.swing.JTextField |
createOutputField(java.lang.String uiKey,
java.lang.String value,
javax.swing.JLabel label)
Create an output text field containing a specified value,
using a resource to specify the tool tip,
with an attached label.
|
javax.swing.JPanel |
createPanel(java.lang.String uiKey)
Create an empty panel.
|
javax.swing.JPanel |
createPanel(java.lang.String uiKey,
boolean focusable)
Create an empty panel.
|
javax.swing.JPanel |
createPanel(java.lang.String uiKey,
java.awt.LayoutManager layout)
Create an empty panel with a specific layout manager.
|
javax.swing.JPanel |
createPanel(java.lang.String uiKey,
java.awt.LayoutManager layout,
boolean focusable)
Create an empty panel with a specific layout manager.
|
javax.swing.JPopupMenu |
createPopupMenu(java.lang.String uiKey)
Create an empty popup menu.
|
javax.swing.JPopupMenu |
createPopupMenu(java.lang.String uiKey,
java.lang.String[] actions,
java.awt.event.ActionListener l)
Create an popup menu.
|
javax.swing.JProgressBar |
createProgressBar(java.lang.String uiKey,
int orient)
Create a basic progress bar.
|
javax.swing.JProgressBar |
createProgressBar(java.lang.String uiKey,
int orient,
javax.swing.BoundedRangeModel model)
Create a basic progress bar.
|
javax.swing.JRadioButton |
createRadioButton(java.lang.String uiKey,
javax.swing.ButtonGroup group)
Create a radio button, using resources to specify the name and tool tip.
|
javax.swing.JRadioButtonMenuItem |
createRadioButtonMenuItem(java.lang.String uiKey,
java.lang.String name)
Create a check box menu item, using resources to specify the
name and the tool tip.
|
javax.swing.JScrollPane |
createScrollPane(javax.swing.JComponent c)
Surround a component in a scroll pane.
|
javax.swing.JScrollPane |
createScrollPane(javax.swing.JComponent c,
int vsp,
int hsp)
Same as the single argument version, with options for altering
the scrollbar appearance policy.
|
javax.swing.JSlider |
createSlider(java.lang.String uiKey,
int min,
int max,
int value)
Create a slider, using resources to specify the the tool tip.
|
javax.swing.JSplitPane |
createSplitPane(int orient)
Create an empty split pane with the given orientation.
|
javax.swing.JSplitPane |
createSplitPane(int orient,
java.awt.Component c1,
java.awt.Component c2)
Create an empty split pane with the given components inside.
|
javax.swing.JTabbedPane |
createTabbedPane(java.lang.String uiKey)
Create an empty tabbed pane.
|
javax.swing.JTabbedPane |
createTabbedPane(java.lang.String uiKey,
javax.swing.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.
|
javax.swing.JTable |
createTable(java.lang.String uiKey,
javax.swing.table.TableModel model)
Create a table with a given data model.
|
javax.swing.JTextArea |
createTextArea(java.lang.String uiKey)
Create a text area, using a resource to specify the tool tip.
|
javax.swing.JTextArea |
createTextArea(java.lang.String uiKey,
javax.swing.JLabel label)
Create a text area, using a resource to specify the tool tip.
|
javax.swing.border.Border |
createTitledBorder(java.lang.String uiKey)
Create a titled border, using a resource to specify the title.
|
javax.swing.JToolBar |
createToolBar(java.lang.String uiKey)
Create an empty toolbar.
|
javax.swing.JToolBar |
createToolBar(java.lang.String uiKey,
javax.swing.Action[] actions)
Create a toolbar, using actions to specify the buttons,
and using resources to specify the name and mnemonic.
|
javax.swing.JToolBar |
createToolBar(java.lang.String uiKey,
javax.swing.JButton[] buttons)
Create a toolbar, using buttons.
|
javax.swing.JDialog |
createWaitDialog(java.lang.String uiKey,
java.awt.Component parent)
Create a dialog which will ask the user to wait.
|
javax.swing.JDialog |
createWaitDialog(java.lang.String uiKey,
javax.swing.JFrame owner)
Create a dialog which will ask the user to wait.
|
void |
dispose()
Dispose of any owned resources.
|
static java.awt.Font |
getBaseFont() |
static java.awt.Color |
getDefaultInputColor()
Get default input color (while by default)
|
int |
getDotsPerInch()
Get the screen resolution, in dots per inch, as provided
by the default AWT toolkit.
|
javax.help.HelpBroker |
getHelpBroker()
Get the help broker associated with this factory.
|
java.awt.Color |
getI18NColor(java.lang.String key)
Get a color from the resource bundle.
|
int |
getI18NMnemonic(java.lang.String key)
Get a keycode from the resource bundle.
|
I18NResourceBundle |
getI18NResourceBundle()
Get the resource bundle used to obtain the resources for the
components create by this factory.
|
java.lang.String |
getI18NString(java.lang.String key)
Get a string from the resource bundle.
|
java.lang.String |
getI18NString(java.lang.String key,
java.lang.Object arg)
Get a string from the resource bundle.
|
java.lang.String |
getI18NString(java.lang.String key,
java.lang.Object[] args)
Get a string from the resource bundle.
|
java.net.URL |
getIconURL(java.lang.String uiKey)
Get the resource URL for an icon specified in a resource bundle.
|
static java.awt.Color |
getInvalidInputColor()
Get invalid input color (red by default)
|
static java.awt.Color |
getValidInputColor()
Get valid input color (green by default)
|
void |
initDialog(javax.swing.JDialog d,
java.lang.String uiKey)
Configure a dialog with accessibility information.
|
void |
initFrame(javax.swing.JFrame d,
java.lang.String uiKey)
Configure a frame with accessibility information and an icon.
|
void |
initMenu(javax.swing.JMenu m,
java.lang.String uiKey)
Initialize an empty menu, using resources to specify the name and mnemonic.
|
void |
initMenu(javax.swing.JMenu m,
java.lang.String uiKey,
java.lang.String[] actions,
java.awt.event.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 |
initPanel(javax.swing.JPanel p,
java.lang.String uiKey,
boolean focusable)
Set properties on an existing panel.
|
void |
initPanel(javax.swing.JPanel p,
java.lang.String uiKey,
java.awt.LayoutManager layout,
boolean focusable)
Set properties on an existing panel, including the layout manager.
|
void |
setAccessibleDescription(javax.accessibility.AccessibleContext c,
java.lang.String uiKey)
Sets only the accessible description for the given context, using the
given key.
|
void |
setAccessibleDescription(java.awt.Component c,
java.lang.String uiKey)
Sets only the accessible description for the given context, using the
given key.
|
void |
setAccessibleInfo(javax.accessibility.AccessibleContext c,
java.lang.String uiKey)
Sets the accessibility name and description for the given context
using the given key as the base.
|
void |
setAccessibleInfo(java.awt.Component c,
java.lang.String uiKey)
Sets the accessible name and description for the given
component.
|
void |
setAccessibleName(javax.accessibility.AccessibleContext c,
java.lang.String uiKey)
Sets only the accessible name for the given context, using the
given key.
|
void |
setAccessibleName(java.awt.Component c,
java.lang.String uiKey)
Sets only the accessible name for the given context, using the
given key.
|
static void |
setColorByName(java.lang.String name,
java.awt.Color c)
Set Color by preferences name
|
static void |
setDefaultColors()
Set all colors to default values
|
static void |
setDefaultInputColor(java.awt.Color newColor)
Set default input color
|
void |
setDialogParent(java.awt.Component p)
Set the parent component to be used for dialogs created by this factory.
|
void |
setHelp(java.awt.Component comp,
java.lang.String helpID)
Set the help ID for the context-sensitive help for a component.
|
static void |
setInvalidInputColor(java.awt.Color newColor)
Set invalid input color
|
void |
setMnemonic(javax.swing.AbstractButton b,
java.lang.String uiKey)
Set the mnemonic a button.
|
void |
setToolTip(javax.swing.JComponent c,
java.lang.String uiKey)
Set a tool tip for a component from a resource in the factory's resource
bundle.
|
static void |
setValidInputColor(java.awt.Color newColor)
Set valid input color
|
void |
showCustomInfoDialog(java.lang.String uiKey,
java.lang.Object msg)
Show a dialog which provides the user with an informational message.
|
int |
showCustomYesNoDialog(java.lang.String uiKey,
java.awt.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 |
showError(java.lang.String uiKey)
Show an error dialog, using a resource to specify the error message.
|
void |
showError(java.lang.String uiKey,
java.lang.Object arg)
Show an error dialog, using a resource to specify the error message.
|
void |
showError(java.lang.String uiKey,
java.lang.Object[] args)
Show an error dialog, using a resource to specify the error message.
|
void |
showError(java.lang.String uiKey,
java.lang.Object[] args,
java.lang.Object[] trace)
Show an error dialog containing stack trace information, using a
resource to specify the error message.
|
void |
showInformation(java.lang.String uiKey)
Show an information dialog, using a resource to specify the error message.
|
void |
showInformationDialog(java.lang.String uiKey,
java.lang.Object[] args)
Show a message only dialog, no user feedback.
|
void |
showInformationDialog(java.lang.String uiKey,
java.lang.Object[] args,
java.awt.Component parent) |
void |
showLiteralError(java.lang.String title,
java.lang.String msg)
Show a error dialog to the user, using previously localized (or
unlocalized) strings for the message and title.
|
int |
showOKCancelDialog(java.lang.String uiKey)
Show a confirmation dialog with OK and Cancel buttons,
using a resource to specify the message and title.
|
int |
showOKCancelDialog(java.lang.String uiKey,
java.lang.Object arg)
Show a confirmation dialog with OK and Cancel buttons,
using a resource to specify the message and title.
|
int |
showOKCancelDialog(java.lang.String uiKey,
java.lang.Object[] args)
Show a confirmation dialog with OK and Cancel buttons,
using a resource to specify the message and title.
|
int |
showYesNoCancelDialog(java.lang.String uiKey)
Show a confirmation dialog with Yes, No and Cancel buttons,
using a resource to specify the message and title.
|
int |
showYesNoCancelDialog(java.lang.String uiKey,
java.lang.Object arg)
Show a confirmation dialog with Yes and No buttons,
using a resource to specify the message and title.
|
int |
showYesNoCancelDialog(java.lang.String uiKey,
java.lang.Object[] args)
Show a confirmation dialog with Yes and No buttons,
using a resource to specify the message and title.
|
int |
showYesNoDialog(java.lang.String uiKey)
Show a confirmation dialog with Yes and No buttons,
using a resource to specify the message and title.
|
int |
showYesNoDialog(java.lang.String uiKey,
java.lang.Object arg)
Show a confirmation dialog with Yes and No buttons,
using a resource to specify the message and title.
|
int |
showYesNoDialog(java.lang.String uiKey,
java.lang.Object[] args)
Show a confirmation dialog with Yes and No buttons,
using a resource to specify the message and title.
|
public static final java.lang.String CANCEL
public UIFactory(java.lang.Class c, javax.help.HelpBroker helpBroker)
c
- the class used to determine the i18n propertieshelpBroker
- the help broker to be used when creating help buttonspublic UIFactory(java.awt.Component c, javax.help.HelpBroker helpBroker)
c
- the component used to determine the i18n propertieshelpBroker
- the help broker to be used when creating help buttonspublic UIFactory(java.lang.Class c, java.awt.Component p, javax.help.HelpBroker helpBroker)
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 buttonspublic static java.awt.Font getBaseFont()
public static java.awt.Color getInvalidInputColor()
public static void setInvalidInputColor(java.awt.Color newColor)
newColor
- new invalid input colorpublic static java.awt.Color getValidInputColor()
public static void setValidInputColor(java.awt.Color newColor)
newColor
- new valid input colorpublic static java.awt.Color getDefaultInputColor()
public static void setDefaultInputColor(java.awt.Color newColor)
newColor
- new default input colorpublic static void setColorByName(java.lang.String name, java.awt.Color c)
name
- Color's preferences namec
- new Color to setpublic static void setDefaultColors()
public static void addColorChangeObserver(Preferences.Observer observer)
observer
- public javax.swing.JButton createColorChooseButton(java.lang.String cs, javax.swing.JLabel label, java.awt.event.ActionListener l)
cs
- preferences color name. Used to set background color and is set as JButton.namelabel
- JLabel for buttonl
- ActionListener for buttonpublic void setDialogParent(java.awt.Component p)
p
- The parent component, should not be null.public int getDotsPerInch()
public javax.help.HelpBroker getHelpBroker()
public I18NResourceBundle getI18NResourceBundle()
public int getI18NMnemonic(java.lang.String key)
key
- the name of the resource to be returnedpublic java.awt.Color getI18NColor(java.lang.String key)
key
- the base name of the resource to be returnedpublic java.lang.String getI18NString(java.lang.String key)
key
- the name of the resource to be returnedpublic java.lang.String getI18NString(java.lang.String key, java.lang.Object arg)
key
- the name of the resource to be returnedarg
- an argument to be formatted into the result using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
public java.lang.String getI18NString(java.lang.String key, java.lang.Object[] args)
key
- the name of the resource to be returnedargs
- an array of arguments to be formatted into the result using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
public void setHelp(java.awt.Component comp, java.lang.String helpID)
comp
- the component for which to set the help IDhelpID
- the help ID identifying the context sensitive help for
the componentpublic void setToolTip(javax.swing.JComponent c, java.lang.String uiKey)
uiKey.tip | the tool tip for the component |
c
- the component for which to set the tool tipuiKey
- the base name of the resource to be usedpublic void setAccessibleDescription(java.awt.Component c, java.lang.String uiKey)
uiKey.desc | accessible description |
c
- the component to modifyuiKey
- the base name of the resource to be usedsetAccessibleDescription(AccessibleContext,String)
public void setAccessibleDescription(javax.accessibility.AccessibleContext c, java.lang.String uiKey)
uiKey.desc | accessible description |
c
- the context object to modifyuiKey
- the base name of the resource to be usedpublic void setAccessibleName(java.awt.Component c, java.lang.String uiKey)
c
- the component object to modifyuiKey
- the base name of the resource to be usedsetAccessibleName(AccessibleContext,String)
public void setAccessibleName(javax.accessibility.AccessibleContext c, java.lang.String uiKey)
uiKey.name | accessible name |
c
- the context object to modifyuiKey
- the base name of the resource to be usedpublic void setAccessibleInfo(java.awt.Component c, java.lang.String uiKey)
c
- the component object to modifyuiKey
- the base name of the resource to be usedsetAccessibleInfo(AccessibleContext,String)
public void setAccessibleInfo(javax.accessibility.AccessibleContext c, java.lang.String uiKey)
uiKey.name | accessible name |
uiKey.desc | accessible description text |
c
- the context object to modifyuiKey
- the base name of the resource to be usedpublic javax.swing.border.Border createTitledBorder(java.lang.String uiKey)
uiKey.bdr | the text for the title |
uiKey
- the base name of the resource to be usedpublic java.awt.Component createHorizontalGlue(java.lang.String uiKey)
uiKey
- the base name of the resource to be usedpublic java.awt.Component createGlue(java.lang.String uiKey)
uiKey
- the base name of the resource to be usedpublic java.awt.Component createHorizontalStrut(int width)
width
- the desired width of the filler componentpublic javax.swing.JButton createButton(java.lang.String uiKey)
uiKey.btn | the name for the button |
uiKey.tip | the tool tip for the button |
uiKey
- the base name of the resources to be usedcreateHelpButton(java.lang.String, java.lang.String)
,
createIconButton(java.lang.String)
public javax.swing.JButton createButton(javax.swing.Action a)
a
- the Action for which to define the buttonpublic javax.swing.JButton createButton(java.lang.String uiKey, javax.swing.Icon icon)
uiKey
- the base name of the resource to be usedicon
- the icon to appear in the buttonpublic javax.swing.JButton createButton(java.lang.String uiKey, java.awt.event.ActionListener l)
uiKey.btn | the name for the button |
uiKey.tip | the tool tip for the button |
uiKey
- the base name of the resources to be usedl
- the ActionListener to be add to the buttonpublic javax.swing.JButton createButton(java.lang.String uiKey, java.awt.event.ActionListener l, java.lang.String cmd)
uiKey.btn | the name for the button |
uiKey.tip | the tool tip for the button |
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 buttonpublic javax.swing.JButton createCancelButton(java.lang.String uiKey)
uiKey
- key to use to get the tooltip withpublic javax.swing.JButton createCancelButton(java.lang.String uiKey, java.awt.event.ActionListener l)
uiKey
- key to use to get the tooltip withl
- listener to attach to the created buttonpublic javax.swing.JButton createCloseButton(java.lang.String uiKey)
uiKey.btn | the name for the button |
uiKey.mne | the mnemonic for the button |
uiKey.tip | the tool tip for the button |
uiKey
- the base name of the resources to be usedcreateButton(java.lang.String)
public javax.swing.JButton createCloseButton(java.lang.String uiKey, boolean needMnemonic)
uiKey.btn | the name for the button |
uiKey.mne | the mnemonic for the button, if required |
uiKey.tip | the tool tip for the button |
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.createButton(java.lang.String)
public javax.swing.JButton createHelpButton(java.lang.String uiKey, java.lang.String helpID)
uiKey.tip | the tool tip for the button |
uiKey
- the base name of the resources to be usedhelpID
- the help ID for the help topic to be displayed when the
button is pressedcreateButton(java.lang.String)
public javax.swing.JButton createIconButton(java.lang.String uiKey)
uiKey.icon | the name of the resource for the icon image |
uiKey.tip | the tool tip for the button |
uiKey
- the base name of the resource to be usedpublic javax.swing.JButton createIconButton(java.lang.String uiKey, java.awt.event.ActionListener l)
uiKey.icon | the name of the resource for the icon image |
uiKey.tip | the tool tip for the button |
uiKey
- the base name of the resource to be usedl
- the action listener to attach to the new buttonpublic javax.swing.JRadioButton createRadioButton(java.lang.String uiKey, javax.swing.ButtonGroup group)
false
.
The resources used are:
uiKey.rb | the label for the button |
uiKey.tip | the tool tip for the button |
uiKey.mne | the mnemonic for the button |
uiKey
- the base name of the resources to be usedgroup
- the group to which the check box will be addedcreateButton(java.lang.String)
,
createCheckBox(java.lang.String)
public void setMnemonic(javax.swing.AbstractButton b, java.lang.String uiKey)
uiKey.mne | The keystroke to use |
b
- the button to modifyuiKey
- the base name of the resources to be usedKeyStroke
public javax.swing.JCheckBox createCheckBox(java.lang.String uiKey)
uiKey.ckb | the name for the check box |
uiKey.tip | the tool tip for the button |
uiKey.mne | the mnemonic for the button |
uiKey
- the base name of the resources to be usedcreateCheckBoxMenuItem(java.lang.String, java.lang.String, boolean)
public javax.swing.JCheckBox createCheckBox(java.lang.String uiKey, boolean state)
uiKey.ckb | the name for the check box |
uiKey.tip | the tool tip for the button |
uiKey.mne | the mnemonic for the button |
uiKey
- the base name of the resources to be usedstate
- the initial state of the check boxcreateCheckBoxMenuItem(java.lang.String, java.lang.String, boolean)
public javax.swing.JCheckBox createCheckBox(java.lang.String uiKey, boolean state, javax.swing.ButtonGroup group)
uiKey.ckb | the name for the check box |
uiKey.tip | the tool tip for the button |
uiKey.mne | the mnemonic for the button |
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 addedpublic javax.swing.JComboBox createChoice(java.lang.String uiKey, java.lang.String[] choiceKeys)
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 |
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.createLiteralChoice(java.lang.String, java.lang.Object[])
public javax.swing.JComboBox createChoice(java.lang.String uiKey, java.lang.String[] choiceKeys, boolean editable)
createChoice
, 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.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.createChoice(String,String[])
public javax.swing.JComboBox createChoice(java.lang.String uiKey)
uiKey.tip | the tool tip for the choice item |
uiKey
- the base name of the resources to be used for the menupublic javax.swing.JComboBox createChoice(java.lang.String uiKey, boolean editable)
uiKey
- the base name of the resources to be used for the menueditable
- True if the user should be allowed to edit the
response.createChoice(String)
public javax.swing.JComboBox createChoice(java.lang.String uiKey, javax.swing.JLabel label)
uiKey
- the base name of the resources to be used for the menulabel
- Label to associate with this componentcreateChoice(String)
,
JLabel.setLabelFor(java.awt.Component)
public javax.swing.JComboBox createChoice(java.lang.String uiKey, boolean editable, javax.swing.JLabel label)
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 componentcreateChoice(String,JLabel)
,
createChoice(String,boolean)
,
createChoice(String)
,
JLabel.setLabelFor(java.awt.Component)
public javax.swing.JComboBox createLiteralChoice(java.lang.String uiKey, java.lang.Object[] choices)
uiKey.tip | the tool tip for the choice item |
uiKey
- the base name of the resources to be used for the menuchoices
- the choices to appear in the choice itemcreateChoice(java.lang.String, java.lang.String[])
public javax.swing.Icon createIcon(java.lang.String uiKey)
uiKey.icon | the name of a resource containing the image |
uiKey
- the base name of the resource to be usedjava.util.MissingResourceException
- if the image resource cannot be foundcreateIconButton(java.lang.String)
public java.net.URL getIconURL(java.lang.String uiKey)
uiKey.icon | the name of a resource containing the image |
uiKey
- the base name of the resource to be usedjava.util.MissingResourceException
- if the image resource cannot be foundpublic javax.swing.JLabel createIconLabel(java.lang.String uiKey)
uiKey.icon | the name of the resource for the icon image |
uiKey
- the base name of the resource to be usedjava.util.MissingResourceException
- if the image resource cannot be foundcreateLabel(java.lang.String)
public java.awt.Image createImage(java.lang.String r)
r
- The resource containing the image data.java.util.MissingResourceException
- if the image resource cannot be foundpublic javax.swing.JLabel createLabel(java.lang.String uiKey)
uiKey.lbl | the text for the label |
uiKey
- the base name of the resource to be usedcreateIconLabel(java.lang.String)
public javax.swing.JLabel createLabel(java.lang.String uiKey, boolean need508)
uiKey.lbl | the text for the label |
uiKey.tip | the tooltip text for the label |
uiKey.mne | the mnemonic for the label |
uiKey
- the base name of the resource to be usedneed508
- whether or not a mnemonic and tooltip should be set for this labelcreateIconLabel(java.lang.String)
public javax.swing.JList createList(java.lang.String uiKey)
uiKey.tip | the tool tip for the field |
uiKey.name | the accessible name of the list |
uiKey.desc | the accessible description of the list |
uiKey
- the base name of the resource to be used (currently ignored)public javax.swing.JList createList(java.lang.String uiKey, javax.swing.ListModel model)
uiKey.name | the accessible name of the list |
uiKey.desc | the accessible description of the list |
uiKey
- the base name of the resource to be used (currently ignored)model
- the data model for this listpublic javax.swing.JMenuBar createMenuBar(java.lang.String uiKey)
uiKey.name | the accessible name text |
uiKey.desc | accessible description text |
uiKey
- the base name of the resource to be usedpublic javax.swing.JMenu createMenu(java.lang.String uiKey)
uiKey.menu | the display name of the menu |
uiKey.mne | the single character mnemonic for the menu |
uiKey.desc | accessible description text |
uiKey
- the base name of the resource to be usedcreatePopupMenu(java.lang.String)
public void initMenu(javax.swing.JMenu m, java.lang.String uiKey)
uiKey.menu | the display name of the menu |
uiKey.mne | the single character mnemonic for the menu |
uiKey.desc | accessible description text |
m
- the menu the be initializeduiKey
- the base name of the resource to be usedcreatePopupMenu(java.lang.String)
public javax.swing.JMenu createMenu(java.lang.String uiKey, javax.swing.Action[] actions)
uiKey.menu | the display name of the menu |
uiKey.mne | the single character mnemonic for the menu |
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 requiredcreateMenuItem(Action)
public javax.swing.JMenu createMenu(java.lang.String uiKey, java.lang.String[] actions, java.awt.event.ActionListener l)
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 |
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 itemcreateMenuItem(String, String, ActionListener)
public void initMenu(javax.swing.JMenu m, java.lang.String uiKey, java.lang.String[] actions, java.awt.event.ActionListener l)
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 |
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 itemcreateMenuItem(String, String, ActionListener)
public javax.swing.JPopupMenu createPopupMenu(java.lang.String uiKey)
uiKey
- the base name of the resource to be used (currently ignored)createMenu(java.lang.String)
public javax.swing.JPopupMenu createPopupMenu(java.lang.String uiKey, java.lang.String[] actions, java.awt.event.ActionListener l)
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 itemcreateMenu(java.lang.String)
public javax.swing.JMenuItem createMenuItem(javax.swing.Action action)
action
- from which to create the menu itemcreateMenu(String, Action[])
public javax.swing.JMenuItem createMenuItem(java.lang.String uiKey, java.lang.String action, java.awt.event.ActionListener l)
uiKey.action.mit | the text for the menu item |
uiKey.action.mne | the single character mnemonic for the menu item |
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 itemcreateMenu(String, String[], ActionListener)
public javax.swing.JCheckBoxMenuItem createCheckBoxMenuItem(java.lang.String uiKey, java.lang.String name, boolean state)
uiKey.name.ckb | the name for the menu item |
uiKey.name.tip | the tool tip for the menu item |
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 boxpublic javax.swing.JMenuItem createHelpMenuItem(java.lang.String uiKey, java.lang.String helpID)
uiKey.mit | the text for the menu item |
uiKey.mne | the mnemonic for the menu item |
uiKey
- the base name of the resources to be usedhelpID
- the help ID for the help topic to be displayed when the
button is pressedcreateButton(java.lang.String)
public javax.swing.JMenuItem createLiteralMenuItem(java.lang.String literal, java.awt.event.ActionListener l)
literal
- the text for the menu iteml
- the action listener to add to the menu itempublic javax.swing.JRadioButtonMenuItem createRadioButtonMenuItem(java.lang.String uiKey, java.lang.String name)
uiKey.name.ckb | the name for the menu item |
uiKey.name.tip | the tool tip for the menu item |
uiKey
- the base name of the resources to be usedname
- a qualifying name for the resources used for this menu itempublic javax.swing.JScrollPane createScrollPane(javax.swing.JComponent c)
c.getName()
plus the .sp suffix.c
- The component to put into the scroll pane.public javax.swing.JScrollPane createScrollPane(javax.swing.JComponent c, int vsp, int hsp)
c
- The component to put into the scroll pane.vsp
- vertical scrollbar policy settinghsp
- horizontal scrollbar policy settingScrollPaneConstants
,
JScrollPane
public javax.swing.JSlider createSlider(java.lang.String uiKey, int min, int max, int value)
uiKey.name.tip | the tool tip for the menu item |
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 sliderpublic javax.swing.JSplitPane createSplitPane(int orient)
orient
- The split's orientation.JSplitPane.VERTICAL_SPLIT
,
JSplitPane.HORIZONTAL_SPLIT
public javax.swing.JSplitPane createSplitPane(int orient, java.awt.Component c1, java.awt.Component c2)
orient
- The split's orientation.c1
- first component (left)c2
- first component (right)JSplitPane
,
JSplitPane.VERTICAL_SPLIT
,
JSplitPane.HORIZONTAL_SPLIT
public javax.swing.JTabbedPane createTabbedPane(java.lang.String uiKey)
uiKey
- the base name of the resources to be useduiKey.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.public javax.swing.JTabbedPane createTabbedPane(java.lang.String uiKey, javax.swing.JComponent[] children)
uiKey.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.uiKey
- the base name of the resources to be usedchildren
- an array of components to be added into the tabbed panesetAccessibleDescription(Component,String)
,
setAccessibleName(Component,String)
,
setToolTip(JComponent,String)
public void addTab(javax.swing.JTabbedPane tPane, java.lang.String uiKey, javax.swing.JComponent comp)
uiKey.tab | the name for the tab |
uiKey.tip | the tool tip for the tab |
tPane
- the tabbed pane to which to add the componentuiKey
- the base name of the resources to be usedcomp
- the component to be addedpublic javax.swing.JTable createTable(java.lang.String uiKey, javax.swing.table.TableModel model)
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.uiKey
- the base name of the resources to be used (currently ignored)model
- the data model for the tablesetAccessibleDescription(Component,String)
,
setAccessibleName(Component,String)
,
setToolTip(JComponent,String)
public javax.swing.JTextField createHeading(java.lang.String uiKey)
uiKey.txt | the text for the heading |
uiKey
- the base name of the resource to be usedpublic javax.swing.JTextField createInputField(java.lang.String uiKey)
uiKey.tip | the tool tip for the field |
uiKey
- the base name of the resource to be usedpublic javax.swing.JTextField createInputField(java.lang.String uiKey, javax.swing.JLabel label)
uiKey.tip | the tool tip for the field |
uiKey
- the base name of the resource to be usedlabel
- the label to associate with this componentpublic javax.swing.JTextField createInputField(java.lang.String uiKey, int cols)
uiKey.tip | the tool tip for the field |
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characterscreateOutputField(java.lang.String)
public javax.swing.JTextField createInputField(java.lang.String uiKey, int cols, javax.swing.JLabel label)
uiKey.tip | the tool tip for the field |
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characterslabel
- the label to associate with this componentcreateOutputField(java.lang.String)
public javax.swing.JTextArea createMessageArea(java.lang.String uiKey)
uiKey.txt | the text for the message area |
uiKey
- the name of the resource to be usedpublic javax.swing.JTextArea createMessageArea(java.lang.String uiKey, java.lang.Object arg)
uiKey.txt | the text for the message area |
uiKey.name | accessible name |
uiKey.desc | accessible description text |
uiKey
- the name of the resource to be usedarg
- an argument to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
public javax.swing.JTextArea createMessageArea(java.lang.String uiKey, java.lang.Object[] args)
uiKey.txt | the text for the message area |
uiKey.name | accessible name |
uiKey.desc | accessible description text |
uiKey
- the name of the resource to be usedargs
- an array of arguments to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
public javax.swing.JTextField createOutputField(java.lang.String uiKey)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
uiKey
- the base name of the resource to be usedcreateInputField(java.lang.String)
public javax.swing.JTextField createOutputField(java.lang.String uiKey, javax.swing.JLabel label)
setLabelFor()
will be set.uiKey
- the base name of the resource to be usedlabel
- the label which is labeling this fieldcreateInputField(String)
public javax.swing.JTextField createOutputField(java.lang.String uiKey, javax.swing.JLabel label, boolean autoSelect)
setLabelFor()
will be set.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 focuscreateInputField(String)
public javax.swing.JTextField createOutputField(java.lang.String uiKey, int cols)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characterspublic javax.swing.JTextField createOutputField(java.lang.String uiKey, int cols, javax.swing.JLabel label)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
uiKey
- the base name of the resource to be usedcols
- the default width of the field, in characterslabel
- the label which is labeling this fieldpublic javax.swing.JTextField createOutputField(java.lang.String uiKey, int cols, javax.swing.JLabel label, boolean autoSelect)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
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 focuspublic javax.swing.JTextField createOutputField(java.lang.String uiKey, java.lang.String value)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
uiKey
- the base name of the resource to be usedvalue
- the initial text to appear in the output fieldpublic javax.swing.JTextField createOutputField(java.lang.String uiKey, java.lang.String value, javax.swing.JLabel label)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
uiKey
- the base name of the resource to be usedvalue
- the text to appear in the output fieldlabel
- the label which is labeling this fieldpublic javax.swing.JTextField createOutputField(java.lang.String uiKey, java.lang.String value, int cols)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
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 characterspublic javax.swing.JTextField createOutputField(java.lang.String uiKey, java.lang.String value, int cols, javax.swing.JLabel label)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
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 fieldpublic javax.swing.JTextField createOutputField(java.lang.String uiKey, java.lang.String value, int cols, javax.swing.JLabel label, boolean autoSelect)
uiKey.tip | the tool tip for the field |
uiKey.name | accessible name |
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 focuspublic javax.swing.JTextArea createTextArea(java.lang.String uiKey)
uiKey.tip | the tool tip for the text area |
uiKey
- the base name of the resource to be usedpublic javax.swing.JTextArea createTextArea(java.lang.String uiKey, javax.swing.JLabel label)
uiKey.tip | the tool tip for the text area |
uiKey
- the base name of the resource to be usedlabel
- the label that labels this text area. May be null.public javax.swing.JProgressBar createProgressBar(java.lang.String uiKey, int orient)
uiKey.name | accessible name |
uiKey.tip | the tool tip for the text area |
uiKey
- the base name of the resource to be usedorient
- Value from JProgressBar
SwingConstants.VERTICAL
,
SwingConstants.HORIZONTAL
public javax.swing.JProgressBar createProgressBar(java.lang.String uiKey, int orient, javax.swing.BoundedRangeModel model)
uiKey.name | accessible name |
uiKey.tip | the tool tip for the text area |
uiKey
- the base name of the resource to be usedorient
- Value from JProgressBar
model
- Model to use for the progress bar.SwingConstants.VERTICAL
,
SwingConstants.HORIZONTAL
public javax.swing.JToolBar createToolBar(java.lang.String uiKey)
uiKey.name | accessible name |
uiKey.desc | accessible description text |
uiKey
- Used to obtain accessibility info and name the componentpublic javax.swing.JToolBar createToolBar(java.lang.String uiKey, javax.swing.Action[] actions)
uiKey.name | accessible name |
uiKey.desc | accessible description text |
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 requiredAction.SHORT_DESCRIPTION
public javax.swing.JToolBar createToolBar(java.lang.String uiKey, javax.swing.JButton[] buttons)
uiKey.name | accessible name |
uiKey.desc | accessible description text |
uiKey
- used to obtain accessibility info and name the componentbuttons
- the buttons to be included in the bar.public void addToolBarActions(javax.swing.JToolBar tb, javax.swing.Action[] actions)
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 requiredAction.SHORT_DESCRIPTION
public void showInformation(java.lang.String uiKey)
uiKey.err | the information message to be displayed |
uiKey
- the base name of the resource to be usedpublic void showError(java.lang.String uiKey)
uiKey.err | the error message to be displayed |
uiKey
- the base name of the resource to be usedpublic void showError(java.lang.String uiKey, java.lang.Object arg)
uiKey.err | the error message to be displayed |
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
The method will block until the dialog is dismissed by the user.public void showError(java.lang.String uiKey, java.lang.Object[] args)
uiKey.err | the error message to be displayed |
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
The method will block until the dialog is dismissed by the user.public void showError(java.lang.String uiKey, java.lang.Object[] args, java.lang.Object[] trace)
uiKey.err | the error message to be displayed |
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.public void showLiteralError(java.lang.String title, java.lang.String msg)
title
- Title string for the dialog. If null, a generic title
will be used.msg
- Message to show to the user.showError(String)
,
showError(String,Object[])
,
showError(String,Object[],Object[])
public int showOKCancelDialog(java.lang.String uiKey)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedJOptionPane.OK_OPTION
,
JOptionPane.CANCEL_OPTION
public int showOKCancelDialog(java.lang.String uiKey, java.lang.Object arg)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
JOptionPane.OK_OPTION
,
JOptionPane.CANCEL_OPTION
public int showOKCancelDialog(java.lang.String uiKey, java.lang.Object[] args)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
JOptionPane.OK_OPTION
,
JOptionPane.CANCEL_OPTION
public int showYesNoDialog(java.lang.String uiKey)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedJOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
public int showYesNoDialog(java.lang.String uiKey, java.lang.Object arg)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
JOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
public int showCustomYesNoDialog(java.lang.String uiKey, java.awt.Component msg)
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedmsg
- the GUI component to be used as the dialogs message payloadJOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
public int showYesNoDialog(java.lang.String uiKey, java.lang.Object[] args)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
JOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
public int showYesNoCancelDialog(java.lang.String uiKey)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedJOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
,
JOptionPane.CANCEL_OPTION
public int showYesNoCancelDialog(java.lang.String uiKey, java.lang.Object arg)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedarg
- an argument to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
JOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
,
JOptionPane.CANCEL_OPTION
public int showYesNoCancelDialog(java.lang.String uiKey, java.lang.Object[] args)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedargs
- an array of arguments to be formatted into the content using
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
JOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
,
JOptionPane.CANCEL_OPTION
public void showInformationDialog(java.lang.String uiKey, java.lang.Object[] args)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedargs
- any arguments to be used to create the messagepublic void showInformationDialog(java.lang.String uiKey, java.lang.Object[] args, java.awt.Component parent)
public void showCustomInfoDialog(java.lang.String uiKey, java.lang.Object msg)
uiKey.title | the title for the dialog |
uiKey
- the base name of the resource to be usedmsg
- the body of the dialog, which should have already been localizedpublic javax.swing.Box createHorizontalBox(java.lang.String uiKey)
uiKey
- the base name of the resource to be usedBox
public javax.swing.JPanel createPanel(java.lang.String uiKey)
uiKey.name | the accessible name of the panel |
uiKey.desc | accessible description text |
uiKey
- the base name of the resource to be usedpublic javax.swing.JPanel createPanel(java.lang.String uiKey, boolean focusable)
uiKey.name | the accessible name of the panel |
uiKey.desc | accessible description text |
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.public javax.swing.JPanel createPanel(java.lang.String uiKey, java.awt.LayoutManager layout)
uiKey.name | the accessible name of the panel |
uiKey.desc | accessible description text |
uiKey
- the base name of the resource to be usedlayout
- the layout manager instance to use in this panelpublic javax.swing.JPanel createPanel(java.lang.String uiKey, java.awt.LayoutManager layout, boolean focusable)
uiKey.name | the accessible name of the panel |
uiKey.desc | accessible description text |
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.public void initPanel(javax.swing.JPanel p, java.lang.String uiKey, boolean focusable)
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.public void initPanel(javax.swing.JPanel p, java.lang.String uiKey, java.awt.LayoutManager layout, boolean focusable)
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.public javax.swing.JDialog createDialog(java.lang.String uiKey, java.awt.Component parent)
initDialog(JDialog,String)
for required resources.uiKey
- the base name of the resource to be usedparent
- the parent component of this dialoginitDialog(javax.swing.JDialog, java.lang.String)
public javax.swing.JDialog createDialog(java.lang.String uiKey, javax.swing.JFrame owner)
initDialog(JDialog,String)
for required resources.uiKey
- the base name of the resource to be usedowner
- the parent frame of this dialoginitDialog(javax.swing.JDialog, java.lang.String)
public javax.swing.JDialog createDialog(java.lang.String uiKey, javax.swing.JFrame owner, java.lang.String title, java.awt.Container content)
initDialog(JDialog,String)
for required resources.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 dialoginitDialog(javax.swing.JDialog, java.lang.String)
public javax.swing.JDialog createDialog(java.lang.String uiKey, javax.swing.JFrame owner, java.lang.String title, java.awt.Container content, java.awt.Dialog.ModalityType type)
initDialog(JDialog,String)
for required resources.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 MODELESSinitDialog(javax.swing.JDialog, java.lang.String)
public javax.swing.JFrame createFrame(java.lang.String uiKey, java.lang.String title, java.awt.Container content)
createDialog(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 initFrame(JFrame,String)
for required resources.uiKey
- the base name of the resource to be usedtitle
- the localized title of this new framecontent
- the content to go into the frameinitFrame(javax.swing.JFrame, java.lang.String)
public javax.swing.JDialog createWaitDialog(java.lang.String uiKey, java.awt.Component parent)
uiKey.txt | the message to be displayed |
uiKey.title | the title for the dialog |
uiKey
- The prefix to retrieve strings to be displayed.parent
- The parent component of this new dialog.public javax.swing.JDialog createWaitDialog(java.lang.String uiKey, javax.swing.JFrame owner)
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 |
uiKey
- The prefix to retrieve strings to be displayed.owner
- The frame which will own this new dialog.public void initDialog(javax.swing.JDialog d, java.lang.String uiKey)
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 |
d
- the dialog to upgradeuiKey
- Key to retrieve the new properties withpublic void initFrame(javax.swing.JFrame d, java.lang.String uiKey)
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 |
d
- the frame to upgradeuiKey
- Key to retrieve the new properties withpublic void dispose()
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.