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

Variable Index

 o action
The action to be taken by the operation.
 o filter
The filter of the operation.
 o name
The name of the operation.
 o scope
The Root object under which this operation is held.

Constructor Index

 o Op()
Constructs a new instance.
 o Op(Root)
Constructs a new instance given a scope (attribute manager tree root) in which to operate.

Method Index

 o clone()
Returns a new copy of this operation.
 o convertFromString(String)
Returns a new instance of the type this converter converts, as specified by the string given.
 o convertFromString(String, Op)
 o convertToString(Object, StringBuffer)
Places a string representation of an instance of the type this converter converts into a string buffer.
 o genInitCode(StringBuffer, String)
Appends the initialization code for this operation into the buffer given.
 o handleEvent(Message, Event)
Evokes the action of this operation if the event given matches with the operation's filter.
 o handleMessage(Message)
Evokes the action of this operation if the message given matches with the operation's filter.
 o hasCode()
Returns true if this operation has code associated with it.
 o matchMessage(Message)
Returns true if the message given matches the filter for this operation.
 o viewableAsString()
Returns true if this type should be displayed in an editor.

Variables

 o scope
  public Root scope
The Root object under which this operation is held.
 o name
  public String name
The name of the operation.
 o filter
  public OpFilter filter
The filter of the operation. Used to determine whether a particular event should trigger the operation.
 o action
  public OpAction action
The action to be taken by the operation.

Constructors

 o Op
  public Op()
Constructs a new instance.
 o Op
  public Op(Root scope)
Constructs a new instance given a scope (attribute manager tree root) in which to operate.

Methods

 o matchMessage
  public boolean matchMessage(Message msg)
Returns true if the message given matches the filter for this operation.
 o 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.
 o handleMessage
  public boolean handleMessage(Message msg)
Evokes the action of this operation if the message given matches with the operation's filter.
 o handleEvent
  public boolean handleEvent(Message msg,
                             Event evt)
Evokes the action of this operation if the event given matches with the operation's filter.
 o 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
 o 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
 o 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
 o 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
 o convertFromString
  public void convertFromString(String s,
                                Op op)
 o 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