|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.gui.ClackBarFactory
public class ClackBarFactory
The bar factory creates the menubars and the toolbars seen at the top of a clack window. (This class if based on JGraph code)
Field Summary | |
---|---|
protected static java.util.Hashtable |
barEntries
Vector with Bar entries |
static java.lang.String |
GRAPH_POPUP
Main key for the graph popup menu |
protected ClackFramework |
graphpad
a reference to the joint graphpad |
static java.lang.String |
MENUBAR
Main key for the menu bar |
static java.lang.String |
TOOLBARS
Main key for the toolbars |
Fields inherited from interface net.clackrouter.jgraph.pad.resources.TranslatorConstants |
---|
PREFIX_COMPONENT, PREFIX_MESSAGE_ERROR, PREFIX_MESSAGE_INFORMATION, PREFIX_MESSAGE_WARING, SUFFIX_ACCELERATOR, SUFFIX_ACTION, SUFFIX_ICON, SUFFIX_IMAGE, SUFFIX_LABEL, SUFFIX_MENU, SUFFIX_MNEMONIC, SUFFIX_TEXT, SUFFIX_TITLE, SUFFIX_TOOL_TIP_TEXT |
Constructor Summary | |
---|---|
ClackBarFactory(ClackFramework graphpad)
creates an instance and memorizes the gaphpad |
Method Summary | |
---|---|
static void |
addBarEntry(GPBarEntry entry)
Here you can add your own bar entries. |
protected javax.swing.JMenu |
createClackAddMenu()
Creates the Component Add menu based on the contents of the Clack.properties file. |
javax.swing.JPopupMenu |
createGraphPopupMenu(ComponentCell cell)
creates the Graph popup. |
protected javax.swing.JMenu |
createMenu(java.lang.String key)
creates a menu for the specified key |
protected javax.swing.JMenu |
createMenu(java.lang.String key,
java.lang.String[] itemKeys)
Create a menu for the app. |
javax.swing.JMenuBar |
createMenubar()
Create the menubar for the app. |
protected java.awt.Component[] |
createMenuItem(java.lang.String cmd)
This is the hook through which all menu items are created. |
protected java.awt.Component[] |
createTool(java.lang.String key)
Hook through which every toolbar item is created. |
protected java.awt.Component |
createToolbar(java.lang.String key,
java.lang.String label)
Create the toolbar. |
protected java.awt.Component[] |
createToolbarButton(java.lang.String key)
Create a button to go inside of the toolbar. |
javax.swing.JPanel |
createToolBars(javax.swing.JPanel toolBarMainPanel)
creates a panel with the toolbars into. |
static javax.swing.AbstractButton |
fillAbstractButton(javax.swing.AbstractButton button,
java.lang.String key,
java.lang.String actionCommand)
The method fills the AbstractButton with the localized label, the image, the accelerator and the mnemonic. |
static javax.swing.AbstractButton |
fillMenuButton(javax.swing.AbstractButton button,
java.lang.String key,
java.lang.String actionCommand)
fills the abstract button with values from the properties files. |
static javax.swing.AbstractButton |
fillToolbarButton(javax.swing.AbstractButton button,
java.lang.String key,
java.lang.String actionCommand)
fills the abstract button with values from the properties files. |
protected javax.swing.Action |
getAction(java.lang.String cmd)
returns the action for the cmd key. |
protected java.lang.String[] |
integrateBarEntries(java.lang.String key,
java.lang.String[] values)
Integrates bar entries, if available, for the key. |
static void |
removeBarEntry(GPBarEntry entry)
Here you can remove your own bar entries. |
protected java.lang.String[] |
tokenize(java.lang.String key,
java.lang.String value)
Tokenizes the value for the key and integrates bar entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MENUBAR
public static final java.lang.String TOOLBARS
public static final java.lang.String GRAPH_POPUP
protected static java.util.Hashtable barEntries
protected ClackFramework graphpad
Constructor Detail |
---|
public ClackBarFactory(ClackFramework graphpad)
Method Detail |
---|
protected java.awt.Component[] createMenuItem(java.lang.String cmd)
public javax.swing.JMenuBar createMenubar()
protected javax.swing.JMenu createClackAddMenu()
public javax.swing.JPopupMenu createGraphPopupMenu(ComponentCell cell)
cell
- the ComponentCell that this popup is being created for, or nullprotected javax.swing.JMenu createMenu(java.lang.String key)
protected javax.swing.JMenu createMenu(java.lang.String key, java.lang.String[] itemKeys)
public javax.swing.JPanel createToolBars(javax.swing.JPanel toolBarMainPanel)
toolBarMainPanel
- The outside panel.
protected java.awt.Component createToolbar(java.lang.String key, java.lang.String label)
protected java.awt.Component[] createTool(java.lang.String key)
protected java.awt.Component[] createToolbarButton(java.lang.String key)
key
- The key in the resource file to serve as the basis
of lookups.protected javax.swing.Action getAction(java.lang.String cmd)
public static javax.swing.AbstractButton fillMenuButton(javax.swing.AbstractButton button, java.lang.String key, java.lang.String actionCommand)
public static javax.swing.AbstractButton fillToolbarButton(javax.swing.AbstractButton button, java.lang.String key, java.lang.String actionCommand)
public static javax.swing.AbstractButton fillAbstractButton(javax.swing.AbstractButton button, java.lang.String key, java.lang.String actionCommand)
protected java.lang.String[] tokenize(java.lang.String key, java.lang.String value)
integrateBarEntries(String, String[])
protected java.lang.String[] integrateBarEntries(java.lang.String key, java.lang.String[] values)
key
- Current key for the valuesvalues
- The tokenized values for the key.addBarEntry(net.clackrouter.jgraph.pad.GPBarEntry)
public static void addBarEntry(GPBarEntry entry)
public static void removeBarEntry(GPBarEntry entry)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |