fcmodeler.attributes
Class LineWidthValue

java.lang.Object
  |
  +--fcmodeler.attributes.LineWidthValue
All Implemented Interfaces:
EdgeVisualAttributeValue, VisualAttributeValue

public final class LineWidthValue
extends java.lang.Object
implements VisualAttributeValue, EdgeVisualAttributeValue

A specific value of the line width attribute.

Since:
JDK1.3
Version:
$Revision: 1.1 $
Author:
Zach Cox

Constructor Summary
LineWidthValue()
          Creates a new LineWidthValue with a width of 1.0.
LineWidthValue(float lineWidth)
          Creates a new LineWidthValue using the specified line width.
LineWidthValue(java.lang.String lineWidth)
          Creates a new LineWidthValue using the specified string description.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the specified object with this line width value for equality.
 VisualAttribute getAttribute()
           
 float getLineWidth()
          Returns the width of this line width value.
 int hashCode()
          Returns the hash code for this line width value.
 void setEdgeValue(EdgeFigure figure)
          Sets the line width of the specified edge figure to the width contained in this line width value.
 void setPermanentEdgeValue(EdgeFigure figure)
          Sets the permanent line width of the specified edge figure to the width contained in this line width value.
 java.lang.String toString()
          Returns a string representation of this line width value.
static LineWidthValue valueOf(java.lang.String value)
          Returns a new LineWidthValue instance, created using the specified string description.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineWidthValue

public LineWidthValue()
Creates a new LineWidthValue with a width of 1.0.

LineWidthValue

public LineWidthValue(float lineWidth)
Creates a new LineWidthValue using the specified line width.
Parameters:
lineWidth - the line width of this line width value.

LineWidthValue

public LineWidthValue(java.lang.String lineWidth)
Creates a new LineWidthValue using the specified string description. The string should just be a floating-point number, like "2.345".
Parameters:
lineWidth - string description of the line width of this line width value.
Method Detail

equals

public boolean equals(java.lang.Object o)
Compares the specified object with this line width value for equality.
Specified by:
equals in interface VisualAttributeValue
Overrides:
equals in class java.lang.Object
Parameters:
o - the object to be compared for equality with this line width value.
Returns:
true if the specified object is equal to this line width value.

getAttribute

public VisualAttribute getAttribute()
Specified by:
getAttribute in interface VisualAttributeValue

getLineWidth

public float getLineWidth()
Returns the width of this line width value.
Returns:
the width of this line width value.

hashCode

public int hashCode()
Returns the hash code for this line width value.
Specified by:
hashCode in interface VisualAttributeValue
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code for this line width value.

setEdgeValue

public void setEdgeValue(EdgeFigure figure)
Sets the line width of the specified edge figure to the width contained in this line width value.
Specified by:
setEdgeValue in interface EdgeVisualAttributeValue
Parameters:
figure - the edge figure to update.

setPermanentEdgeValue

public void setPermanentEdgeValue(EdgeFigure figure)
Sets the permanent line width of the specified edge figure to the width contained in this line width value.
Specified by:
setPermanentEdgeValue in interface EdgeVisualAttributeValue
Parameters:
figure - the edge figure to update.

toString

public java.lang.String toString()
Returns a string representation of this line width value.
Specified by:
toString in interface VisualAttributeValue
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this line width value.

valueOf

public static LineWidthValue valueOf(java.lang.String value)
Returns a new LineWidthValue instance, created using the specified string description.
Parameters:
value - the string description to be used in creating the new LineWidthValue instance.
Returns:
the new LineWidthValue instance.