fi.hut.tml.xsmiles.mlfc.css.swing
Class SwingBoxPainter

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.css.swing.SwingBoxPainter
All Implemented Interfaces:
java.io.Serializable

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

See Also:
Serialized Form

Constructor Summary
SwingBoxPainter(javax.swing.text.AttributeSet a)
           
 
Method Summary
 float getInset(int side, javax.swing.text.View v)
          Fetches the inset needed on a given side to account for the margin, border, and padding.
 void paint(java.awt.Graphics g, float x, float y, float w, float h, javax.swing.text.View v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingBoxPainter

public SwingBoxPainter(javax.swing.text.AttributeSet a)
Method Detail

getInset

public float getInset(int side,
                      javax.swing.text.View v)
Fetches the inset needed on a given side to account for the margin, border, and padding.

Parameters:
side - The size of the box to fetch the inset for. This can be View.TOP, View.LEFT, View.BOTTOM, or View.RIGHT.
v - the view making the request. This is used to get the AttributeSet, and may be used to resolve percentage arguments.
Throws:
java.lang.IllegalArgumentException - for an invalid direction

paint

public void paint(java.awt.Graphics g,
                  float x,
                  float y,
                  float w,
                  float h,
                  javax.swing.text.View v)


X-Smiles 1.2