dks.src.wordart
Class CWordArt

java.lang.Object
  extended by dks.src.wordart.CWordArt
All Implemented Interfaces:
java.io.Serializable

public class CWordArt
extends java.lang.Object
implements java.io.Serializable

This class implements the dksWordArt which can be saved to a XML format
date : 5 sept. 07

Author:
DarK Sidious
See Also:
Serialized Form

Constructor Summary
CWordArt(java.lang.String text, java.awt.Font font)
           
CWordArt(java.lang.String text, java.awt.Font font, CShadow shadow)
           
CWordArt(java.lang.String text, java.awt.Font font, CShadow shadow, CWarp warp)
           
CWordArt(java.lang.String text, java.awt.Font font, CTexture texture)
           
CWordArt(java.lang.String text, java.awt.Font font, CTexture texture, CShadow shadow)
           
CWordArt(java.lang.String text, java.awt.Font font, CTexture texture, CShadow shadow, CWarp warp)
           
CWordArt(java.lang.String text, java.awt.Font font, CTexture texture, CWarp warp)
           
CWordArt(java.lang.String text, java.awt.Font font, CWarp warp)
           
 
Method Summary
 void draw(java.awt.Graphics g, int x, int y)
           
 void draw(java.awt.Graphics g, int x, int y, boolean antialiasing)
           
 void draw(java.awt.Graphics g, int x, int y, int width, int height)
          Deprecated. replaced by the draw(Graphics g, int x, int y) : use the totalSize property to define the width and the height of the wordart
 void draw(java.awt.Graphics g, int x, int y, int width, int height, boolean antialiasing)
          Deprecated. replaced by the draw(Graphics g, int x, int y, boolean antialiasing) : use the totalSize property to define the width and the height of the wordart
 boolean equals(java.lang.Object obj)
           
 java.awt.Color getBackgroundColor()
          the background color of the wordart
 CBorder getBorder()
           
 java.awt.geom.Rectangle2D getBounds(java.awt.Graphics g)
           
 java.awt.Dimension getDimension()
          the dimension of the wordart
 java.awt.Font getFont()
           
 CShadow getShadow()
           
 java.lang.String getText()
           
 CTexture getTexture()
           
 java.awt.Dimension getTotalSize()
           
 CWarp getWarp()
           
 int hashCode()
           
 boolean isAutoSizeFont()
           
 boolean isStretch()
          the stretching of the wordart
 void prepare(java.awt.Graphics g)
           
 void setAutoSizeFont(boolean autoSizeFont)
           
 void setBackgroundColor(java.awt.Color backgroundColor)
          the background color of the wordart
 void setBorder(CBorder border)
           
 void setDimension(java.awt.Dimension dimension)
          the dimension of the wordart
 void setFont(java.awt.Font font)
           
 void setShadow(CShadow shadow)
           
 void setStretch(boolean stretch)
          the stretching of the wordart
 void setText(java.lang.String text)
           
 void setTexture(CTexture texture)
           
 void setTotalSize(java.awt.Dimension totalSize)
           
 void setWarp(CWarp warp)
           
 java.lang.String toString()
           
 void XMLload(org.jdom.Element root)
           
 void XMLload(java.io.File file)
           
 void XMLsave(org.jdom.Element root)
           
 void XMLsave(java.io.File file)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font,
                CTexture texture,
                CShadow shadow,
                CWarp warp)
Parameters:
text - the text of the wordart
font - the font of the text
texture - the texture to use
shadow - the shadow to use
warp - the warp to use

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font,
                CShadow shadow,
                CWarp warp)
Parameters:
text - the text of the wordart
font - the font of the text
shadow - the shadow to use
warp - the warp to use

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font,
                CTexture texture,
                CWarp warp)
Parameters:
text - the text of the wordart
font - the font of the text
texture - the texture to use
warp - the warp to use

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font,
                CTexture texture,
                CShadow shadow)
Parameters:
text - the text of the wordart
font - the font of the text
texture - the texture to use
shadow - the shadow to use

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font,
                CWarp warp)
Parameters:
text - the text of the wordart
font - the font of the text
warp - the warp to use

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font,
                CTexture texture)
Parameters:
text - the text of the wordart
font - the font of the text
texture - the texture to use

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font,
                CShadow shadow)
Parameters:
text - the text of the wordart
font - the font of the text
shadow - the shadow to use

CWordArt

public CWordArt(java.lang.String text,
                java.awt.Font font)
Parameters:
text - the text of the wordart
font - the font of the text
Method Detail

getShadow

public CShadow getShadow()

setShadow

public void setShadow(CShadow shadow)
Parameters:
shadow - the shadow to use

