org.apache.batik.css.value
Class ImmutableRect

java.lang.Object
  |
  +--org.apache.batik.css.value.AbstractImmutableValue
        |
        +--org.apache.batik.css.value.AbstractImmutablePrimitiveValue
              |
              +--org.apache.batik.css.value.ImmutableRect
All Implemented Interfaces:
ImmutableValue, Rect

public class ImmutableRect
extends AbstractImmutablePrimitiveValue
implements Rect

This class represents immutable CSS Rect values


Field Summary
protected  CSSPrimitiveValue bottom
          The bottom value.
protected  CSSPrimitiveValue left
          The left value.
protected  CSSPrimitiveValue right
          The right value.
protected  CSSPrimitiveValue top
          The top value.
 
Constructor Summary
ImmutableRect(CSSPrimitiveValue t, CSSPrimitiveValue r, CSSPrimitiveValue b, CSSPrimitiveValue l)
          Creates a new Rect value.
 
Method Summary
 ImmutableValue createReadOnlyCopy()
          Returns a deep read-only copy of this object.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 CSSPrimitiveValue getBottom()
          This attribute is used for the bottom of the rect.
 java.lang.String getCssText()
          A string representation of the current value.
 CSSPrimitiveValue getLeft()
          This attribute is used for the left of the rect.
 short getPrimitiveType()
          The type of the value as defined by the constants specified in CSSPrimitiveValue.
 Rect getRectValue()
          This method is used to get the Rect value.
 CSSPrimitiveValue getRight()
          This attribute is used for the right of the rect.
 CSSPrimitiveValue getTop()
          This attribute is used for the top of the rect.
 
Methods inherited from class org.apache.batik.css.value.AbstractImmutablePrimitiveValue
getCssValueType
 
Methods inherited from class org.apache.batik.css.value.AbstractImmutableValue
getCounterValue, getFloatValue, getLength, getRGBColorValue, getStringValue, item
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

top

protected CSSPrimitiveValue top
The top value.

right

protected CSSPrimitiveValue right
The right value.

bottom

protected CSSPrimitiveValue bottom
The bottom value.

left

protected CSSPrimitiveValue left
The left value.
Constructor Detail

ImmutableRect

public ImmutableRect(CSSPrimitiveValue t,
                     CSSPrimitiveValue r,
                     CSSPrimitiveValue b,
                     CSSPrimitiveValue l)
Creates a new Rect value.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.

createReadOnlyCopy

public ImmutableValue createReadOnlyCopy()
Returns a deep read-only copy of this object.

getCssText

public java.lang.String getCssText()
A string representation of the current value.

getRectValue

public Rect getRectValue()
                  throws DOMException
This method is used to get the Rect value. If this CSS value doesn't contain a rect value, a DOMException is raised. Modification to the corresponding style property can be achieved using the Rect interface.
Overrides:
getRectValue in class AbstractImmutableValue
Returns:
The Rect value.
Throws:
DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect value. (e.g. this is not CSS_RECT).

getPrimitiveType

public short getPrimitiveType()
The type of the value as defined by the constants specified in CSSPrimitiveValue.
Overrides:
getPrimitiveType in class AbstractImmutablePrimitiveValue

getTop

public CSSPrimitiveValue getTop()
This attribute is used for the top of the rect.
Specified by:
getTop in interface Rect

getRight

public CSSPrimitiveValue getRight()
This attribute is used for the right of the rect.
Specified by:
getRight in interface Rect

getBottom

public CSSPrimitiveValue getBottom()
This attribute is used for the bottom of the rect.
Specified by:
getBottom in interface Rect

getLeft

public CSSPrimitiveValue getLeft()
This attribute is used for the left of the rect.
Specified by:
getLeft in interface Rect


Copyright © 2001 Apache Software Foundation. All Rights Reserved.