|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jfimagine.jfgraph.shape.base.AbstractObject
|
+--com.jfimagine.jfgraph.shape.decorate.CanvasFormat
Canvas format used to assign a canvas' drawing area.
| Field Summary | |
static int |
CANVASSIZE_DEFAULT_CM
default canvas width in centimeters |
static int |
CANVASSIZE_DEFAULT_INCH
default canvas width in inches |
static int |
CANVASSIZE_DEFAULT_UNIT
default canvas width unit : inch |
static int |
CANVASSIZE_MAXIMUM
maximum canvas width in inch or centimeter |
static int |
CANVASSIZE_MINIMUM
minimum canvas width in inch or centimeter |
static java.lang.String |
XML_CANVASFORMAT
A XML string tag represents a canvas format. |
static java.lang.String |
XML_HEIGHT
A XML string tag represents the canvas height |
static java.lang.String |
XML_HEIGHTUNIT
A XML string tag represents the unit of canvas height |
static java.lang.String |
XML_WIDTH
A XML string tag represents the canvas width. |
static java.lang.String |
XML_WIDTHUNIT
A XML string tag represents the unit of canvas width. |
| Fields inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
m_lastError, XML_OBJECTID, XML_OBJECTTYPE |
| Constructor Summary | |
CanvasFormat()
Constructor for CanvasFormat |
|
| Method Summary | |
protected void |
appendChildToDOM(Element element,
JFVersion version)
Append necessary xml child for current element, this method will be called internally by toDOM. |
java.lang.Object |
clone()
Creates a new object of the same class and with the same contents as this object. |
protected AbstractObject |
cloneMe()
Creates a new AbstractObject of the same class and with the same contents as this object. |
boolean |
equals(java.lang.Object obj)
Determines whether or not two objects are equal. |
protected void |
extractChildFromDOM(Element element,
JFVersion version)
Extract needed xml child from current element, this method will be called internally by fromDOM. |
static CanvasFormat |
getDefaultCanvasFormat()
get global default canvas format |
double |
getHeight()
|
int |
getHeightUnit()
|
double |
getScreenHeight()
canvas height in pixels. |
double |
getScreenWidth()
canvas width in pixels. |
double |
getWidth()
|
int |
getWidthUnit()
|
int |
hashCode()
Returns the hashcode for this Object. |
void |
loadFromStream(JFReader stream,
boolean skipHead,
JFVersion version)
Load object data from a binary stream |
void |
saveToStream(JFWriter stream,
JFVersion version)
Save this object to a binary stream |
static void |
setDefaultCanvasFormat(CanvasFormat canvasFormat)
set global default canvas format |
void |
setHeight(double height)
|
void |
setHeightUnit(int heightUnit)
|
void |
setIsMetric(boolean isMetric)
|
void |
setValue(CanvasFormat canvasFormat)
Set new value for this canvasFormat. |
void |
setWidth(double width)
|
void |
setWidthUnit(int widthUnit)
|
java.lang.String |
toString()
Convert this object to String |
| Methods inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
fromDOM, getLastError, getMaxObjectId, getObjectId, getObjectType, getXMLTag, getZoomScale, isShowDesign, setLastError, setObjectId, setObjectType, setShowDesign, setValue, setXMLTag, setZoomScale, toDOM |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String XML_CANVASFORMAT
public static final java.lang.String XML_WIDTH
public static final java.lang.String XML_WIDTHUNIT
public static final java.lang.String XML_HEIGHT
public static final java.lang.String XML_HEIGHTUNIT
public static final int CANVASSIZE_DEFAULT_INCH
public static final int CANVASSIZE_DEFAULT_UNIT
public static final int CANVASSIZE_DEFAULT_CM
public static final int CANVASSIZE_MINIMUM
public static final int CANVASSIZE_MAXIMUM
| Constructor Detail |
public CanvasFormat()
| Method Detail |
public static void setDefaultCanvasFormat(CanvasFormat canvasFormat)
canvasFormat - A new canvas formatpublic static CanvasFormat getDefaultCanvasFormat()
public double getWidth()
public void setWidth(double width)
public int getWidthUnit()
public void setWidthUnit(int widthUnit)
public double getScreenWidth()
public double getHeight()
public void setHeight(double height)
public int getHeightUnit()
public void setHeightUnit(int heightUnit)
public double getScreenHeight()
public void setIsMetric(boolean isMetric)
public void setValue(CanvasFormat canvasFormat)
canvasFormat - A new canvas format.public java.lang.String toString()
toString in class AbstractObject
protected AbstractObject cloneMe()
throws java.lang.CloneNotSupportedException
cloneMe in class AbstractObjectjava.lang.CloneNotSupportedException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AbstractObjectjava.lang.CloneNotSupportedExceptionpublic int hashCode()
hashCode in class AbstractObjectpublic boolean equals(java.lang.Object obj)
equals in class AbstractObjectobj - an object to be compared with this object
protected void appendChildToDOM(Element element,
JFVersion version)
appendChildToDOM in class AbstractObjectelement - A XML element to append child xml nodesversion - A file version notification so this object can obey the rules to save data.
protected void extractChildFromDOM(Element element,
JFVersion version)
extractChildFromDOM in class AbstractObjectelement - An element used to extract needed xml childversion - A file version notification so this object can obey the rules to fetch data.
public void saveToStream(JFWriter stream,
JFVersion version)
throws java.io.IOException
saveToStream in class AbstractObjectstream - An binary output streamversion - A file version notification so this object can obey the rules to save data.
java.io.IOException
public void loadFromStream(JFReader stream,
boolean skipHead,
JFVersion version)
throws java.io.IOException
loadFromStream in class AbstractObjectstream - An binary input streamskipHead - Skip head 'TYPE' check, an shape object should always
has its own shape-type stored, if this shape-type has already been readed,
this loadFromStream should/could not read the type anymore.version - A file version notification so this object can obey the rules to fetch data.
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||