getText

public java.lang.String getText()
Returns:
the text to display

setText

public void setText(java.lang.String text)
Parameters:
text - the text to display

getTexture

public CTexture getTexture()
Returns:
the texture to use

setTexture

public void setTexture(CTexture texture)
Parameters:
texture - the texture to use

getWarp

public CWarp getWarp()
Returns:
the warp to use

setWarp

public void setWarp(CWarp warp)
Parameters:
warp - the warp to use

getFont

public java.awt.Font getFont()
Returns:
the font of the text

setFont

public void setFont(java.awt.Font font)
Parameters:
font - the font of the text

getBorder

public CBorder getBorder()
Returns:
the border of the text

setBorder

public void setBorder(CBorder border)
Parameters:
border - the border of the text

getBackgroundColor

public java.awt.Color getBackgroundColor()
the background color of the wordart

Returns:
the background color of the wordart

setBackgroundColor

public void setBackgroundColor(java.awt.Color backgroundColor)
the background color of the wordart

Parameters:
backgroundColor - the background color of the wordart

getDimension

public java.awt.Dimension getDimension()
the dimension of the wordart

Returns:
the dimension of the wordart

setDimension

public void setDimension(java.awt.Dimension dimension)
the dimension of the wordart

Parameters:
dimension - the dimension of the wordart

isStretch

public boolean isStretch()
the stretching of the wordart

Returns:
the stretching of the wordart

setStretch

public void setStretch(boolean stretch)
the stretching of the wordart

Parameters:
stretch - the stretching of the wordart

isAutoSizeFont

public boolean isAutoSizeFont()
Returns:
if the font can be modify when the dimension of the wordart change

setAutoSizeFont

public void setAutoSizeFont(boolean autoSizeFont)
Parameters:
autoSizeFont - if true, the font will be modified when the dimension of the wordart change, and the font have the optimal size

getTotalSize

public java.awt.Dimension getTotalSize()
Returns:
the totalSize of the wordart (the size of the final picture)

setTotalSize

public void setTotalSize(java.awt.Dimension totalSize)
Parameters:
totalSize - the totalSize of the wordart (the size of the final picture)

draw

@Deprecated
public void draw(java.awt.Graphics g,
                            int x,
                            int y,
                            int width,
                            int height)
Deprecated. replaced by the draw(Graphics g, int x, int y) : use the totalSize property to define the width and the height of the wordart

Parameters:
g - the graphics used to display the wordart
x - the position in the X axis of the wordart
y - the position in the Y axis of the wordart
width - the width of the wordart
height - the height of the wordart

draw

public void draw(java.awt.Graphics g,
                 int x,
                 int y)
Parameters:
g - the graphics used to display the wordart
x - the position in the X axis of the wordart
y - the position in the Y axis of the wordart The size of the wordart is defined by the totalSize property

draw

@Deprecated
public void draw(java.awt.Graphics g,
                            int x,
                            int y,
                            int width,
                            int height,
                            boolean antialiasing)
Deprecated. replaced by the draw(Graphics g, int x, int y, boolean antialiasing) : use the totalSize property to define the width and the height of the wordart

Parameters:
g - the graphics used to display the wordart
x - the position in the X axis of the wordart
y - the position in the Y axis of the wordart
width - the width of the wordart
height - the height of the wordart
antialiasing - the activity of the antialiasing

draw

public void draw(java.awt.Graphics g,
                 int x,
                 int y,
                 boolean antialiasing)
Parameters:
g - the graphics used to display the wordart
x - the position in the X axis of the wordart
y - the position in the Y axis of the wordart
antialiasing - the activity of the antialiasing

prepare

public void prepare(java.awt.Graphics g)

getBounds

public java.awt.geom.Rectangle2D getBounds(java.awt.Graphics g)
Parameters:
g - the graphics used to display the wordard
Returns:
the bounds of the wordart

XMLload

public void XMLload(java.io.File file)
             throws java.io.IOException,
                    org.jdom.JDOMException
Parameters:
file - the file used to load the WordArt
Throws:
java.io.IOException
org.jdom.JDOMException

XMLload

public void XMLload(org.jdom.Element root)
             throws java.io.IOException,
                    org.jdom.JDOMException
Parameters:
root - the DOM root element used to load the WordArt
Throws:
java.io.IOException
org.jdom.JDOMException

XMLsave

public void XMLsave(java.io.File file)
             throws java.io.IOException
Parameters:
file - the file used to save the WordArt
Throws:
java.io.IOException

XMLsave

public void XMLsave(org.jdom.Element root)
Parameters:
root - the DOM root Element used to save the WordArt
Throws:
java.io.IOException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object