|
|||||||||
| Home >> All >> org >> dinopolis >> util >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dinopolis.util.gui
Class ResourceEditorPanel

java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.dinopolis.util.gui.ResourceEditorPanel
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable
- public class ResourceEditorPanel
- extends javax.swing.JPanel
- implements java.awt.event.ActionListener, java.beans.PropertyChangeListener
- extends javax.swing.JPanel
A Class the provides a Property Editor for the properties of a 'Map'.
- Version:
- $Revision: 1.4 $
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private javax.swing.JButton |
apply_button_
the apply button |
static java.lang.String |
APPLY_COMMAND
the apply command name |
private java.awt.Insets |
button_insets_
the button insets |
private static org.dinopolis.util.Resources |
edit_resources_
the resources to edit |
private javax.swing.JTabbedPane |
editor_panel_
the panel holding all editors |
private java.util.HashSet |
hide_key_set_
a set holding all property keys that are not to be displayed |
private javax.swing.Icon |
info_icon_
the info icon |
static java.lang.String |
KEY_APPLY_BUTTON
the key for the apply button resource |
static java.lang.String |
KEY_BUTTONS_INSETS
the key for the buttons insets resource |
private java.util.HashMap |
key_editor_map_
a map holding all property keys and there corresponding values that are to be displayed. |
static java.lang.String |
KEY_HIDE_RESOURCES
the key for the keys that are to be hided |
static java.lang.String |
KEY_INFO_BUTTON_ICON
|
static java.lang.String |
KEY_INFO_BUTTON_ICON_POSITION
the key for the position of the info button |
static java.lang.String |
KEY_PROPERTY_EDITOR_SEARCH_PATH
the search path key to find PropertyEditors |
static java.lang.String |
KEY_TAB_DEFAULT
the title of the default tab |
private static org.dinopolis.util.Resources |
my_resources_
my private resources |
private java.lang.String |
position_info_button_
position of the info button |
private java.beans.PropertyEditorManager |
property_editor_manager_
the property editor manager |
private java.lang.String[] |
property_editor_manager_default_search_path_
the property editor manager default search path |
static java.lang.String |
RESOURCE_BOUNDLE_NAME
the name of my resource file |
static java.lang.String |
RESOURCE_DIR_NAME
the name of my resource directory |
private java.util.Vector |
type_save_
a vector containing all type save editors |
private java.lang.Thread |
update_thread_
the swing worker creating the panel |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ResourceEditorPanel(org.dinopolis.util.Resources resources)
Creates a new ResourceEditorPanel that is able to edit the resources given in resources. |
|
ResourceEditorPanel(org.dinopolis.util.Resources resources,
java.lang.String resource_dir)
Creates a new ResourceEditorPanel that is able to edit the resources given in resources. |
|
ResourceEditorPanel(org.dinopolis.util.Resources resources,
java.lang.String resource_dir,
boolean show_apply_button)
Creates a new ResourceEditorPanel that is able to edit the resources given in resources. |
|
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
RESOURCE_BOUNDLE_NAME
public static final java.lang.String RESOURCE_BOUNDLE_NAME
- the name of my resource file
- See Also:
- Constant Field Values
RESOURCE_DIR_NAME
public static final java.lang.String RESOURCE_DIR_NAME
- the name of my resource directory
- See Also:
- Constant Field Values
edit_resources_
private static org.dinopolis.util.Resources edit_resources_
- the resources to edit
my_resources_
private static org.dinopolis.util.Resources my_resources_
- my private resources
KEY_APPLY_BUTTON
public static final java.lang.String KEY_APPLY_BUTTON
- the key for the apply button resource
- See Also:
- Constant Field Values
KEY_INFO_BUTTON_ICON_POSITION
public static final java.lang.String KEY_INFO_BUTTON_ICON_POSITION
- the key for the position of the info button
- See Also:
- Constant Field Values
KEY_INFO_BUTTON_ICON
public static final java.lang.String KEY_INFO_BUTTON_ICON
- See Also:
- Constant Field Values
APPLY_COMMAND
public static final java.lang.String APPLY_COMMAND
- the apply command name
- See Also:
- Constant Field Values
KEY_BUTTONS_INSETS
public static final java.lang.String KEY_BUTTONS_INSETS
- the key for the buttons insets resource
- See Also:
- Constant Field Values
KEY_TAB_DEFAULT
public static final java.lang.String KEY_TAB_DEFAULT
- the title of the default tab
- See Also:
- Constant Field Values
KEY_PROPERTY_EDITOR_SEARCH_PATH
public static final java.lang.String KEY_PROPERTY_EDITOR_SEARCH_PATH
- the search path key to find PropertyEditors
- See Also:
- Constant Field Values
KEY_HIDE_RESOURCES
public static final java.lang.String KEY_HIDE_RESOURCES
- the key for the keys that are to be hided
- See Also:
- Constant Field Values
editor_panel_
private javax.swing.JTabbedPane editor_panel_
- the panel holding all editors
button_insets_
private java.awt.Insets button_insets_
- the button insets
apply_button_
private javax.swing.JButton apply_button_
- the apply button
position_info_button_
private java.lang.String position_info_button_
- position of the info button
info_icon_
private javax.swing.Icon info_icon_
- the info icon
key_editor_map_
private java.util.HashMap key_editor_map_
- a map holding all property keys and there corresponding
values that are to be displayed.
hide_key_set_
private java.util.HashSet hide_key_set_
- a set holding all property keys that are not to be displayed
property_editor_manager_
private java.beans.PropertyEditorManager property_editor_manager_
- the property editor manager
property_editor_manager_default_search_path_
private java.lang.String[] property_editor_manager_default_search_path_
- the property editor manager default search path
type_save_
private java.util.Vector type_save_
- a vector containing all type save editors
update_thread_
private java.lang.Thread update_thread_
- the swing worker creating the panel
| Constructor Detail |
ResourceEditorPanel
public ResourceEditorPanel(org.dinopolis.util.Resources resources)
- Creates a new ResourceEditorPanel that is able to edit the
resources given in
resources.
ResourceEditorPanel
public ResourceEditorPanel(org.dinopolis.util.Resources resources, java.lang.String resource_dir) throws java.util.MissingResourceException
- Creates a new ResourceEditorPanel that is able to edit the
resources given in
resources. The private resource file is searched in resource_dir, relative to the users home dir.
ResourceEditorPanel
public ResourceEditorPanel(org.dinopolis.util.Resources resources, java.lang.String resource_dir, boolean show_apply_button) throws java.util.MissingResourceException
- Creates a new ResourceEditorPanel that is able to edit the
resources given in
resources. The private resource file is searched in resource_dir, relative to the users home dir.
| Method Detail |
getResources
public static org.dinopolis.util.Resources getResources()
updateResources
public void updateResources()
registerEditor
public void registerEditor(java.lang.Class type, java.lang.Class editor)
- Register an editor class to be used to editor values of
a given target class.
getEditor
protected java.beans.PropertyEditor getEditor(java.lang.String key)
- Gets a PropertyEditor for the given key.
createTypeSaveEditor
protected java.beans.PropertyEditor createTypeSaveEditor(java.lang.String key)
- Creates a new PropertyEditor for the given key.
createStringEditor
protected java.beans.PropertyEditor createStringEditor(java.lang.String key)
getEditingOrViewComponent
protected java.awt.Component getEditingOrViewComponent(java.lang.String key, java.beans.PropertyEditor editor)
getApplyButton
public javax.swing.JButton getApplyButton()
getButtonInsets
public java.awt.Insets getButtonInsets()
createButtons
protected java.awt.Component createButtons()
updateEditors
public void updateEditors()
- Updates the whole editor and shows all components for the given
Map. This method uses a swing worker to create all components in
background.
setAllEditors
protected void setAllEditors()
- Updates the whole editor and shows all components for the given
Map.
addEditor
private void addEditor(java.lang.String key, javax.swing.JPanel panel)
isResourceGroup
private boolean isResourceGroup(java.lang.String key)
getChildren
private java.lang.String[] getChildren(java.lang.String key)
createTab
private javax.swing.JPanel createTab(java.lang.String key)
createTabWrapper
private java.awt.Component createTabWrapper(javax.swing.JPanel tab)
createGroup
private javax.swing.JPanel createGroup(java.lang.String key)
getTitle
public java.lang.String getTitle(java.lang.String key)
isToHide
private boolean isToHide(java.lang.String key)
- Returns true if the resource with the given key is to be hidden,
false otherwise.
apply
public void apply()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Invoked when the Close button was pressed.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- Description copied from interface:
java.beans.PropertyChangeListener - Fired after a Bean's property has changed.
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
areEqual
private static boolean areEqual(java.lang.Object first, java.lang.Object second)
|
|||||||||
| Home >> All >> org >> dinopolis >> util >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC