org.openbp.jaspira.decoration
Class DecorationModule

java.lang.Object
  extended by org.openbp.jaspira.plugin.EventModule
      extended by org.openbp.jaspira.decoration.DecorationModule
All Implemented Interfaces:
JaspiraEventListener

public abstract class DecorationModule
extends EventModule

This is an abstract superclass that should be implemented by all Plugins that want to use the decoration engine. It is used by the DecorationMgr to notify clients of changed decorators. Implement this by subclass this as an inner subclass and overwrite one or both eventHandling methods.

Author:
Stephan Moritz

Field Summary
 
Fields inherited from class org.openbp.jaspira.plugin.EventModule
EVENT_CONSUMED, EVENT_HANDLED, EVENT_IGNORED, MODULE_POST_GLOBAL, MODULE_PRE_GLOBAL, MODULE_TREE
 
Constructor Summary
DecorationModule()
           
 
Method Summary
 JaspiraEventHandlerCode added(JaspiraEvent je)
          This is called when an decorator has been added.
 java.lang.String getName()
          The name of this module like "editor.file".
 JaspiraEventHandlerCode removed(JaspiraEvent je)
          This is called when an decorator has been removed.
 
Methods inherited from class org.openbp.jaspira.plugin.EventModule
eventFired, getEventActionNames, getForeignEventNames, getModuleType, getPriority, handleUnaccountedEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecorationModule

public DecorationModule()
Method Detail

getName

public java.lang.String getName()
Description copied from class: EventModule
The name of this module like "editor.file". Decides which events will be received.

Specified by:
getName in class EventModule

added

public JaspiraEventHandlerCode added(JaspiraEvent je)
This is called when an decorator has been added. The Object of the event contains the the key under which the decorator has been entered. Overrider should check whether this key interest them and initiate a repaint (or similar) if applicable.

Parameters:
je - The event
Returns:
Returncode

removed

public JaspiraEventHandlerCode removed(JaspiraEvent je)
This is called when an decorator has been removed. The Object of the event contains the the key under which the decorator has been removed. Overrider should check whether this key interest them and initiate a repaint (or similar) if applicable.

Parameters:
je - The event
Returns:
Returncode


Copyright © 2011. All Rights Reserved.