|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.plugin.AbstractPlugin
org.openbp.jaspira.gui.plugin.AbstractVisiblePlugin
public abstract class AbstractVisiblePlugin
Basic implementation of a visible plugin.
| Nested Class Summary | |
|---|---|
class |
AbstractVisiblePlugin.StandardVisiblePluginEvents
Event module. |
| Nested classes/interfaces inherited from class org.openbp.jaspira.plugin.AbstractPlugin |
|---|
AbstractPlugin.StandardPluginEvents |
| Field Summary |
|---|
| Fields inherited from class org.openbp.jaspira.plugin.AbstractPlugin |
|---|
PROPERTY_CONDITION, PROPERTY_DESCRIPTION, PROPERTY_ICON, PROPERTY_NAME, PROPERTY_SEQUENCE, PROPERTY_TITLE, PROPERTY_VENDOR, PROPERTY_VERSION |
| Fields inherited from interface org.openbp.jaspira.gui.plugin.VisiblePlugin |
|---|
GER, GEU, SIZE_VARIABLE_BOTH, SIZE_VARIABLE_HEIGHT, SIZE_VARIABLE_NONE, SIZE_VARIABLE_WIDTH, TOOLBAR_DYNAMIC, TOOLBAR_EVENTS, TOOLBAR_NONE |
| Fields inherited from interface org.openbp.jaspira.plugin.Plugin |
|---|
ID_DELIMETER, LEVEL_APPLICATION, LEVEL_FRAME, LEVEL_PAGE, LEVEL_PLUGIN |
| Constructor Summary | |
|---|---|
AbstractVisiblePlugin()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addPluginFocusListener(java.awt.event.FocusListener listener)
Adds a focus listener to the listener list. |
void |
applicationReady()
Called after the application has been initialized AND the plugin initialization is finished. |
boolean |
canCopy()
Checks if the plugin can copy the selected data to the clipboard. |
boolean |
canCut()
Checks if the plugin can cut the selected data to the clipboard. |
boolean |
canDelete()
Checks if the plugin can delete the selected data. |
boolean |
canDrag()
Checks if the plugin can be dragged. |
protected boolean |
canPageChange(JaspiraPage oldPage,
JaspiraPage newPage)
This method is called before a page change takes place. |
boolean |
canPaste(java.awt.datatransfer.Transferable transferable)
Checks if the plugin can paste the data of the given transferable object. |
java.awt.datatransfer.Transferable |
copy()
Copies the selected data from the plugin to the clipboard. |
JaspiraToolbar |
createToolbar()
Creates the toolbar of this plugin. |
java.awt.datatransfer.Transferable |
cut()
Cuts the selected data from the plugin to the clipboard. |
void |
delete()
Deletes the selected data, if any. |
void |
firePluginFocusGained()
Fires a 'focus gained' message to all registered focus listeners. |
void |
firePluginFocusLost()
Fires a 'focus lost' message to all registered focus listeners. |
void |
focusPlugin()
Requests the focus for this plugin from the plugin manager and brings it to the front. |
javax.swing.JPanel |
getContentPane()
Returns the plugin content pane. |
JaspiraPage |
getPage()
Returns the page level parent plugin of this plugin. |
javax.swing.JComponent |
getPluginComponent()
Gets the component this plugin contains. |
java.awt.Component |
getPluginFocusComponent()
Returns the focus component of this plugin, i\.e\. the component that is to initially receive the focus. |
static VisiblePlugin |
getPluginFromComponentHierarchy(java.awt.Component c)
Searches backwards in the component hierarchy of the given component and returns the plugin that is associated with a parent of the component. |
PluginHolder |
getPluginHolder()
Returns the holder of this plugin. |
PluginPanel |
getPluginPanel()
Gets the panel that holds the title bar of the plugin and the content panel. |
int |
getSizeBehavior()
Returns the behavior of the plugin size. |
java.util.List |
getSubClients()
Gets the Dnd sub clients of this plugin. |
int |
getToolbarType()
Gets the type of the plugin toolbar. |
boolean |
hasCloseButton()
Returns true if the plugin should have a close button in its title bar. |
void |
hierarchyChanged(java.awt.event.HierarchyEvent e)
Called when a hierarchyChanged event is received, i\.e\. something in the hierarchy has changed. |
protected abstract void |
initializeComponents()
This template method is called after internal Components (i\.e\. title bar etc\.) |
protected void |
initializeResources()
Loads the plugin resources. |
void |
installPlugin()
Installs the plugin and all its modules. |
protected void |
installPluginContent()
Installs the contents of the plugin. |
boolean |
isPluginFocused()
Checks if the plugin is currently focused. |
boolean |
isPluginVisible()
Checks if the plugin is currently visible. |
void |
paste(java.awt.datatransfer.Transferable transferable)
Pastes the given data into the plugin. |
void |
pluginHidden()
Called after the plugin has been hidden. |
void |
pluginShown()
Called after the plugin has been displayed. |
void |
postPluginContainerUpdate(boolean fullRebuild)
Posts an update request of the plugin's holder. |
void |
removePluginFocusListener(java.awt.event.FocusListener listener)
Removes a focus listener from the listener list. |
void |
setPluginHolder(PluginHolder holder)
Sets the holder of this plugin. |
void |
showPlugin(boolean changePage)
Brings the plugin to the front, but does not request the focus. |
void |
stackEvent(JaspiraEvent je)
Ensures that there are not multiple GEUs or GERs stacked. |
void |
uninstallPlugin()
Uninstalls the plugin and all of its modules. |
void |
updatePluginContainer(boolean fullRebuild)
Forces the holder of this plugin to update its title bar. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openbp.jaspira.plugin.Plugin |
|---|
addPlugin, addToPeerGroup, canClose, containsStackedEvent, fireEvent, fireEvent, fireEvent, getAction, getChildPlugins, getClassName, getCondition, getDescendantPlugins, getDescription, getEventActionNames, getIcon, getLevel, getName, getParentPlugin, getPeerGroup, getPeerGroupNames, getPeerGroups, getPluginResourceCollection, getPluginState, getSubTitle, getTitle, getUniqueId, getVendor, getVersion, handleEvent, inheritEvent, initializePlugin, installFirstPlugin, matchesPeerGroup, matchesPeerGroups, receiveEvent, removeFromPeerGroup, removePlugin, requestClose, setParentPlugin, setPluginState, uninstallLastPlugin |
| Constructor Detail |
|---|
public AbstractVisiblePlugin()
| Method Detail |
|---|
protected void initializeResources()
initializeResources in class AbstractPluginpublic void installPlugin()
installPlugin in interface PlugininstallPlugin in class AbstractPluginprotected void installPluginContent()
installPluginContent in class AbstractPluginpublic void applicationReady()
public final void uninstallPlugin()
PluginMgr.removeInstance(Plugin) instead.
uninstallPlugin in interface PluginuninstallPlugin in class AbstractPluginprotected abstract void initializeComponents()
public void stackEvent(JaspiraEvent je)
stackEvent in interface PluginstackEvent in class AbstractPluginje - The event to stackpublic void pluginShown()
pluginShown in interface VisiblePluginpublic void pluginHidden()
pluginHidden in interface VisiblePlugin
protected boolean canPageChange(JaspiraPage oldPage,
JaspiraPage newPage)
oldPage - Current pagenewPage - Page that should be made the new current page
public PluginPanel getPluginPanel()
getPluginPanel in interface VisiblePluginpublic javax.swing.JPanel getContentPane()
public javax.swing.JComponent getPluginComponent()
getPluginComponent in interface VisiblePluginpublic java.awt.Component getPluginFocusComponent()
getPluginFocusComponent in interface VisiblePluginpublic void setPluginHolder(PluginHolder holder)
setPluginHolder in interface VisiblePluginholder - The plugin holderpublic PluginHolder getPluginHolder()
getPluginHolder in interface VisiblePluginpublic JaspiraPage getPage()
getPage in interface VisiblePluginpublic int getToolbarType()
getToolbarType in interface VisiblePluginVisiblePlugin.TOOLBAR_NONE/VisiblePlugin.TOOLBAR_EVENTS/VisiblePlugin.TOOLBAR_DYNAMICpublic boolean hasCloseButton()
hasCloseButton in interface VisiblePluginpublic int getSizeBehavior()
getSizeBehavior in interface VisiblePluginVisiblePlugin.SIZE_VARIABLE_NONE/VisiblePlugin.SIZE_VARIABLE_WIDTH/VisiblePlugin.SIZE_VARIABLE_HEIGHT/VisiblePlugin.SIZE_VARIABLE_BOTHpublic void postPluginContainerUpdate(boolean fullRebuild)
postPluginContainerUpdate in interface VisiblePluginfullRebuild - true Causes a full holder update including menu and toolbar rebuildpublic void updatePluginContainer(boolean fullRebuild)
updatePluginContainer in interface VisiblePluginfullRebuild - true Causes a full holder update including menu and toolbar rebuildpublic JaspiraToolbar createToolbar()
method.
If you want to construct your own custom toolbar, override this method.
createToolbar in interface VisiblePluginpublic void hierarchyChanged(java.awt.event.HierarchyEvent e)
pluginShown() or pluginHidden() methods.
hierarchyChanged in interface java.awt.event.HierarchyListenerpublic void showPlugin(boolean changePage)
showPlugin in interface VisiblePluginchangePage - true Shows the JaspiraPage this holder belongs to if it not the active page.public boolean isPluginVisible()
isPluginVisible in interface VisiblePluginpublic void focusPlugin()
getPluginFocusComponent()) of the plugin or
to the plugin's component.
focusPlugin in interface VisiblePluginpublic boolean isPluginFocused()
isPluginFocused in interface VisiblePluginpublic void firePluginFocusGained()
firePluginFocusGained in interface VisiblePluginpublic void firePluginFocusLost()
firePluginFocusLost in interface VisiblePluginpublic void addPluginFocusListener(java.awt.event.FocusListener listener)
addPluginFocusListener in interface VisiblePluginlistener - The listener to be addedpublic void removePluginFocusListener(java.awt.event.FocusListener listener)
removePluginFocusListener in interface VisiblePluginlistener - The listener to be removedpublic java.util.List getSubClients()
AbstractPlugin
getSubClients in interface VisiblePlugingetSubClients in class AbstractPluginInteractionClient or null otherwisepublic boolean canDrag()
VisiblePlugin
canDrag in interface VisiblePluginpublic boolean canCopy()
VisiblePlugin
canCopy in interface VisiblePluginpublic boolean canCut()
VisiblePlugin
canCut in interface VisiblePluginpublic boolean canPaste(java.awt.datatransfer.Transferable transferable)
VisiblePlugin
canPaste in interface VisiblePluginpublic boolean canDelete()
VisiblePlugin
canDelete in interface VisiblePluginpublic java.awt.datatransfer.Transferable copy()
VisiblePlugin
copy in interface VisiblePluginpublic java.awt.datatransfer.Transferable cut()
VisiblePlugin
cut in interface VisiblePluginpublic void paste(java.awt.datatransfer.Transferable transferable)
VisiblePlugin
paste in interface VisiblePlugintransferable - Content to pastepublic void delete()
VisiblePlugin
delete in interface VisiblePluginpublic static VisiblePlugin getPluginFromComponentHierarchy(java.awt.Component c)
AbstractVisiblePlugin
c - We will start the search with the parent component of this component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||