net.aerith.misao.xml.relaxer
Class XmlPixelSize

java.lang.Object
  |
  +--net.aerith.misao.xml.IONode
        |
        +--net.aerith.misao.xml.relaxer.XmlPixelSize
Direct Known Subclasses:
XmlPixelSize

public class XmlPixelSize
extends IONode
implements java.io.Serializable, IRNode

XmlPixelSize is generated by Relaxer based on pixy.rlx. This class is derived from:

 <elementRule role="pixel-size">
   <sequence>
     <element name="width" type="float"/>
     <element name="height" type="float"/>
   </sequence>
 </elementRule>
 <tag name="pixel-size">
   <attribute name="unit" required="true" type="string"/>
 </tag>
 

See Also:
Serialized Form

Field Summary
private  float height
           
private  IRNode parentRNode
           
private  RContext rContext
           
private  java.lang.String unit
           
private  float width
           
 
Constructor Summary
XmlPixelSize()
          Creates a XmlPixelSize.
XmlPixelSize(org.w3c.dom.Document doc)
          Creates a XmlPixelSize by the Document doc.
XmlPixelSize(org.w3c.dom.Element element)
          Creates a XmlPixelSize by the Element element.
XmlPixelSize(RStack stack)
          Creates a XmlPixelSize by the Stack stack that contains Elements.
 
Method Summary
 float getHeight()
          Gets the float property height.
 IRNode getParentRNode()
          Gets the IRNode property parentRNode.
 RContext getRContext()
          Gets the RContext property rContext.
 RContext getRContextResolved()
          Gets the property "rContext" which is resolved recursively.
 IRNode[] getRNodes()
          Gets child RNodes.
 java.lang.String getUnit()
          Gets the String property unit.
 float getWidth()
          Gets the float property width.
private  void init(org.w3c.dom.Element element)
           
static boolean isMatch(org.w3c.dom.Element element)
          Tests if a Element element is valid for the XmlPixelSize.
static boolean isMatch(RStack stack)
          Tests if elements contained in a Stack stack is valid for the XmlPixelSize.
static boolean isMatchHungry(RStack stack)
          Tests if elements contained in a Stack stack is valid for the XmlPixelSize.
 void makeElement(org.w3c.dom.Node parent)
          Creates a DOM representation of the object.
 void setHeight(float height)
          Sets the float property height.
 void setParentRNode(IRNode parentRNode)
          Sets the IRNode property parentRNode.
 void setRContext(RContext rContext)
          Sets the RContext property rContext.
 void setUnit(java.lang.String unit)
          Sets the String property unit.
 void setup(org.w3c.dom.Document doc)
          Initializes the XmlPixelSize by the Document doc.
 void setup(org.w3c.dom.Element element)
          Initializes the XmlPixelSize by the Element element.
 void setup(RStack stack)
          Initializes the XmlPixelSize by the Stack stack that contains Elements.
 void setWidth(float width)
          Sets the float property width.
 
Methods inherited from class net.aerith.misao.xml.IONode
read, read, translateFrom, translateTo, write, write
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

unit

private java.lang.String unit

width

private float width

height

private float height

parentRNode

private IRNode parentRNode

rContext

private RContext rContext
Constructor Detail

XmlPixelSize

public XmlPixelSize()
Creates a XmlPixelSize.

XmlPixelSize

public XmlPixelSize(RStack stack)
Creates a XmlPixelSize by the Stack stack that contains Elements. This constructor is supposed to be used internally by the Relaxer system.
Parameters:
stack -  

XmlPixelSize

public XmlPixelSize(org.w3c.dom.Document doc)
Creates a XmlPixelSize by the Document doc.
Parameters:
doc -  

XmlPixelSize

public XmlPixelSize(org.w3c.dom.Element element)
Creates a XmlPixelSize by the Element element.
Parameters:
element -  
Method Detail

setup

public void setup(org.w3c.dom.Document doc)
Initializes the XmlPixelSize by the Document doc.
Overrides:
setup in class IONode
Parameters:
doc -  

setup

public void setup(org.w3c.dom.Element element)
Initializes the XmlPixelSize by the Element element.
Parameters:
element -  

setup

public void setup(RStack stack)
Initializes the XmlPixelSize by the Stack stack that contains Elements. This constructor is supposed to be used internally by the Relaxer system.
Parameters:
stack -  

init

private void init(org.w3c.dom.Element element)
Parameters:
element -  

makeElement

public void makeElement(org.w3c.dom.Node parent)
Creates a DOM representation of the object. Result is appended to the Node parent.
Overrides:
makeElement in class IONode
Parameters:
parent -  

getUnit

public final java.lang.String getUnit()
Gets the String property unit.
Returns:
String

setUnit

public final void setUnit(java.lang.String unit)
Sets the String property unit.
Parameters:
unit -  

getWidth

public final float getWidth()
Gets the float property width.
Returns:
float

setWidth

public final void setWidth(float width)
Sets the float property width.
Parameters:
width -  

getHeight

public final float getHeight()
Gets the float property height.
Returns:
float

setHeight

public final void setHeight(float height)
Sets the float property height.
Parameters:
height -  

getParentRNode

public final IRNode getParentRNode()
Gets the IRNode property parentRNode.
Specified by:
getParentRNode in interface IRNode
Returns:
IRNode

setParentRNode

public final void setParentRNode(IRNode parentRNode)
Sets the IRNode property parentRNode.
Specified by:
setParentRNode in interface IRNode
Parameters:
parentRNode -  

getRNodes

public IRNode[] getRNodes()
Gets child RNodes.
Specified by:
getRNodes in interface IRNode
Returns:
IRNode[]

getRContext

public final RContext getRContext()
Gets the RContext property rContext.
Specified by:
getRContext in interface IRNode
Returns:
RContext

setRContext

public final void setRContext(RContext rContext)
Sets the RContext property rContext.
Specified by:
setRContext in interface IRNode
Parameters:
rContext -  

getRContextResolved

public RContext getRContextResolved()
Gets the property "rContext" which is resolved recursively.
Specified by:
getRContextResolved in interface IRNode
Returns:
RContext

isMatch

public static boolean isMatch(org.w3c.dom.Element element)
Tests if a Element element is valid for the XmlPixelSize.
Parameters:
element -  
Returns:
boolean

isMatch

public static boolean isMatch(RStack stack)
Tests if elements contained in a Stack stack is valid for the XmlPixelSize. This mehtod is supposed to be used internally by the Relaxer system.
Parameters:
stack -  
Returns:
boolean

isMatchHungry

public static boolean isMatchHungry(RStack stack)
Tests if elements contained in a Stack stack is valid for the XmlPixelSize. This method consumes the stack contents during matching operation. This mehtod is supposed to be used internally by the Relaxer system.
Parameters:
stack -  
Returns:
boolean