|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.essbase.eas.i18n.LocalizeUtils
public class LocalizeUtils
Implements some static methods for supporting internationalization efforts.
Note:
08/21/2000, hcox: Begin with localizeWindow() method. 08/27/2000, hcox: Add localizeMenu() method.
Method Summary | |
---|---|
static java.awt.Component |
localizeComponent(java.lang.Class clazz, java.awt.Component component) |
static java.awt.Component |
localizeComponent(java.util.ResourceBundle[] r, java.awt.Component component) |
static java.awt.Component |
localizeComponent(java.util.ResourceBundle r, java.awt.Component component) The method localizes, the component passed to it by setting whatever is applicable from the following for it. |
static void |
localizeComponents(java.util.ResourceBundle[] r, java.awt.Component[] components) |
static void |
localizeComponents(java.util.ResourceBundle r, java.awt.Component[] components) applies standard localization procedures to a list of components. |
static boolean |
localizeMenu(java.util.ResourceBundle[] r, java.awt.Component component) |
static boolean |
localizeMenu(java.util.ResourceBundle[] r, java.awt.Component[] components) |
static boolean |
localizeMenu(java.util.ResourceBundle r, java.awt.Component component) applies standard localization procedures to an array of menu items. |
static boolean |
localizeMenu(java.util.ResourceBundle r, java.awt.Component[] components) applies standard localization procedures to an array of menu items. |
static void |
localizeTab(java.util.ResourceBundle[] r, javax.swing.JTabbedPane tab) |
static void |
localizeTab(java.util.ResourceBundle r, javax.swing.JTabbedPane tab) This method is used to localize a JTabbedPane. |
static void |
localizeTable(java.util.ResourceBundle r, java.awt.Component component) This method is used to localize the table column names. |
static void |
localizeTreeNodes(java.util.ResourceBundle r, java.lang.Object[] nodeArray) applies standard localization procedures to TreeNodes. |
static void |
localizeWindow(java.util.ResourceBundle r, java.awt.Component withTitle, java.awt.Component[] components) applies standard localization procedures to a console window. |
static void |
setDisplayedMnemonicIndex(javax.swing.AbstractButton comp) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void localizeTreeNodes(java.util.ResourceBundle r, java.lang.Object[] nodeArray)
Notes:
02/12/2001, Namita:
r
- - resource bundle to use.components
- - array of components to localize. We use introspection to call the getCaption() method, use that value as the key into the resource bundle, and update the component via setCaption(). Valid for tree nodes.public static boolean localizeMenu(java.util.ResourceBundle r, java.awt.Component[] components)
Notes:
08/27/2000, hcox: This method should be used instead of the MenuUtils class.
r
- - resource bundle to use.components
- - array of components to localize. We use introspection to call the getText() method, use that value as the key into the resource bundle, and update the component via setText(). Valid Swing components for this JMenu, JMenuItem, JPopupMenu.public static boolean localizeMenu(java.util.ResourceBundle[] r, java.awt.Component[] components)
public static boolean localizeMenu(java.util.ResourceBundle r, java.awt.Component component)
Notes:
08/27/2000, hcox: This method should be used instead of the MenuUtils class.
r
- - resource bundle to use.component
- - component to localize. We use introspection to call the getText() method, use that value as the key into the resource bundle, and update the component via setText(). Valid Swing components for this JMenu, JMenuItem, JPopupMenu.public static boolean localizeMenu(java.util.ResourceBundle[] r, java.awt.Component component)
public static void localizeWindow(java.util.ResourceBundle r, java.awt.Component withTitle, java.awt.Component[] components)
Notes:
08/21/2000, hcox: The following components have getText() and setText() methods but probably should never be passed to this function: JTextArea, JTextPane, JTextField, JTextComponent, JEditorPane. 08/21/2000, hcox: The following components do not have getText() and setText() methods, so they will not be operated on by this method: JComboBox, JComponent, JDesktopPane, JLayeredPane, JList, JMenuBar, JOptionPane, JPanel, JPasswordField, JPopupMenu, JProgressBar, JRootPane, JScrollBar, JScrollPane, JSeparator, JSlider, JSplitPane, JTabbedPane, JTable, JTableHeader, JToolbar, JTRee, JViewport, JWindow.
r
- - resource bundle to use.withTitle
- - object that will have it's title localized. Valid swing objects are JDialog, JFrame, and JInternalFrame. We use introspection to look for the getTitle() method, retrieve the title, then use that as the key into the resource bundle, and use introspection to call setTitle() to update the object.components
- - array of components to localize. We use introspection to call the getText() method, use that value as the key into the resource bundle, and update the component via setText(). Valid Swing components for this are JButton, JCheckBox, JLabel, JMenu, JMenuItem, JRadioButton, JRadioButtonMenuItem, JToggleButton.public static void localizeComponents(java.util.ResourceBundle r, java.awt.Component[] components)
Notes:
10/31/01, Madhavi:This is very similar to localizeWindow except that it does not set the title. 08/21/2000, hcox: The following components have getText() and setText() methods but probably should never be passed to this function: JTextArea, JTextPane, JTextField, JTextComponent, JEditorPane. 08/21/2000, hcox: The following components do not have getText() and setText() methods, so they will not be operated on by this method: JComboBox, JComponent, JDesktopPane, JLayeredPane, JList, JMenuBar, JOptionPane, JPanel, JPasswordField, JPopupMenu, JProgressBar, JRootPane, JScrollBar, JScrollPane, JSeparator, JSlider, JSplitPane, JTabbedPane, JTable, JTableHeader, JToolbar, JTRee, JViewport, JWindow.
r
- - resource bundle to use.components
- - array of components to localize. We use introspection to call the getText() method, use that value as the key into the resource bundle, and update the component via setText(). Valid Swing components for this are JButton, JCheckBox, JLabel, JMenu, JMenuItem, JRadioButton, JRadioButtonMenuItem, JToggleButton.public static void localizeComponents(java.util.ResourceBundle[] r, java.awt.Component[] components)
public static java.awt.Component localizeComponent(java.util.ResourceBundle r, java.awt.Component component)
component
passed to it by setting whatever is applicable from the following for it. i) text ii) mnemonic iii) tool tip iv) colorr
- the resource bundlecomponent
- the the Component to localizepublic static java.awt.Component localizeComponent(java.lang.Class clazz, java.awt.Component component)
public static java.awt.Component localizeComponent(java.util.ResourceBundle[] r, java.awt.Component component)
public static void setDisplayedMnemonicIndex(javax.swing.AbstractButton comp)
public static void localizeTab(java.util.ResourceBundle r, javax.swing.JTabbedPane tab)
r
- the resource bundle to usetab
- the JTabbedPane to localizepublic static void localizeTab(java.util.ResourceBundle[] r, javax.swing.JTabbedPane tab)
public static void localizeTable(java.util.ResourceBundle r, java.awt.Component component)
r
- the resource bundle to usecomponent
- the table to localize
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |