org.eu.sk.zero.acd
Class ComponentType

java.lang.Object
  |
  +--org.eu.sk.zero.acd.ComponentType
Direct Known Subclasses:
AreaType, EdgeType, NodeType

public class ComponentType
extends Object

Superclass of types of all components. Types of components should be defined in ACD modules.

Version:
$Id: ComponentType.java,v 1.5 2003/04/10 16:00:08 robo Exp $

Nested Class Summary
protected  class ComponentType.ACDRgb
          Helper class for color manipulation.
 
Field Summary
static int ERROR
           
protected  boolean hidden
          Whether all components of this type should be hidden.
protected  int id
          Numerical id of component type.
static int INACTIVE
           
static int SELECTED
           
 
Constructor Summary
ComponentType()
          Component type should be never constructed directly.
ComponentType(String s)
          Component type should be never constructed directly.
 
Method Summary
 void addMethod(org.eu.sk.zero.acd.Method m)
          Adds a method for this type.
 void addTrigger(org.eu.sk.zero.acd.Trigger t)
          Adds a trigger for this type of component.
 void addValueType(org.eu.sk.zero.acd.ValueType t)
          Adds a type of value to this type of component.
 String dump()
          Deprecated.  
 boolean fireTriggers(org.eu.sk.zero.acd.Component c, String name)
          Fires triggers.
 String getId()
          Returns numerical identification.
 String getName()
           
 boolean isHidden()
           
 Iterator methodIterator()
          Allows browsing methods associated with this component type.
 void setHidden(boolean h)
           
 String toString()
          Returns name of this type.
 Iterator valueTypeIterator()
          Allows browsing types of values for this component type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected int id
Numerical id of component type. Used for serialization


hidden

protected boolean hidden
Whether all components of this type should be hidden.


INACTIVE

public static final int INACTIVE
See Also:
Constant Field Values

SELECTED

public static final int SELECTED
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values
Constructor Detail

ComponentType

public ComponentType()
Component type should be never constructed directly. Construct its subclasses instead - types of nodes, edges or areas.


ComponentType

public ComponentType(String s)
Component type should be never constructed directly. Construct its subclasses instead - types of nodes, edges or areas.

Method Detail

addValueType

public void addValueType(org.eu.sk.zero.acd.ValueType t)
Adds a type of value to this type of component. All components of this type will have value of this type.

See Also:
ValueType, Value

addMethod

public void addMethod(org.eu.sk.zero.acd.Method m)
Adds a method for this type. The method must be already constructed.


addTrigger

public void addTrigger(org.eu.sk.zero.acd.Trigger t)
Adds a trigger for this type of component.


valueTypeIterator

public Iterator valueTypeIterator()
Allows browsing types of values for this component type.


methodIterator

public Iterator methodIterator()
Allows browsing methods associated with this component type.


fireTriggers

public boolean fireTriggers(org.eu.sk.zero.acd.Component c,
                            String name)
Fires triggers.

Parameters:
c - specific component on with the triggers will operate
name - type of the trigger - 'add', 'remove' ...

getName

public String getName()

getId

public String getId()
Returns numerical identification.


isHidden

public boolean isHidden()

setHidden

public void setHidden(boolean h)

dump

public String dump()
Deprecated.  

Debugging method


toString

public String toString()
Returns name of this type.

Overrides:
toString in class Object