|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.views.BackgroundPainter
public class BackgroundPainter
The background painter is the implementation of the CSS 'background' attribute. It defines how to draw the background of a box or table.
Constructor Summary | |
---|---|
BackgroundPainter(javax.swing.text.Element elem,
BoxView startReference)
Creates a painter, which takes the view as parent reference for relative values and the element to get it's styles. |
|
BackgroundPainter(javax.swing.text.Element elem,
RenderContext renderContext)
Creates a painter which is dedicated to this view |
Method Summary | |
---|---|
com.inet.html.parser.converter.ColorValue |
getBackgroundValue()
Returns the background color, may be null |
javax.swing.text.Element |
getElement()
Returns the element which is the value source for this painter |
java.awt.Rectangle |
getLastPaint()
Returns the coordinates of the last paint operation |
BoxView |
getReferenceView()
Returns the view this painter is bound to, will not be null |
boolean |
isInitDone()
Returns true if a table layout has modified this painter |
boolean |
isRelevant()
Returns true if this box painter has any visible effect (note: padding is visible as well!) |
void |
paintBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
BoxView currentView)
Paints the background fill and/or image |
void |
setBackgroundValue(com.inet.html.parser.converter.ColorValue backgroundValue)
Set the background color of this painter, may be null |
void |
setInitDone()
To be used in table context. |
void |
setLastPaint(java.awt.Rectangle lastPaint)
Sets the coordinates of the last paint operation |
void |
setReferenceView(BoxView view)
Sets the view which is the first view to be painted by this painter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BackgroundPainter(javax.swing.text.Element elem, RenderContext renderContext)
elem
- the element which is source of the values for this painterrenderContext
- the current render context, must not be nullpublic BackgroundPainter(javax.swing.text.Element elem, BoxView startReference)
elem
- the element which is source of the values for this painterstartReference
- the element, which is the start coordinate of this painter. Required for seamless
background imagesMethod Detail |
---|
public void paintBackground(java.awt.Graphics g, int x, int y, int width, int height, BoxView currentView)
paintBackground
in interface IBackgroundPainter
g
- the graphics to draw on, must not be nullx
- the x offset in pixel relative to the graphicsy
- the y offset in pixel relative to the graphicswidth
- the width to draw in pixelheight
- the height to draw in pixelcurrentView
- the view for which the background is painted, required to create seamless BG-Imagespublic BoxView getReferenceView()
getReferenceView
in interface IBackgroundPainter
public boolean isInitDone()
isInitDone
in interface IBackgroundPainter
public void setInitDone()
setInitDone
in interface IBackgroundPainter
public com.inet.html.parser.converter.ColorValue getBackgroundValue()
getBackgroundValue
in interface IBackgroundPainter
public void setBackgroundValue(com.inet.html.parser.converter.ColorValue backgroundValue)
setBackgroundValue
in interface IBackgroundPainter
backgroundValue
- the background color of this painter, may be nullpublic void setReferenceView(BoxView view)
setReferenceView
in interface IBackgroundPainter
view
- the coordinate root for this painterpublic javax.swing.text.Element getElement()
getElement
in interface IBackgroundPainter
public java.awt.Rectangle getLastPaint()
getLastPaint
in interface IBackgroundPainter
public void setLastPaint(java.awt.Rectangle lastPaint)
setLastPaint
in interface IBackgroundPainter
lastPaint
- the coordinates of the last paint operationpublic boolean isRelevant()
isRelevant
in interface IBackgroundPainter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |