|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.swing.TOM
ToolTip'd Object Maker - create Swing compenents with ToolTips conveniently. Creates Swing components using the given resourcename and add tool tip to it using a resource named given-name-plus-".tip". Furthermore, sets mnemonics (when available) using a resource named given-name-plus-".mnem".
The component can also be given an icon which is displayed appropriately. The icon is expected to be in a separate file whose name is given in a resource named given-name-plus-".iconfile".
Field Summary | |
private static java.beans.PropertyChangeListener |
componentlabelenabler
Internally used property listener which is put onto labelled JComponents in makeLinkedJLabel(ResourceBundle, String, Component) .
|
private static java.util.Map |
componentlabels
Map to store labels in by their component. |
private static java.util.Map |
componentresnames
Map to store the I18N keys for several components. |
private static java.util.regex.Pattern |
insetspattern
|
Constructor Summary | |
private |
TOM()
Private constructor as this class is completely static. |
Method Summary | |
static javax.swing.JTabbedPane |
addTabbedPane(java.util.ResourceBundle rb,
javax.swing.JTabbedPane jtp,
java.awt.Component co,
java.lang.String name)
Adds a tab to a JTabbedPane. |
static void |
defaultLocaleChanged(java.awt.Component c)
Notifies all non-locale-specific bundles still in use about the change of the default locale and relabels the given component |
private static java.lang.Object[] |
getStringIconHelpid(java.util.ResourceBundle rb,
java.lang.String resname)
Common method for obtaining name and icon. |
static javax.swing.border.Border |
getTitledBorder(java.util.ResourceBundle rb,
java.lang.String resname)
Return a titled border with default etched lines. |
static javax.swing.border.Border |
getTitledBorder(java.util.ResourceBundle rb,
java.lang.String resname,
javax.swing.border.Border otherborder)
Return a titled border with default given other lines. |
static javax.swing.Action |
makeAction(java.util.ResourceBundle rb,
java.lang.String resname,
javax.swing.Action action)
equips an Action object with everything needed. |
static javax.swing.AbstractButton |
makeAnyButton(java.util.ResourceBundle rb,
java.lang.String resname,
javax.swing.AbstractButton b)
Equips any subclass of AbstractButton with text, icon etc from the resources. |
static javax.swing.JButton |
makeJButton(java.util.ResourceBundle rb,
java.lang.String resname)
Delivers a JButton with text, icon etc from the resources. |
static javax.swing.JButton |
makeJButton(java.util.ResourceBundle rb,
java.lang.String resname,
javax.swing.JButton b)
Equips an already existing JButton with text, icon etc from the resources. |
static javax.swing.JCheckBox |
makeJCheckBox(java.util.ResourceBundle rb,
java.lang.String resname)
delivers a check box with tip and mnemonic |
static javax.swing.JFrame |
makeJFrame(java.util.ResourceBundle rb,
java.lang.String resname)
Creates a new JFrame with title and frame icon set. |
static javax.swing.JFrame |
makeJFrame(java.util.ResourceBundle rb,
java.lang.String resname,
javax.swing.JFrame theframe)
Equips an already existing JFrame with title and frame icon. |
static javax.swing.JInternalFrame |
makeJInternalFrame(java.util.ResourceBundle rb,
java.lang.String resname)
Creates a new JInternalFrame with title and frame icon set. |
static javax.swing.JInternalFrame |
makeJInternalFrame(java.util.ResourceBundle rb,
java.lang.String resname,
javax.swing.JInternalFrame theframe)
Equips an already existing JInternalFrame with title and frame icon. |
static javax.swing.JLabel |
makeJLabel(java.util.ResourceBundle rb,
java.lang.String resname)
delivers a label with a tip and a mnemonic when available. |
static javax.swing.JMenu |
makeJMenu(java.util.ResourceBundle rb,
java.lang.String resname)
Delivers an empty menu with tip and mnemonic |
static javax.swing.JMenuItem |
makeJMenuItem(java.util.ResourceBundle rb,
java.lang.String resname)
Delivers an empty menu with tip and mnemonic |
static javax.swing.JMenuItem |
makeJMenuItem(java.util.ResourceBundle rb,
java.lang.String resname,
javax.swing.JMenuItem jmi)
Delivers an empty menu with tip and mnemonic |
static javax.swing.JRadioButton |
makeJRadioButton(java.util.ResourceBundle rb,
java.lang.String resname)
delivers a radio button with tip and mnemonic |
static javax.swing.JLabel |
makeLinkedJLabel(java.util.ResourceBundle rb,
java.lang.String resname,
java.awt.Component lc)
Delivers a label with a tip and a mnemonic when available and a Component is passed. |
static javax.swing.JLabel |
makeLinkedJLabel(java.lang.String labelstr,
java.awt.Component lc)
Delivers a label with the given String and a Component is passed. |
private static void |
relabel(java.lang.Object c,
java.util.ResourceBundle rb)
Change the labels of the standard GUI elements after the locale has changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.util.Map componentlabels
private static java.util.Map componentresnames
private static java.util.regex.Pattern insetspattern
private static java.beans.PropertyChangeListener componentlabelenabler
makeLinkedJLabel(ResourceBundle, String, Component)
.
It listenes on the "enabled" property and if it changes, it sets the label's enabled state to be the same as the component's enabled state.
Constructor Detail |
private TOM()
Method Detail |
private static java.lang.Object[] getStringIconHelpid(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.Action makeAction(java.util.ResourceBundle rb, java.lang.String resname, javax.swing.Action action)
public static javax.swing.JButton makeJButton(java.util.ResourceBundle rb, java.lang.String resname)
rb
- ResourceBundle to read the data fromresname
- Base name of the resource
public static javax.swing.JButton makeJButton(java.util.ResourceBundle rb, java.lang.String resname, javax.swing.JButton b)
rb
- ResourceBundle to read the data fromresname
- Base name of the resourceb
- The button to add the stuff to.
public static javax.swing.AbstractButton makeAnyButton(java.util.ResourceBundle rb, java.lang.String resname, javax.swing.AbstractButton b)
rb
- ResourceBundle to read the data fromresname
- Base name of the resourceb
- The button to add the stuff to.
public static javax.swing.JMenu makeJMenu(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.JMenuItem makeJMenuItem(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.JMenuItem makeJMenuItem(java.util.ResourceBundle rb, java.lang.String resname, javax.swing.JMenuItem jmi)
public static javax.swing.JRadioButton makeJRadioButton(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.JCheckBox makeJCheckBox(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.JLabel makeLinkedJLabel(java.util.ResourceBundle rb, java.lang.String resname, java.awt.Component lc)
rb
- Resource bundle to read the label information fromresname
- Base name of the resources for the labellc
- Component to be labelled.
public static javax.swing.JLabel makeJLabel(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.JLabel makeLinkedJLabel(java.lang.String labelstr, java.awt.Component lc)
labelstr
- String for the labels textlc
- Component to be labelled.
public static javax.swing.JInternalFrame makeJInternalFrame(java.util.ResourceBundle rb, java.lang.String resname, javax.swing.JInternalFrame theframe)
public static javax.swing.JInternalFrame makeJInternalFrame(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.JFrame makeJFrame(java.util.ResourceBundle rb, java.lang.String resname, javax.swing.JFrame theframe)
public static javax.swing.JFrame makeJFrame(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.border.Border getTitledBorder(java.util.ResourceBundle rb, java.lang.String resname)
public static javax.swing.border.Border getTitledBorder(java.util.ResourceBundle rb, java.lang.String resname, javax.swing.border.Border otherborder)
public static javax.swing.JTabbedPane addTabbedPane(java.util.ResourceBundle rb, javax.swing.JTabbedPane jtp, java.awt.Component co, java.lang.String name)
rb
- ResourceBundle to load the i18n'd name from.jtp
- Tabbed pane to add element toco
- Component which is added to the tabbed pane.name
- i18n key for the name to put into the tab.
public static void defaultLocaleChanged(java.awt.Component c)
private static void relabel(java.lang.Object c, java.util.ResourceBundle rb)
c
- The component to change the data forrb
- The ResourceBundle to use if no more specific bundle is defined.
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |