Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.text.html
Class StyleSheet.BoxPainter  view StyleSheet.BoxPainter download StyleSheet.BoxPainter.java

java.lang.Object
  extended byjavax.swing.text.html.StyleSheet.BoxPainter
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
StyleSheet

public static class StyleSheet.BoxPainter
extends java.lang.Object
implements java.io.Serializable

This class carries out some of the duties of CSS formatting. This enables views to present the CSS formatting while not knowing how the CSS values are cached. This object is reponsible for the insets of a View and making sure the background is maintained according to the CSS attributes.


Field Summary
(package private)  javax.swing.text.AttributeSet as
          Attribute set for painter
 
Constructor Summary
(package private) StyleSheet.BoxPainter(javax.swing.text.AttributeSet as)
          Package-private constructor.
 
Method Summary
 float getInset(int size, javax.swing.text.View v)
          Gets 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)
          Paints the CSS box according to the attributes given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

as

javax.swing.text.AttributeSet as
Attribute set for painter

Constructor Detail

StyleSheet.BoxPainter

StyleSheet.BoxPainter(javax.swing.text.AttributeSet as)
Package-private constructor.

Method Detail

getInset

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


paint

public void paint(java.awt.Graphics g,
                  float x,
                  float y,
                  float w,
                  float h,
                  javax.swing.text.View v)
Paints the CSS box according to the attributes given. This should paint the border, padding and background.