Package com.lightdev.app.shtm
Interface SHTMLPlugin
- All Known Implementing Classes:
AbstractPlugin
public interface SHTMLPlugin
Defines an interface all plug-ins for application SimplyHTML
have to implement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
indicates docking requested on bottom of a given containerstatic final int
indicates docking requested on the left of a given containerstatic final int
indicates docking is not requestedstatic final int
indicates docking requested on the right of a given containerstatic final int
indicates docking requested on top of a given container -
Method Summary
Modifier and TypeMethodDescriptionget the component that this plug-in produces, if anyint
get the location the component returned by getDockComponent() shall be docked at.get the name of the plug-in as it shall appear on a GUI.get a menu item providing documentation about this plug-in.get the name used internally for this plug-ingetOwner()
get the owner of this plug-ingetOwnerAction
(String cmd) get an action from the resource bundle of the owner of this plug-inget a string from the resource bundle of the owner of this plug-inget a menu of actions this plug-in provides.void
void
initPlugin
(SHTMLPanelImpl owner, String internalName, String pluginMenuId, String helpMenuId) init the plug-in this is called by the PluginManager directly after instantiating the plug-inboolean
isActive()
get the status of the plug-invoid
setDockLocation
(int location) set the location the component returned by getDockComponent() shall be docked at.void
setOwner
(SHTMLPanelImpl owner) set the owner of this plug-invoid
setStatus
(boolean isActive) set status of plug-invoid
-
Field Details
-
DOCK_LOCATION_NONE
static final int DOCK_LOCATION_NONEindicates docking is not requested- See Also:
-
DOCK_LOCATION_TOP
static final int DOCK_LOCATION_TOPindicates docking requested on top of a given container- See Also:
-
DOCK_LOCATION_RIGHT
static final int DOCK_LOCATION_RIGHTindicates docking requested on the right of a given container- See Also:
-
DOCK_LOCATION_BOTTOM
static final int DOCK_LOCATION_BOTTOMindicates docking requested on bottom of a given container- See Also:
-
DOCK_LOCATION_LEFT
static final int DOCK_LOCATION_LEFTindicates docking requested on the left of a given container- See Also:
-
-
Method Details
-
getGUIName
String getGUIName()get the name of the plug-in as it shall appear on a GUI.- Returns:
- the name of the plug-in
-
getInternalName
String getInternalName()get the name used internally for this plug-in- Returns:
- the internal name of this plug-in
-
getPluginMenu
JMenuItem getPluginMenu()get a menu of actions this plug-in provides.JMenu
is a decendant ofJMenuItem
so this method may return a single menu item up to a whole structure of submenus in its return value.- Returns:
- the plug-in menu
-
getHelpMenu
JMenuItem getHelpMenu()get a menu item providing documentation about this plug-in.JMenu
is a decendant ofJMenuItem
so this method may return a single menu item up to a whole structure of submenus in its return value.- Returns:
- a menu item with help for this plug-in
-
getDockLocation
int getDockLocation()get the location the component returned by getDockComponent() shall be docked at.- Returns:
- the dock location, one of DOCK_LOCATION_TOP, DOCK_LOCATION_BOTTOM, DOCK_LOCATION.LEFT, DOCK_LOCATION_RIGHT or DOCK_LOCATION_NONE, if the component shall not dock.
-
setDockLocation
void setDockLocation(int location) set the location the component returned by getDockComponent() shall be docked at.- Parameters:
location
- the dock location, one of DOCK_LOCATION_TOP, DOCK_LOCATION_BOTTOM, DOCK_LOCATION.LEFT, DOCK_LOCATION_RIGHT or DOCK_LOCATION_NONE, if the component shall not dock.
-
getComponent
JComponent getComponent()get the component that this plug-in produces, if any- Returns:
- the component produced by this plug-in, or null if none is produced
-
isActive
boolean isActive()get the status of the plug-in- Returns:
- true, if activated, false if not
-
setStatus
void setStatus(boolean isActive) set status of plug-in- Parameters:
isActive
- indicates whether or not the plug-in shall be activated
-
setOwner
set the owner of this plug-in- Parameters:
owner
- the main frame of the instance of SimplyHTML creating the plug-in
-
getOwner
SHTMLPanelImpl getOwner()get the owner of this plug-in- Returns:
- the main frame of the instance of SimplyHTML that created the plug-in
-
getOwnerResString
get a string from the resource bundle of the owner of this plug-in- Parameters:
nm
- the name of the string resource to get- Returns:
- the string with the given name or null, if none is found
-
getOwnerAction
get an action from the resource bundle of the owner of this plug-in- Parameters:
cmd
- the name of the action to get- Returns:
- the action with the given name or null, if none is found
-
initPlugin
init the plug-in this is called by the PluginManager directly after instantiating the plug-in- Parameters:
owner
- the owner of this plug-ininternalName
- the internal name this plug-in shall havepluginMenuId
- the id of the plug-in menu in the TextResources, or null if no plugin-in menu is to be createdhelpMenuId
- the id of the help menu for this plug-in in the TextResources, or null if no help menu is to be created
-
initHelpMenu
void initHelpMenu() -
showInitialInfo
void showInitialInfo()
-