|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.zeus.ui.typesafe.SwingConfigurationManager
public final class SwingConfigurationManager
This class is the central point of execution for all the classes inside
gr.zeus.ui.typesafe
package. Although each class can be used as
standalone, the SwingConfigurationManager provides an easy way to configure
multiple swing components within many forms via a property file. You can have
as many instances of this class as you need, just keep in mind that each
instance is attached to a single property file. The property file can also
exist inside a ResourceBundle. Aside the constructors the main methods are:
applyFocus(), initializes the focus for a container and configComponent(),
that configures all the swing components. Property file format example:
customfocustraversalpolicy=true/false
(tagname).(param)=(value)
Note: Due to the internal design of the JFormattedTextField, the TypeSafeTextDocumentFilter is not applied (see Sun's javadocs). Only the Verifier's functionality is applied.
Constructor Summary | |
---|---|
SwingConfigurationManager(java.util.ResourceBundle res)
Constructor, creates the properties from the specified ResourceBundle. |
|
SwingConfigurationManager(java.lang.String propertyFile)
Constructor, loads the property file from the specified pathname. |
Method Summary | |
---|---|
void |
applyFocus(java.awt.Container c,
java.awt.Component[] all)
Apply focus policy to all the components in the array, depending on the component's placement within this array. |
void |
configComponent(java.lang.String name,
javax.swing.text.JTextComponent... all)
Apply a configuration to one or more components. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwingConfigurationManager(java.lang.String propertyFile)
propertyFile
- The pathname to the property file.public SwingConfigurationManager(java.util.ResourceBundle res)
res
- The resource bundle to load the properties from.Method Detail |
---|
public void applyFocus(java.awt.Container c, java.awt.Component[] all)
c
- The swing container, e.g. a JFrame.all
- The array with the components.public void configComponent(java.lang.String name, javax.swing.text.JTextComponent... all) throws java.lang.Exception
name
- The tagname within the property file.all
- One or more components to apply the
configuration rule.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |