|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.tubs.macs.util.misc.Resource
An utility class to ease to construction of graphical user interfaces for the macs project. More information on how to use is soon to follow.
| Field Summary | |
static java.lang.String |
actionClassSuffix
Suffix applied to the key used in resource file lookups for the implementing class of an action. |
static java.lang.String |
actionSuffix
Suffix applied to the key used in resource file lookups for an action. |
static java.lang.String |
classSuffix
Suffix for classname definition lookups for the classname of an application |
static java.lang.String |
imageSuffix
Suffix applied to the key used in resource file lookups for an image. |
static java.lang.String |
labelSuffix
Suffix applied to the key used in resource file lookups for a label. |
static java.lang.String |
menubarSuffix
Suffix applied to the key used in resource file lookups for a menubar. |
static java.lang.String |
popupSuffix
Suffix applied to the key used in resource file lookups for an popup. |
PropertiesModel |
properties
PropertiesModel |
static java.lang.String |
stateSuffix
Suffix applied to a JCheckBox or JCheckBoxMenuItem lookups for the initial-state of the item State may be 'true' or 'false' |
static java.lang.String |
tipSuffix
Suffix applied to the key used in resource file lookups for tooltip text. |
static java.lang.String |
toolbarSuffix
Suffix applied to the key used in resource file lookups for a toolbar. |
| Constructor Summary | |
Resource(java.lang.String systemFileName)
Constructs an instance of Resource. |
|
Resource(java.lang.String systemFileName,
java.lang.String userFileName)
Constructs an instance of Resource. |
|
| Method Summary | |
(package private) static void |
|
void |
addRadioButtonGroupToToolBar(javax.swing.ButtonGroup group,
javax.swing.JToolBar toolbar)
Add a radiobutton-group to be added to a JToolBar |
java.beans.PropertyChangeListener |
createActionChangeListener(javax.swing.JButton b)
|
javax.swing.JMenu |
createCheckBoxMenu(java.lang.String key,
java.util.Hashtable cmds)
Create a menu of checkboxes for the application. |
protected javax.swing.JCheckBoxMenuItem |
createCheckBoxMenuItem(java.lang.String key,
java.util.Hashtable cmds)
This is the hook through which all menu itmes are created. |
javax.swing.JComboBox |
createComboBox(java.lang.String key,
java.util.Hashtable cmds)
create a combo-box to be added anywhere you want it |
protected javax.swing.JMenu |
createMenu(java.lang.String key,
java.util.Hashtable cmds)
Create a menu for the application. |
javax.swing.JMenuBar |
createMenuBar(java.lang.String key,
java.util.Hashtable cmds)
Create the menubar for the application. |
protected javax.swing.JMenuItem |
createMenuItem(java.lang.String key,
java.util.Hashtable cmds)
This is the hook through which all menu itmes are created. |
javax.swing.JPopupMenu |
createPopupMenu(java.lang.String key,
java.util.Hashtable cmds)
Create the popup menu for the application. |
javax.swing.JPopupMenu |
createPopupMenu(java.lang.String key,
java.lang.String[] itemKeys,
java.util.Hashtable cmds)
|
javax.swing.JRadioButton |
createRadioButton(java.lang.String key,
java.util.Hashtable cmds)
Create a radiobutton that may go inside a button group |
javax.swing.ButtonGroup |
createRadioButtonGroup(java.lang.String key,
java.util.Hashtable cmds)
Create a group of radio buttons which may be added to a toolbar or anything |
javax.swing.JToolBar |
createToolBar(java.lang.String[] toolKeys,
java.util.Hashtable cmds)
|
javax.swing.JToolBar |
createToolBar(java.lang.String key,
java.util.Hashtable cmds)
Create the toolbar. |
javax.swing.JButton |
createToolBarButton(java.lang.String key,
java.util.Hashtable cmds)
Create a button to go inside of the toolbar. |
boolean |
getBool(java.lang.String key)
Returns boolean value associated with key. |
javax.swing.JComponent |
getComponent(java.lang.String key)
Returns the component associated with key |
java.awt.Image |
getImage(java.lang.String key)
|
javax.swing.ImageIcon |
getImageIcon(java.lang.String key)
Create an ImageIcon. |
int |
getInt(java.lang.String key)
Returns the integer value associated with key. |
long |
getLong(java.lang.String key)
Returns the integer value associated with key. |
PropertiesModel |
getPropertiesModel()
Return the PropertiesModel object of this Resource |
java.net.URL |
getResource(java.lang.String key)
Fetch the url of an image associated with the key key out of the resource file. |
java.lang.String |
getResourceString(java.lang.String key)
Read a string associated with the key out of the resource file. |
java.util.Vector |
getResourceVector(java.lang.String key)
Read a string associated with the key out of the resource file. |
boolean |
getState(java.lang.String key)
Read a string associated with the key out of the resource file. |
java.lang.String |
getString(java.lang.String key)
Read a string associated with the key out of the resource file. |
void |
putImageIcon(java.lang.String key,
javax.swing.ImageIcon icon)
Insert an ImageIcon into the IconServer database. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Store a key-value pair into the actual Properties |
java.lang.String[] |
tokenize(java.lang.String key)
The string associated with key is chopped up into a series of strings on whitespace boundaries. |
| 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 labelSuffix
public static final java.lang.String imageSuffix
public static final java.lang.String tipSuffix
public static final java.lang.String actionSuffix
public static final java.lang.String actionClassSuffix
public static final java.lang.String stateSuffix
public static final java.lang.String classSuffix
public static final java.lang.String popupSuffix
public static final java.lang.String menubarSuffix
public static final java.lang.String toolbarSuffix
public PropertiesModel properties
| Constructor Detail |
public Resource(java.lang.String systemFileName)
throws java.io.IOException
public Resource(java.lang.String systemFileName,
java.lang.String userFileName)
throws java.io.IOException
| Method Detail |
static void()
public PropertiesModel getPropertiesModel()
public void setProperty(java.lang.String key,
java.lang.String value)
public java.lang.String getResourceString(java.lang.String key)
public java.util.Vector getResourceVector(java.lang.String key)
public java.lang.String getString(java.lang.String key)
public boolean getState(java.lang.String key)
public java.net.URL getResource(java.lang.String key)
public java.awt.Image getImage(java.lang.String key)
public javax.swing.ImageIcon getImageIcon(java.lang.String key)
key.key - The key in the resource file to serve as the basis
of lookups.
public void putImageIcon(java.lang.String key,
javax.swing.ImageIcon icon)
key - the name of the ImageIconicon - the ImageIconpublic int getInt(java.lang.String key)
public long getLong(java.lang.String key)
public boolean getBool(java.lang.String key)
public javax.swing.JComponent getComponent(java.lang.String key)
public java.lang.String[] tokenize(java.lang.String key)
public javax.swing.JMenuBar createMenuBar(java.lang.String key,
java.util.Hashtable cmds)
protected javax.swing.JMenu createMenu(java.lang.String key,
java.util.Hashtable cmds)
protected javax.swing.JMenuItem createMenuItem(java.lang.String key,
java.util.Hashtable cmds)
public javax.swing.JMenu createCheckBoxMenu(java.lang.String key,
java.util.Hashtable cmds)
protected javax.swing.JCheckBoxMenuItem createCheckBoxMenuItem(java.lang.String key,
java.util.Hashtable cmds)
public javax.swing.JPopupMenu createPopupMenu(java.lang.String key,
java.util.Hashtable cmds)
public javax.swing.JPopupMenu createPopupMenu(java.lang.String key,
java.lang.String[] itemKeys,
java.util.Hashtable cmds)
public javax.swing.JToolBar createToolBar(java.lang.String key,
java.util.Hashtable cmds)
public javax.swing.JToolBar createToolBar(java.lang.String[] toolKeys,
java.util.Hashtable cmds)
public javax.swing.JButton createToolBarButton(java.lang.String key,
java.util.Hashtable cmds)
key - The key in the resource file to serve as the basis
of lookups.public java.beans.PropertyChangeListener createActionChangeListener(javax.swing.JButton b)
public javax.swing.ButtonGroup createRadioButtonGroup(java.lang.String key,
java.util.Hashtable cmds)
key - The key in the resource file to serve as the basis
of lookups.
public javax.swing.JRadioButton createRadioButton(java.lang.String key,
java.util.Hashtable cmds)
key - The key in the resource file to serve as the basis
of lookups.
public void addRadioButtonGroupToToolBar(javax.swing.ButtonGroup group,
javax.swing.JToolBar toolbar)
group - A radiobutton-group to be added to the toolbartoolbar - The toolbar, where 'group' will be added to.
public javax.swing.JComboBox createComboBox(java.lang.String key,
java.util.Hashtable cmds)
key - The key in the resource file to serve as the basis
of lookups.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||