Class sunsoft.jws.visual.rt.type.Op
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.type.Op
java.lang.Object
|
+----sunsoft.jws.visual.rt.type.Converter
|
+----sunsoft.jws.visual.rt.type.Op
- public class Op
- extends Converter
- implements Cloneable
Stores a single operation. An operation is an action that will
take place when a particular kind of event comes in on the
component that owns the operation. The operation has two main
subparts, the filter and the action. The filter is used to
determine which events or messages trigger the performance of the
operation's action. This class also simultaneously acts as its own
converter.
- See Also:
- OpFilter, OpAction
-
action
- The action to be taken by the operation.
-
filter
- The filter of the operation.
-
name
- The name of the operation.
-
scope
- The Root object under which this operation is held.
-
Op()
- Constructs a new instance.
-
Op(Root)
- Constructs a new instance given a scope (attribute manager tree root)
in which to operate.
-
clone()
- Returns a new copy of this operation.
-
convertFromString(String)
- Returns a new instance of the type this converter converts, as
specified by the string given.
-
convertFromString(String, Op)
-
-
convertToString(Object, StringBuffer)
- Places a string representation of an instance of the type this
converter converts into a string buffer.
-
genInitCode(StringBuffer, String)
- Appends the initialization code for this operation into the buffer
given.
-
handleEvent(Message, Event)
- Evokes the action of this operation if the event given matches with
the operation's filter.
-
handleMessage(Message)
- Evokes the action of this operation if the message given matches with
the operation's filter.
-
hasCode()
- Returns true if this operation has code associated with it.
-
matchMessage(Message)
- Returns true if the message given matches the filter for this operation.
-
viewableAsString()
- Returns true if this type should be displayed in an editor.
scope
public Root scope
- The Root object under which this operation is held.
name
public String name
- The name of the operation.
filter
public OpFilter filter
- The filter of the operation. Used to determine whether a particular
event should trigger the operation.
action
public OpAction action
- The action to be taken by the operation.
Op
public Op()
- Constructs a new instance.
Op
public Op(Root scope)
- Constructs a new instance given a scope (attribute manager tree root)
in which to operate.
matchMessage
public boolean matchMessage(Message msg)
- Returns true if the message given matches the filter for this operation.
hasCode
public boolean hasCode()
- Returns true if this operation has code associated with it.
The code will have been compiled in a separate section of the generated
Ops class and must be specially called upon.
handleMessage
public boolean handleMessage(Message msg)
- Evokes the action of this operation if the message given matches with
the operation's filter.
handleEvent
public boolean handleEvent(Message msg,
Event evt)
- Evokes the action of this operation if the event given matches with
the operation's filter.
clone
public Object clone()
- Returns a new copy of this operation. Makes new copies of the
internal action and filter members as well.
- Overrides:
- clone in class Object
genInitCode
public void genInitCode(StringBuffer buf,
String name)
- Appends the initialization code for this operation into the buffer
given.
- Parameters:
- name - name of the operation
- buf - buffer onto which the code should be appended
convertToString
public void convertToString(Object obj,
StringBuffer buf)
- Places a string representation of an instance of the type this
converter converts into a string buffer.
- Overrides:
- convertToString in class Converter
convertFromString
public Object convertFromString(String s)
- Returns a new instance of the type this converter converts, as
specified by the string given.
- Overrides:
- convertFromString in class Converter
convertFromString
public void convertFromString(String s,
Op op)
viewableAsString
public boolean viewableAsString()
- Returns true if this type should be displayed in an editor.
For the attribute editor, a return value of false means that the
the textfield will be hidden.
- Returns:
- false
- Overrides:
- viewableAsString in class Converter
All Packages Class Hierarchy This Package Previous Next Index