public class DefaultModuleEditor extends Object implements ModuleEditor
Constructor and Description |
---|
DefaultModuleEditor()
Creates a new, uninitialized module editor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
build()
Initializes all component for the module editor and creates and layouts all keyeditors.
|
boolean |
canHandle(Module module)
Checks whether this module editor can handle the given module.
|
ModuleEditor |
createInstance(Module module,
HierarchicalConfiguration config,
ConfigDescriptionEntry[] keyNames)
Creates a new, initialized instance of the default module editor.
|
JComponent |
getComponent()
Returns the editor component of the module.
|
protected HierarchicalConfiguration |
getConfig()
Returns the report configuration used when loading values for this editor.
|
protected ConfigDescriptionEntry[] |
getKeyNames()
Returns the key names used in this editor.
|
protected Module |
getModule()
Returns the currently edited module.
|
void |
reset()
Resets all keys to the values from the report configuration.
|
protected void |
setConfig(HierarchicalConfiguration config)
Defines the report configuration for this editor.
|
protected void |
setKeyNames(ConfigDescriptionEntry[] keyNames)
Defines the suggested key names for the module editor.
|
protected void |
setModule(Module module)
Defines the module for this editor.
|
void |
store()
Stores all values for the editor's keys into the report configuration.
|
public DefaultModuleEditor()
public ModuleEditor createInstance(Module module, HierarchicalConfiguration config, ConfigDescriptionEntry[] keyNames)
createInstance
in interface ModuleEditor
module
- the module that should be edited.config
- the report configuration used to fill the values of the editors.keyNames
- the list of keynames this module editor should handle.ModuleEditor.createInstance(Module, HierarchicalConfiguration, ConfigDescriptionEntry[])
protected Module getModule()
protected void setModule(Module module)
module
- the module, which should be handled by this editor.public boolean canHandle(Module module)
canHandle
in interface ModuleEditor
module
- the module to be edited.ModuleEditor.canHandle(Module)
protected HierarchicalConfiguration getConfig()
protected void setConfig(HierarchicalConfiguration config)
config
- the report configuration.protected ConfigDescriptionEntry[] getKeyNames()
protected void setKeyNames(ConfigDescriptionEntry[] keyNames)
keyNames
- the key names for the editor.public JComponent getComponent()
getComponent
in interface ModuleEditor
protected void build()
public void reset()
reset
in interface ModuleEditor
public void store()
store
in interface ModuleEditor
Copyright © 2017 Hitachi Vantara. All rights reserved.