|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.apelon.apps.dts.editor.modules.DTSEditorModule
public abstract class DTSEditorModule
This class should be extended to create a custom plug-in module for the Apelon DTS Editor. The extending class must have constructor with no parameter. Otherwise the module class won't be recognized as a module.
The module class in package or a subpackage of com.apelon.modules.dts.editor are loaded by default. If the package of the class is other than this, this should be specified in DTSEditor property file (bin/editor/dtseditor.xml):
A module is loaded during DTSEditor startup. The sequence of actions are :
getModuleMenus()
are added to menu bar
getModuleMenuItems(int)
are added to DTS menus
getModuleToolbarItems()
are added to toolbar
getDTSModuleConfigFile()
, a DTSModuleConfig
is set in the module using setDTSModuleConfig(DTSModuleConfig)
initModule(DTSEditorModuleMgr)
method is called.
Field Summary | |
---|---|
static int |
FILE_MENU_ITEMS
Identifier representing the DTS Editor 'File' menu. |
static int |
HELP_MENU_ITEMS
Identifier representing the DTS Editor 'Help' menu. |
static int |
OPTIONS_MENU_ITEMS
Identifier representing the DTS Editor 'Options' menu. |
static int |
TOOLS_MENU_ITEMS
Identifier representing the DTS Editor 'Tools' menu. |
static int |
VIEW_MENU_ITEMS
Identifier representing the DTS Editor 'View' menu. |
Constructor Summary | |
---|---|
protected |
DTSEditorModule()
Default constructor. |
Method Summary | |
---|---|
DTSModuleConfig |
getDTSModuleConfig()
Returns DTSModuleConfig if module config file is specified using getDTSModuleConfigFile() . |
String |
getDTSModuleConfigFile()
Return a xml file name ( |
JMenuItem[] |
getModuleMenuItems(int group)
Returns menu items to be added to an existing DTSEditor menu group . |
JMenu[] |
getModuleMenus()
Return a new main menu to be displayed on the DTS Editor menu bar. |
JComponent[] |
getModuleToolbarItems()
Buttons to be displayed in the DTS Editor toolbar. |
abstract void |
initModule(DTSEditorModuleMgr mgr)
Called by DTS Editor at startup to initialize this module. |
void |
setDTSModuleConfig(DTSModuleConfig config)
If getDTSModuleConfigFile() returns a file path, the corresponding DTSModuleConfig
is set by DTS Editor using this method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FILE_MENU_ITEMS
public static final int VIEW_MENU_ITEMS
public static final int TOOLS_MENU_ITEMS
public static final int OPTIONS_MENU_ITEMS
public static final int HELP_MENU_ITEMS
Constructor Detail |
---|
protected DTSEditorModule()
Method Detail |
---|
public abstract void initModule(DTSEditorModuleMgr mgr)
mgr
- DTSModuleMgrDTSEditorModuleMgr
public JMenu[] getModuleMenus()
public JMenuItem[] getModuleMenuItems(int group)
group
.
group
- an integer representing a particular menu group from the DTS Editor
FILE_MENU_ITEMS
,
VIEW_MENU_ITEMS
,
TOOLS_MENU_ITEMS
,
OPTIONS_MENU_ITEMS
,
HELP_MENU_ITEMS
public JComponent[] getModuleToolbarItems()
public String getDTSModuleConfigFile()
For null, no DTSModuleConfig
will be created.
public void setDTSModuleConfig(DTSModuleConfig config)
getDTSModuleConfigFile()
returns a file path, the corresponding DTSModuleConfig
is set by DTS Editor using this method.
config
- DTSModuleConfig
public DTSModuleConfig getDTSModuleConfig()
DTSModuleConfig
if module config file is specified using getDTSModuleConfigFile()
.
Otherwise null.
DTSModuleConfig
or null if no module config file is specified.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |