ru.novosoft.dc.rtf.dom
Class ShapeEntry

java.lang.Object
  |
  +--ru.novosoft.dc.rtf.dom.ShapeEntry
Direct Known Subclasses:
ShapeGroup, ShapeObject

public class ShapeEntry
extends java.lang.Object

The basic class for shape entries contains shape properties and ID.


Constructor Summary
ShapeEntry()
           
 
Method Summary
 void exportTo(org.w3c.dom.Element elem)
          Export shape-entry ID number andproperties to the specifed DOM element.
 int getID()
          Return shape-entry ID number.
 int getInt(java.lang.String name, int defaultValue)
          Return an integer value of the property with the specified name or the default value if this property is undefined or contains incorrect value.
 java.lang.Object getProperty(java.lang.String name)
          Return a value of property or null if the property is undefined.
 java.lang.Object getProperty(java.lang.String name, java.lang.Object defaultValue)
          Return a value of the property or the default value passed in parameters if the property is undefined.
 boolean hasID()
          Return true if ID number is specified.
 boolean isTrue(java.lang.String name, java.lang.String defaultValue)
          Call the getProperty(name, defaultValue) method and return true if the resulting string is equal to "1" (this means true in shape properties).
 java.util.Hashtable properties()
          Return the shape properties table.
 void setID(int value)
          Set shape-entry ID number.
 void setProperty(java.lang.String name, java.lang.Object value)
          Set property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeEntry

public ShapeEntry()
Method Detail

setID

public final void setID(int value)
Set shape-entry ID number.

getID

public final int getID()
Return shape-entry ID number.

hasID

public final boolean hasID()
Return true if ID number is specified.

properties

public final java.util.Hashtable properties()
Return the shape properties table.

setProperty

public final void setProperty(java.lang.String name,
                              java.lang.Object value)
Set property.

getProperty

public final java.lang.Object getProperty(java.lang.String name)
Return a value of property or null if the property is undefined.

getProperty

public final java.lang.Object getProperty(java.lang.String name,
                                          java.lang.Object defaultValue)
Return a value of the property or the default value passed in parameters if the property is undefined.

getInt

public final int getInt(java.lang.String name,
                        int defaultValue)
Return an integer value of the property with the specified name or the default value if this property is undefined or contains incorrect value.

isTrue

public final boolean isTrue(java.lang.String name,
                            java.lang.String defaultValue)
Call the getProperty(name, defaultValue) method and return true if the resulting string is equal to "1" (this means true in shape properties).

exportTo

public void exportTo(org.w3c.dom.Element elem)
Export shape-entry ID number andproperties to the specifed DOM element.