public class FwkGUIFactory extends FwkPresentation implements FwkPropertyChangeListenerInterface, java.awt.event.ItemListener
,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Hashtable |
cache |
protected static FwkGUIFactory |
guiFactory |
protected static java.util.Hashtable |
values |
static java.lang.String |
version |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendToToolBar(javax.swing.JToolBar toolbar,
FwkCommandInterface[] commands)
Append the specified command object array icons to the toolsbar.
|
static javax.swing.JComponent |
createButton(FwkCommandInterface cb,
javax.swing.ButtonGroup bg)
Get a button from command object.
|
static FwkIconButton |
createIconButton(FwkCommandInterface cb,
javax.swing.ButtonGroup bg)
Get an icon button for the toolbar.
|
static javax.swing.JMenu |
createMenu(FwkCommandInterface[] commands,
boolean lightWeightEnabled)
Create a menu from command object array.
|
static javax.swing.JMenuBar |
createMenuBar(FwkCommandInterface[] commands)
Create a menubar from command object array.
|
static javax.swing.JMenuBar |
createMenuBar(FwkCommandInterface[] commands,
boolean lightWeightEnabled)
Create a menubar from command object array.
|
static javax.swing.JComponent |
createMenuItem(FwkCommandInterface cb,
javax.swing.ButtonGroup bg,
boolean lightWeightEnabled)
Get a menu item from command object.
|
static javax.swing.JPopupMenu |
createPopupMenu(FwkCommandInterface[] commands)
Create a popupmenu from command object array
|
static javax.swing.JPopupMenu |
createPopupMenu(FwkCommandInterface[] commands,
boolean lightWeightEnabled)
Create a popupmenu from command object array
|
static javax.swing.JPopupMenu |
createPopupMenu(java.lang.String label,
FwkCommandInterface[] commands,
boolean lightWeightEnabled)
Create a popupmenu from command object array
|
static void |
createSubMenu(javax.swing.JMenuBar menubar,
FwkCommandInterface[] commands,
javax.swing.ButtonGroup bg,
boolean lightWeightEnabled)
Create a submenu from command object array.
|
static void |
createSubMenu(javax.swing.JMenu menu,
FwkCommandInterface[] commands,
javax.swing.ButtonGroup bg,
boolean lightWeightEnabled)
Create a submenu from command object array.
|
static void |
createSubMenu(javax.swing.JPopupMenu menu,
FwkCommandInterface[] subCommands,
javax.swing.ButtonGroup bg,
boolean lightWeightEnabled)
Create a submenu from command object array.
|
static javax.swing.JToolBar |
createToolBar(FwkCommandInterface[] commands)
Create a toolbar from command object array.
|
static javax.swing.JToolBar |
createToolBar(FwkCommandInterface[] commands,
java.lang.String position,
int alignment)
Create a toolbar from command object array.
|
static void |
createToolBarIcon(javax.swing.JToolBar toolbar,
FwkCommandInterface[] commands,
javax.swing.ButtonGroup bg)
Create a toolbar icon from command.
|
static java.awt.Container |
getDialogParent(java.util.EventObject ev)
Get the dialog parent for the given event.
|
static java.awt.Container |
getInvoker(java.awt.Container item)
Get the popup parent for the given menu.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
void |
itemStateChanged(java.awt.event.ItemEvent ev) |
void |
propertyChange(java.beans.PropertyChangeEvent e) |
static void |
registerCommand(FwkCommandInterface cmd,
java.lang.Object obj)
Register a command.
|
java.lang.String |
toString()
This function returns a string containing the string
representation of the object.
|
static void |
unregisterCommand(FwkCommandInterface cmd)
Unregister a single command.
|
static void |
unregisterCommands(FwkCommandInterface[] commands)
Unregister all commands in a command object array.
|
static void |
unregisterMenu(javax.swing.JMenu menu)
Unregister a men.
|
static void |
unregisterMenuBar(javax.swing.JMenuBar menuBar)
Unregister a menubar.
|
static void |
unregisterObject(java.lang.Object obj)
Unregister a signle object.
|
static void |
unregisterPopupMenu(javax.swing.JPopupMenu popup)
Unregister a popupmenu.
|
static void |
unregisterToolBar(javax.swing.JToolBar toolBar)
Unregister a toolbar.
|
getPresentationString, getPresentationStringgetNiceVersion, releaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitreleasepublic static final java.lang.String version
protected static java.util.Hashtable cache
protected static java.util.Hashtable values
protected static FwkGUIFactory guiFactory
public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacegetVersion in class FwkPresentationpublic static javax.swing.JPopupMenu createPopupMenu(FwkCommandInterface[] commands)
commands - The command object array.public static javax.swing.JPopupMenu createPopupMenu(FwkCommandInterface[] commands, boolean lightWeightEnabled)
commands - The command object array.lightWeightEnabled - Enables the light weight component.public static javax.swing.JPopupMenu createPopupMenu(java.lang.String label,
FwkCommandInterface[] commands,
boolean lightWeightEnabled)
label - The label of the popup menu.commands - The command object array.lightWeightEnabled - Enables the light weight component.public static javax.swing.JMenuBar createMenuBar(FwkCommandInterface[] commands)
commands - The command object array.public static javax.swing.JMenuBar createMenuBar(FwkCommandInterface[] commands, boolean lightWeightEnabled)
commands - The command object array.lightWeightEnabled - Enables the light weight component.public static javax.swing.JMenu createMenu(FwkCommandInterface[] commands, boolean lightWeightEnabled)
commands - The command object array.public static void createSubMenu(javax.swing.JPopupMenu menu,
FwkCommandInterface[] subCommands,
javax.swing.ButtonGroup bg,
boolean lightWeightEnabled)
menu - The parent popup-menu.subCommands - The command object array.bg - The optional button group.lightWeightEnabled - Enables the light weight component.public static void createSubMenu(javax.swing.JMenuBar menubar,
FwkCommandInterface[] commands,
javax.swing.ButtonGroup bg,
boolean lightWeightEnabled)
menubar - The parent menubar.commands - The command object array.bg - The optional button group.lightWeightEnabled - Enables the light weight component.public static void createSubMenu(javax.swing.JMenu menu,
FwkCommandInterface[] commands,
javax.swing.ButtonGroup bg,
boolean lightWeightEnabled)
menu - The parent menu.commands - The command object array.bg - The optional button group.lightWeightEnabled - Enables the light weight component.public static javax.swing.JComponent createMenuItem(FwkCommandInterface cb, javax.swing.ButtonGroup bg, boolean lightWeightEnabled)
cb - The command object.bg - The optional button group.public static javax.swing.JComponent createButton(FwkCommandInterface cb, javax.swing.ButtonGroup bg)
cb - The command object.bg - The optional button group.public static javax.swing.JToolBar createToolBar(FwkCommandInterface[] commands, java.lang.String position, int alignment)
commands - The command object array.position - The border layout position constants. Use NORTH,
EAST, SOUTH or WEST only. CENTER is not supported
and will be ignored.alignment - The alignment of the flow layout.public static javax.swing.JToolBar createToolBar(FwkCommandInterface[] commands)
commands - The command object array.layout - The layout manager for the tool bar.public static void appendToToolBar(javax.swing.JToolBar toolbar,
FwkCommandInterface[] commands)
toolbar - The toolbar to that the method should append the icons.commands - The command object array.public static void createToolBarIcon(javax.swing.JToolBar toolbar,
FwkCommandInterface[] commands,
javax.swing.ButtonGroup bg)
toolbar - The toolbar (optional).commands - The command object array.bg - The optional button group.public static FwkIconButton createIconButton(FwkCommandInterface cb, javax.swing.ButtonGroup bg)
cb - The command object.bg - The optional button group.public static void registerCommand(FwkCommandInterface cmd, java.lang.Object obj)
command - The command to be registered.obj - The object to be registered.public static void unregisterCommands(FwkCommandInterface[] commands)
commands - The command object array.public static void unregisterCommand(FwkCommandInterface cmd)
cmd - The command to be unregistered.public static void unregisterPopupMenu(javax.swing.JPopupMenu popup)
popup - The JPopupMenu to be unregistered.public static void unregisterMenuBar(javax.swing.JMenuBar menuBar)
menubar - The JMenuBar to be unregistered.public static void unregisterMenu(javax.swing.JMenu menu)
menu - The JMenu to be unregistered.public static void unregisterToolBar(javax.swing.JToolBar toolBar)
toolBar - The JToolBar to be unregistered.public static void unregisterObject(java.lang.Object obj)
obj - The object to be unregistered.public java.lang.String toString()
toString in class java.lang.ObjectgetParamspublic static java.awt.Container getDialogParent(java.util.EventObject ev)
ev - the event.public static java.awt.Container getInvoker(java.awt.Container item)
ev - the event.public void itemStateChanged(java.awt.event.ItemEvent ev)
itemStateChanged in interface java.awt.event.ItemListenerpublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListener