com.sage.swt.client.widget.event
Class AbstractSwtPlotEvent

java.lang.Object
  extended by com.objetdirect.tatami.client.charting.effects.AbstractJSEffect
      extended by com.objetdirect.tatami.client.charting.effects.PlotMouseListener
          extended by com.sage.swt.client.widget.event.AbstractSwtPlotEvent
All Implemented Interfaces:
com.objetdirect.tatami.client.charting.effects.Effect, SwtEvent
Direct Known Subclasses:
SwtPlotEvent

public abstract class AbstractSwtPlotEvent
extends com.objetdirect.tatami.client.charting.effects.PlotMouseListener
implements SwtEvent

Class for storing and executing actions that are linked to plot events.


Constructor Summary
AbstractSwtPlotEvent()
          Default constructor.
 
Method Summary
 void addAction(SwtAction action)
          Adds an action to the actions that will be executed when this event is triggered.
protected  void executeActions(java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
          Executes each of the actions that have been linked to this event.
protected  java.util.List<SwtAction> getActions()
          Returns a list of the actions that are linked to this event.
static java.util.Collection<FunctionParameter> getDefaultFunctionParameters()
          Gets a default FunctionParameter collection where each item describes a parameter that will be passed to the action that is called when this event is fired.
protected  java.util.LinkedHashMap<java.lang.String,java.lang.Object> getDefaultParams(java.lang.Object eventSource)
          Returns the values for the default parameters for all widget events: formID and widgetID
 java.lang.String getDesignerTooltip()
          Gets a string that describes this event.
 EventInfo getEventInfo()
          Gets the action and additional parameter information about the event.
abstract  java.util.Collection<FunctionParameter> getFunctionParameters()
          Gets a FunctionParameter collection where each item describes a parameter that will be passed to the action that is called when this event is fired.
abstract  FunctionReturn getFunctionReturn()
          Gets information about the return value of the action that is called when this event is fired.
 void removeAction(SwtAction action)
          Removes an action from the list of actions that will be executed when this event is triggered.
 
Methods inherited from class com.objetdirect.tatami.client.charting.effects.PlotMouseListener
destroyEffect, initEffect, processEvent
 
Methods inherited from class com.objetdirect.tatami.client.charting.effects.AbstractJSEffect
getDuration, jsDestroy, setDuration, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sage.swt.client.widget.event.SwtEvent
getEditor
 

Constructor Detail

AbstractSwtPlotEvent

public AbstractSwtPlotEvent()
Default constructor.

Method Detail

addAction

public void addAction(SwtAction action)
Adds an action to the actions that will be executed when this event is triggered.

Specified by:
addAction in interface SwtEvent
Parameters:
action - The SwtAction action that will be added.

removeAction

public void removeAction(SwtAction action)
Removes an action from the list of actions that will be executed when this event is triggered.

Specified by:
removeAction in interface SwtEvent
Parameters:
action - The SwtAction action that will be removed.

getEventInfo

public EventInfo getEventInfo()
Gets the action and additional parameter information about the event. This information is used by the UI Designer when editing this information.

Specified by:
getEventInfo in interface SwtEvent
Returns:
The action and additional parameter information about the event

getDesignerTooltip

public java.lang.String getDesignerTooltip()
Gets a string that describes this event. This string is shown as a tooltip in the UI Designer.

Specified by:
getDesignerTooltip in interface SwtEvent
Returns:
The tooltip string that describes the event.

getDefaultFunctionParameters

public static java.util.Collection<FunctionParameter> getDefaultFunctionParameters()
Gets a default FunctionParameter collection where each item describes a parameter that will be passed to the action that is called when this event is fired. Those parameters are passed in the order they are listed. Most subclasses will start their function parameter collections with the contents of this collection (so that these parameters are passed first).

Returns:
An unmodifiable default FunctionParameter collection where each item describes a parameter that will be passed to the action function that is called when this event is fired.

getFunctionParameters

public abstract java.util.Collection<FunctionParameter> getFunctionParameters()
Gets a FunctionParameter collection where each item describes a parameter that will be passed to the action that is called when this event is fired. Those parameters are passed in the order they are listed.

Returns:
A FunctionParameter collection where each item describes a parameter that will be passed to the action that is called when this event is fired. Implementors should make sure that this collection is unmodifiable.

getFunctionReturn

public abstract FunctionReturn getFunctionReturn()
Gets information about the return value of the action that is called when this event is fired. Implementors must return null if there is no return value from that action.

Returns:
The information about the return value of the action that is called when this event is fired.

getDefaultParams

protected java.util.LinkedHashMap<java.lang.String,java.lang.Object> getDefaultParams(java.lang.Object eventSource)
Returns the values for the default parameters for all widget events: formID and widgetID

Parameters:
eventSource - The source of the event (usually a widget).
Returns:
A map of the default parameters FORMID and WIDGETID and their values.

executeActions

protected void executeActions(java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
Executes each of the actions that have been linked to this event.

Parameters:
params - The event specific parameters that will be passed to each action.

getActions

protected java.util.List<SwtAction> getActions()
Returns a list of the actions that are linked to this event.

Returns:
A list of actions.


Copyright © 2011 Sage Software, Inc. All rights reserved.