vanted.attribute.token
Class TokenAttributeContinuous

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttribute
      extended by org.graffiti.attributes.StringAttribute
          extended by vanted.attribute.token.AbstractTokenAttribute
              extended by vanted.attribute.token.TokenAttributeContinuous
All Implemented Interfaces:
org.graffiti.attributes.Attribute, org.graffiti.core.DeepCopy, org.graffiti.plugin.Displayable

public class TokenAttributeContinuous
extends AbstractTokenAttribute

The Class TokenAttributeContinuous handles a continuous token attribute.

Author:
Kevin Pucknat

Field Summary
static java.lang.String colorAttributeName
          The Constant colorAttributeName.
static java.lang.String decimal
          The Constant decimal.
static java.lang.String name
          The Constant name.
static java.lang.String positionAttributeName
          The Constant positionAttributeName.
static java.lang.String sizeAttributeName
          The Constant sizeAttributeName.
 
Fields inherited from class vanted.attribute.token.AbstractTokenAttribute
path, seperator
 
Fields inherited from interface org.graffiti.attributes.Attribute
SEPARATOR
 
Constructor Summary
TokenAttributeContinuous()
          Instantiates a new token attribute continuous.
TokenAttributeContinuous(java.lang.String id)
          Instantiates a new token attribute continuous.
TokenAttributeContinuous(java.lang.String id, java.lang.String value)
          Instantiates a new token attribute continuous.
 
Method Summary
 boolean changeTokenValue(AbstractToken token, double value)
          Changes token value.
 void removeAllTokens()
          Removes all tokens.
static double round(double value)
          Rounds a double value.
 
Methods inherited from class vanted.attribute.token.AbstractTokenAttribute
addToken, getString, getTokens, getValue, removeToken, setDefaultValue, setString
 
Methods inherited from class org.graffiti.attributes.StringAttribute
copy, getTypedStringAttribute, getTypedStringAttribute, putAttributeType, toString, toXMLString
 
Methods inherited from class org.graffiti.attributes.AbstractAttribute
addEdgeAttributeType, addNodeAttributeType, getAttributable, getDescription, getIcon, getId, getName, getParent, getPath, getTypedAttribute, isTypedAttributeFromID, setDescription, setId, setParent, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public static final java.lang.String name
The Constant name.

See Also:
Constant Field Values

decimal

public static final java.lang.String decimal
The Constant decimal.

See Also:
Constant Field Values

positionAttributeName

public static final java.lang.String positionAttributeName
The Constant positionAttributeName.

See Also:
Constant Field Values

sizeAttributeName

public static final java.lang.String sizeAttributeName
The Constant sizeAttributeName.

See Also:
Constant Field Values

colorAttributeName

public static final java.lang.String colorAttributeName
The Constant colorAttributeName.

See Also:
Constant Field Values
Constructor Detail

TokenAttributeContinuous

public TokenAttributeContinuous()
Instantiates a new token attribute continuous.


TokenAttributeContinuous

public TokenAttributeContinuous(java.lang.String id)
Instantiates a new token attribute continuous.

Parameters:
id - the id

TokenAttributeContinuous

public TokenAttributeContinuous(java.lang.String id,
                                java.lang.String value)
Instantiates a new token attribute continuous.

Parameters:
id - the id
value - the value
Method Detail

removeAllTokens

public void removeAllTokens()
Description copied from class: AbstractTokenAttribute
Removes all tokens.

Overrides:
removeAllTokens in class AbstractTokenAttribute

changeTokenValue

public boolean changeTokenValue(AbstractToken token,
                                double value)
Changes token value.

Parameters:
token - the token
value - the value
Returns:
true, if successful

round

public static double round(double value)
Rounds a double value.

Parameters:
value - the value
Returns:
the double