|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.views.BlankBoxPainter
public class BlankBoxPainter
A BoxPainter which represents a transparent box without borders, padding and margin. This class
is used for runtime and memory optimization. The Insets
instances of this class must never be modified!
Field Summary |
---|
Fields inherited from interface com.inet.html.views.IBoxPainter |
---|
EMPTY_INSETS, PAINT_MODE_CENTER, PAINT_MODE_LEFTEDGE, PAINT_MODE_NORMAL, PAINT_MODE_RIGHTEDGE |
Constructor Summary | |
---|---|
BlankBoxPainter()
|
Method Summary | |
---|---|
com.inet.html.parser.converter.ColorValue |
getBackgroundValue()
Returns the background color, may be null |
com.inet.html.parser.converter.ColorValue |
getBorderBottomColor()
Returns the color of the bottom border, may be null |
java.awt.Insets |
getBorderInsets()
Get the border sizes set by html or CSS. |
com.inet.html.parser.converter.ColorValue |
getBorderLeftColor()
Returns the color of the left border, may be null |
com.inet.html.parser.converter.ColorValue |
getBorderRightColor()
Returns the color of the right border, may be null |
java.awt.Insets |
getBorderStyles()
Get the border styles set by CSS. |
com.inet.html.parser.converter.ColorValue |
getBorderTopColor()
Returns the color of the top border, may be null |
int |
getBottomBorderPadding()
Returns the bottom border width + padding width |
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 |
int |
getLeftBorderPadding()
Returns the distance between the outer border and the content area on the left side |
java.awt.Insets |
getMargins()
Get the CSS margins. |
java.awt.Insets |
getPadding()
This are the padding values set by the CSS. |
BoxView |
getReferenceView()
Returns the view this painter is bound to, will not be null |
int |
getRightBorderPadding()
Returns the right border width + padding width |
int |
getTopBorderPadding()
Returns the top border width + padding width |
int |
getTotalHeightGain()
Returns the total difference in width between the content and the box around the margin |
int |
getTotalLeftGain()
Distance between the margins outer border to the left end the left border of the content |
int |
getTotalTopGain()
Distance between the margins outer border on the top and the top border of the content |
int |
getTotalWidthGain()
Returns the total difference in width between the content and the box around the margin |
BoxView |
getView()
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 |
paint(java.awt.Graphics g,
int x,
int y,
int width,
int height,
int paintMode,
BoxView paintRef)
Paints the box or a part of the box represented by this painter. |
void |
paint(java.awt.Graphics g,
java.awt.Rectangle r,
int paintMode,
BoxView paintRef)
Paints the box or a part of the box represented by this painter. |
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 |
setBorderBottomColor(com.inet.html.parser.converter.ColorValue borderBottomColor)
Sets the color of the bottom border |
java.awt.Insets |
setBorderInsets()
Returns a mutable insets object to manipulate the border width |
void |
setBorderInsets(java.awt.Insets borderInsets)
Sets the border insets. |
void |
setBorderLeftColor(com.inet.html.parser.converter.ColorValue borderLeftColor)
Sets the color of the left border |
void |
setBorderRightColor(com.inet.html.parser.converter.ColorValue borderRightColor)
Sets the color of the right border |
java.awt.Insets |
setBorderStyles()
Returns a mutable insets object to manipulate the border styles |
void |
setBorderStyles(java.awt.Insets borderStyles)
Sets the border styles. |
void |
setBorderTopColor(com.inet.html.parser.converter.ColorValue borderTopColor)
Sets the color of the top border |
void |
setInitDone()
To be used in table context. |
void |
setLastPaint(java.awt.Rectangle lastPaint)
Sets the coordinates of the last paint operation |
java.awt.Insets |
setMargins()
Returns a mutable insets object to manipulate the margin width |
void |
setMargins(java.awt.Insets margins)
Sets the margin insets |
java.awt.Insets |
setPadding()
Returns a mutable insets object to manipulate the padding width |
void |
setPadding(java.awt.Insets padding)
Sets the padding insets |
void |
setReferenceView(BoxView view)
Sets the view which is the first view to be painted by this painter. |
void |
updateRelativeValues(int parentWidth)
Checks whether this view has relative paddings or margins an updates them. |
void |
updateRelevance()
Updates the internal relevance flag. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlankBoxPainter()
Method Detail |
---|
public com.inet.html.parser.converter.ColorValue getBorderBottomColor()
getBorderBottomColor
in interface IBoxPainter
public java.awt.Insets getBorderInsets()
getBorderInsets
in interface IBoxPainter
public com.inet.html.parser.converter.ColorValue getBorderLeftColor()
getBorderLeftColor
in interface IBoxPainter
public com.inet.html.parser.converter.ColorValue getBorderRightColor()
getBorderRightColor
in interface IBoxPainter
public java.awt.Insets getBorderStyles()
getBorderStyles
in interface IBoxPainter
public com.inet.html.parser.converter.ColorValue getBorderTopColor()
getBorderTopColor
in interface IBoxPainter
public int getBottomBorderPadding()
getBottomBorderPadding
in interface IBoxPainter
public int getLeftBorderPadding()
getLeftBorderPadding
in interface IBoxPainter
public java.awt.Insets getMargins()
getMargins
in interface IBoxPainter
public java.awt.Insets getPadding()
getPadding
in interface IBoxPainter
public int getRightBorderPadding()
getRightBorderPadding
in interface IBoxPainter
public int getTopBorderPadding()
getTopBorderPadding
in interface IBoxPainter
public int getTotalHeightGain()
getTotalHeightGain
in interface IBoxPainter
public int getTotalLeftGain()
getTotalLeftGain
in interface IBoxPainter
public int getTotalTopGain()
getTotalTopGain
in interface IBoxPainter
public int getTotalWidthGain()
getTotalWidthGain
in interface IBoxPainter
public BoxView getView()
getView
in interface IBoxPainter
public boolean isRelevant()
isRelevant
in interface IBackgroundPainter
isRelevant
in interface IBoxPainter
public void paint(java.awt.Graphics g, java.awt.Rectangle r, int paintMode, BoxView paintRef)
paint
in interface IBoxPainter
g
- the graphics to paint tor
- the area do draw topaintMode
- the paint mode constantpaintRef
- the coordinate reference for inline background imagesIBoxPainter.PAINT_MODE_NORMAL
,
IBoxPainter.PAINT_MODE_LEFTEDGE
,
IBoxPainter.PAINT_MODE_CENTER
,
IBoxPainter.PAINT_MODE_RIGHTEDGE
public void paint(java.awt.Graphics g, int x, int y, int width, int height, int paintMode, BoxView paintRef)
paint
in interface IBoxPainter
g
- the graphics to paint tox
- the x coordinate of the paint areay
- the y coordinate of the paint areawidth
- the width coordinate of the paint areaheight
- the height coordinate of the paint areapaintMode
- the paint mode constantpaintRef
- the coordinate reference for inline background imagesIBoxPainter.PAINT_MODE_NORMAL
,
IBoxPainter.PAINT_MODE_LEFTEDGE
,
IBoxPainter.PAINT_MODE_CENTER
,
IBoxPainter.PAINT_MODE_RIGHTEDGE
public void setBorderBottomColor(com.inet.html.parser.converter.ColorValue borderBottomColor)
setBorderBottomColor
in interface IBoxPainter
borderBottomColor
- the color of the bottom borderpublic void setBorderLeftColor(com.inet.html.parser.converter.ColorValue borderLeftColor)
setBorderLeftColor
in interface IBoxPainter
borderLeftColor
- color of the left borderpublic void setBorderRightColor(com.inet.html.parser.converter.ColorValue borderRightColor)
setBorderRightColor
in interface IBoxPainter
borderRightColor
- color of the right borderpublic void setBorderTopColor(com.inet.html.parser.converter.ColorValue borderTopColor)
setBorderTopColor
in interface IBoxPainter
borderTopColor
- color of the top borderpublic void updateRelativeValues(int parentWidth)
updateRelativeValues
in interface IBoxPainter
parentWidth
- The width of the parent viewpublic void updateRelevance()
updateRelevance
in interface IBoxPainter
public com.inet.html.parser.converter.ColorValue getBackgroundValue()
getBackgroundValue
in interface IBackgroundPainter
public javax.swing.text.Element getElement()
getElement
in interface IBackgroundPainter
public java.awt.Rectangle getLastPaint()
getLastPaint
in interface IBackgroundPainter
public BoxView getReferenceView()
getReferenceView
in interface IBackgroundPainter
public boolean isInitDone()
isInitDone
in interface IBackgroundPainter
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 void setBackgroundValue(com.inet.html.parser.converter.ColorValue backgroundValue)
setBackgroundValue
in interface IBackgroundPainter
backgroundValue
- the background color of this painter, may be nullpublic void setInitDone()
setInitDone
in interface IBackgroundPainter
public void setLastPaint(java.awt.Rectangle lastPaint)
setLastPaint
in interface IBackgroundPainter
lastPaint
- the coordinates of the last paint operationpublic void setReferenceView(BoxView view)
setReferenceView
in interface IBackgroundPainter
view
- the coordinate root for this painterpublic void setBorderInsets(java.awt.Insets borderInsets)
setBorderInsets
in interface IBoxPainter
borderInsets
- the border insetspublic void setBorderStyles(java.awt.Insets borderStyles)
setBorderStyles
in interface IBoxPainter
borderStyles
- the border stylespublic void setMargins(java.awt.Insets margins)
setMargins
in interface IBoxPainter
margins
- the margin insetspublic void setPadding(java.awt.Insets padding)
setPadding
in interface IBoxPainter
padding
- the padding insetspublic java.awt.Insets setBorderInsets()
setBorderInsets
in interface IBoxPainter
public java.awt.Insets setBorderStyles()
setBorderStyles
in interface IBoxPainter
public java.awt.Insets setMargins()
setMargins
in interface IBoxPainter
public java.awt.Insets setPadding()
setPadding
in interface IBoxPainter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |