<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">java.lang.Object</A>
<IMGSRC="../../../resources/inherit.gif"ALT="extended by "><B>com.mxgraph.shape.mxStencil</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B><DD><AHREF="../../../com/mxgraph/shape/mxIShape.html"title="interface in com.mxgraph.shape">mxIShape</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>mxStencil</B><DT>extends <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A><DT>implements <AHREF="../../../com/mxgraph/shape/mxIShape.html"title="interface in com.mxgraph.shape">mxIShape</A></DL>
</PRE>
<P>
Implements a stencil for the given XML definition. This class implements the mxGraph
<CODE>protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#mxStencil(org.w3c.dom.Element)">mxStencil</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> description)</CODE>
<BR>
Constructs a new stencil for the given mxGraph shape description.</TD>
<CODE>protected <AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#computeAspect(com.mxgraph.view.mxCellState, com.mxgraph.util.mxRectangle, java.lang.String)">computeAspect</A></B>(<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state,
<AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A> bounds,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> direction)</CODE>
<BR>
Returns a rectangle that contains the offset in x and y and the horizontal
and vertical scale in width and height used to draw this shape inside the
<CODE>protected <AHREF="../../../com/mxgraph/canvas/mxGraphicsCanvas2D.html"title="class in com.mxgraph.canvas">mxGraphicsCanvas2D</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#createCanvas(com.mxgraph.canvas.mxGraphics2DCanvas)">createCanvas</A></B>(<AHREF="../../../com/mxgraph/canvas/mxGraphics2DCanvas.html"title="class in com.mxgraph.canvas">mxGraphics2DCanvas</A> gc)</CODE>
<BR>
Creates the canvas for rendering the stencil.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#drawElement(com.mxgraph.canvas.mxGraphicsCanvas2D, com.mxgraph.view.mxCellState, org.w3c.dom.Element, com.mxgraph.util.mxRectangle)">drawElement</A></B>(<AHREF="../../../com/mxgraph/canvas/mxGraphicsCanvas2D.html"title="class in com.mxgraph.canvas">mxGraphicsCanvas2D</A> canvas,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> node,
<AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A> aspect)</CODE>
<BR>
Drawsthe given element.</TD>
<CODE> <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#evaluateAttribute(org.w3c.dom.Element, java.lang.String, com.mxgraph.view.mxCellState)">evaluateAttribute</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state)</CODE>
<BR>
Gets the attribute for the given name from the given node.</TD>
<CODE> <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#getDouble(org.w3c.dom.Element, java.lang.String)">getDouble</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute)</CODE>
<BR>
Returns the given attribute or 0.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#getDouble(org.w3c.dom.Element, java.lang.String, double)">getDouble</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
double defaultValue)</CODE>
<BR>
Returns the given attribute or the default value.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#getInt(org.w3c.dom.Element, java.lang.String, int)">getInt</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
int defaultValue)</CODE>
<BR>
Returns the given attribute or the default value.</TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#getString(org.w3c.dom.Element, java.lang.String, java.lang.String)">getString</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> defaultValue)</CODE>
<BR>
Returns the given attribute or the default value.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#paintShape(com.mxgraph.canvas.mxGraphics2DCanvas, com.mxgraph.view.mxCellState)">paintShape</A></B>(<AHREF="../../../com/mxgraph/canvas/mxGraphics2DCanvas.html"title="class in com.mxgraph.canvas">mxGraphics2DCanvas</A> gc,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state)</CODE>
<BR>
Paints the stencil for the given state.</TD>
<TD><CODE><B><AHREF="../../../com/mxgraph/shape/mxStencil.html#setDescription(org.w3c.dom.Element)">setDescription</A></B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> value)</CODE>
<BR>
Sets the description.</TD>
<THALIGN="left"><B>Methods inherited from class java.lang.<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TRBGCOLOR="white"CLASS="TableRowColor">
<TD><CODE><AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()"title="class or interface in java.lang">clone</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)"title="class or interface in java.lang">equals</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()"title="class or interface in java.lang">finalize</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()"title="class or interface in java.lang">getClass</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()"title="class or interface in java.lang">hashCode</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()"title="class or interface in java.lang">notify</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()"title="class or interface in java.lang">notifyAll</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()"title="class or interface in java.lang">toString</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)"title="class or interface in java.lang">wait</A></CODE></TD>
protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A><B>desc</B></PRE>
<DL>
<DD>Holds the top-level node of the stencil definition.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="aspect"><!----></A><H3>
aspect</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>aspect</B></PRE>
<DL>
<DD>Holds the aspect of the shape. Default is "auto".
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="w0"><!----></A><H3>
w0</H3>
<PRE>
protected double <B>w0</B></PRE>
<DL>
<DD>Holds the width of the shape. Default is 100.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="h0"><!----></A><H3>
h0</H3>
<PRE>
protected double <B>h0</B></PRE>
<DL>
<DD>Holds the height of the shape. Default is 100.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="bgNode"><!----></A><H3>
bgNode</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A><B>bgNode</B></PRE>
<DL>
<DD>Holds the XML node with the stencil description.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="fgNode"><!----></A><H3>
fgNode</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A><B>fgNode</B></PRE>
<DL>
<DD>Holds the XML node with the stencil description.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="strokewidth"><!----></A><H3>
strokewidth</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>strokewidth</B></PRE>
<DL>
<DD>Holds the strokewidth direction from the description.
public <B>mxStencil</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> description)</PRE>
<DL>
<DD>Constructs a new stencil for the given mxGraph shape description.
public <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A><B>getDescription</B>()</PRE>
public void <B>setDescription</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> value)</PRE>
protected <AHREF="../../../com/mxgraph/canvas/mxGraphicsCanvas2D.html"title="class in com.mxgraph.canvas">mxGraphicsCanvas2D</A><B>createCanvas</B>(<AHREF="../../../com/mxgraph/canvas/mxGraphics2DCanvas.html"title="class in com.mxgraph.canvas">mxGraphics2DCanvas</A> gc)</PRE>
public void <B>paintShape</B>(<AHREF="../../../com/mxgraph/canvas/mxGraphics2DCanvas.html"title="class in com.mxgraph.canvas">mxGraphics2DCanvas</A> gc,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state)</PRE>
<DL>
<DD>Paints the stencil for the given state.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><AHREF="../../../com/mxgraph/shape/mxIShape.html#paintShape(com.mxgraph.canvas.mxGraphics2DCanvas, com.mxgraph.view.mxCellState)">paintShape</A></CODE> in interface <CODE><AHREF="../../../com/mxgraph/shape/mxIShape.html"title="interface in com.mxgraph.shape">mxIShape</A></CODE></DL>
protected void <B>drawShadow</B>(<AHREF="../../../com/mxgraph/canvas/mxGraphicsCanvas2D.html"title="class in com.mxgraph.canvas">mxGraphicsCanvas2D</A> canvas,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state,
double rotation,
boolean flipH,
boolean flipV,
<AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A> bounds,
public boolean <B>drawShape</B>(<AHREF="../../../com/mxgraph/canvas/mxGraphicsCanvas2D.html"title="class in com.mxgraph.canvas">mxGraphicsCanvas2D</A> canvas,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state,
<AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A> bounds,
protected <AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A><B>computeAspect</B>(<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state,
<AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A> bounds,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> direction)</PRE>
<DL>
<DD>Returns a rectangle that contains the offset in x and y and the horizontal
and vertical scale in width and height used to draw this shape inside the
protected void <B>drawElement</B>(<AHREF="../../../com/mxgraph/canvas/mxGraphicsCanvas2D.html"title="class in com.mxgraph.canvas">mxGraphicsCanvas2D</A> canvas,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> node,
<AHREF="../../../com/mxgraph/util/mxRectangle.html"title="class in com.mxgraph.util">mxRectangle</A> aspect)</PRE>
protected int <B>getInt</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
int defaultValue)</PRE>
<DL>
<DD>Returns the given attribute or the default value.
protected double <B>getDouble</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute)</PRE>
protected double <B>getDouble</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
double defaultValue)</PRE>
<DL>
<DD>Returns the given attribute or the default value.
protected <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>getString</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> defaultValue)</PRE>
<DL>
<DD>Returns the given attribute or the default value.
public <AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>evaluateAttribute</B>(<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Element.html?is-external=true"title="class or interface in org.w3c.dom">Element</A> elt,
<AHREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> attribute,
<AHREF="../../../com/mxgraph/view/mxCellState.html"title="class in com.mxgraph.view">mxCellState</A> state)</PRE>
<DL>
<DD>Gets the attribute for the given name from the given node. If the attribute
does not exist then the text content of the node is evaluated and if it is
a function it is invoked with <state> as the only argument and the return
value is used as the attribute value to be returned.