com.tensegrity.graph.rule
Class AbstractGraphObjectRule

java.lang.Object
  extended bycom.tensegrity.graph.rule.AbstractRule
      extended bycom.tensegrity.graph.rule.AbstractGraphObjectRule
All Implemented Interfaces:
GraphObjectRule, Rule, java.io.Serializable
Direct Known Subclasses:
EdgeRule, NodeRule

public abstract class AbstractGraphObjectRule
extends com.tensegrity.graph.rule.AbstractRule
implements GraphObjectRule, java.io.Serializable

Abstract base class that implements the functionality common to all rules. +

Version:
$Id: AbstractGraphObjectRule.java,v 1.12 2005/01/13 10:35:05 BurkhardWick Exp $
Author:
Stepan Rutz
See Also:
RuleRegistry, GraphObjectRule, Serialized Form

Constructor Summary
AbstractGraphObjectRule(AbstractGraphObjectRule rule)
          Copy-Constructor for an abstract rule.
AbstractGraphObjectRule(java.lang.String name)
          Constructor for an abstract rule.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Returns the name of the rule.
 int hashCode()
           
 boolean isCopyable()
          Returns the copyable flag for this rule.
 boolean isCutable()
          Returns the cutable flag for this rule.
 boolean isDeletable()
          Returns the deletable flag for this rule.
 boolean isMovable()
          Returns the moveable flag for this rule.
 boolean isResizable()
          Returns the resizable flag for this rule.
 boolean isSelectable()
          Returns the selectable flag for this rule.
 void setCopyable(boolean copyable)
          Sets the copyable flag for this rule.
 void setCutable(boolean cutable)
          Sets the cutable flag for this rule.
 void setDeletable(boolean deletable)
          Sets the deletable flag for this rule.
 void setMovable(boolean movable)
          Sets the moveable flag for this rule.
 void setResizable(boolean resizable)
          Sets the resizable flag for this rule.
 void setSelectable(boolean selectable)
          Sets the selectable flag for this rule.
 java.lang.String toString()
          Return a string representation of this rule.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.tensegrity.graph.rule.Rule
deepCopy, getDescription, getName
 

Constructor Detail

AbstractGraphObjectRule

public AbstractGraphObjectRule(java.lang.String name)
Constructor for an abstract rule.

The properties are initialized with the following defaults:

Parameters:
name - name of the rule

AbstractGraphObjectRule

public AbstractGraphObjectRule(AbstractGraphObjectRule rule)
Copy-Constructor for an abstract rule.

Parameters:
rule - the rule to copy from.
Method Detail

isDeletable

public boolean isDeletable()
Returns the deletable flag for this rule.

Specified by:
isDeletable in interface GraphObjectRule
Returns:
true if the rule allows deletion, otherwise false.

setDeletable

public void setDeletable(boolean deletable)
Sets the deletable flag for this rule.

Specified by:
setDeletable in interface GraphObjectRule
Parameters:
deletable - true if the rule allows deletion, otherwise false.

isMovable

public boolean isMovable()
Returns the moveable flag for this rule.

Specified by:
isMovable in interface GraphObjectRule
Returns:
true if the rule allows moving, otherwise false.

setMovable

public void setMovable(boolean movable)
Sets the moveable flag for this rule.

Specified by:
setMovable in interface GraphObjectRule
Parameters:
movable - true if the rule allows moving, otherwise false.

isSelectable

public boolean isSelectable()
Returns the selectable flag for this rule.

Specified by:
isSelectable in interface GraphObjectRule
Returns:
true if the rule allows selection, otherwise false.

setSelectable

public void setSelectable(boolean selectable)
Sets the selectable flag for this rule.

Specified by:
setSelectable in interface GraphObjectRule
Parameters:
selectable - true if the rule allows selection, otherwise false.

isResizable

public boolean isResizable()
Returns the resizable flag for this rule.

Specified by:
isResizable in interface GraphObjectRule
Returns:
true if the rule allows resizing, otherwise false.

setResizable

public void setResizable(boolean resizable)
Sets the resizable flag for this rule.

Specified by:
setResizable in interface GraphObjectRule
Parameters:
resizable - true if the rule allows resizing, otherwise false.

isCopyable

public boolean isCopyable()
Returns the copyable flag for this rule.

Specified by:
isCopyable in interface GraphObjectRule
Returns:
true if the rule allows copying, otherwise false.

setCopyable

public void setCopyable(boolean copyable)
Sets the copyable flag for this rule.

Specified by:
setCopyable in interface GraphObjectRule
Parameters:
copyable - true if the rule allows copying, otherwise false.

isCutable

public boolean isCutable()
Returns the cutable flag for this rule.

Specified by:
isCutable in interface GraphObjectRule
Returns:
true if the rule allows cuting, otherwise false.

setCutable

public void setCutable(boolean cutable)
Sets the cutable flag for this rule.

Specified by:
setCutable in interface GraphObjectRule
Parameters:
cutable - true if the rule allows cuting, otherwise false.

toString

public java.lang.String toString()
Return a string representation of this rule.

Returns:
string representation of this rule.

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

getName

public java.lang.String getName()
Returns the name of the rule.

Specified by:
getName in interface Rule
Returns:
the name of the rule.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.