ice.pilots.html4
Interface ObjectPainter

All Known Subinterfaces:
DSelectElement.SelectPainter
All Known Implementing Classes:
EmbeddedObject

public interface ObjectPainter


Method Summary
 void dispose()
           
 void draw(Graphics g)
           
 ObjectBox getBox()
           
 int getClientHeight()
          Retrieve the height of the client area within the painter.
 int getClientWidth()
          Retrieve the width of the client area within the painter.
 int getPrefHeight()
           
 int getPrefWidth()
           
 void onElementAttrChange(DElement elem, DAttr attr)
           
 void setBackground(Color c)
           
 void setBorderVisible(boolean aDrawBorder)
          Allows CSS control over whether the object implementing ObjectPainter draws its own border.
 void setBox(ObjectBox b)
           
 void setFontHints(CSSAttribs css)
          Allow the ObjectBox to instruct the FormWidgets about the initial font to use.
 void setForeground(Color c)
           
 void setPainterSize(int w, int h)
           
 

Method Detail

setPainterSize

public void setPainterSize(int w,
                           int h)

getPrefWidth

public int getPrefWidth()

getPrefHeight

public int getPrefHeight()

draw

public void draw(Graphics g)

setBox

public void setBox(ObjectBox b)

getBox

public ObjectBox getBox()

dispose

public void dispose()

setBackground

public void setBackground(Color c)

setForeground

public void setForeground(Color c)

onElementAttrChange

public void onElementAttrChange(DElement elem,
                                DAttr attr)

setBorderVisible

public void setBorderVisible(boolean aDrawBorder)
Allows CSS control over whether the object implementing ObjectPainter draws its own border.

Parameters:
aDrawBorder - false if the underlying widget is NOT to draw its own border.

setFontHints

public void setFontHints(CSSAttribs css)
Allow the ObjectBox to instruct the FormWidgets about the initial font to use. This method is called at a time when the CSSAttribs object is valid, yet only once on layout.


getClientHeight

public int getClientHeight()
Retrieve the height of the client area within the painter. For widgets that support this capability, this method will return the height of the client area of the widget. For ScrollPanes, this will be the height of the visible area, minus the horizontal scroll bar thickness, for AWT components, this will be some hack value approximating same, since the scroll components are not separately available.

Returns:
The visible client height in pixels
Since:
6.1

getClientWidth

public int getClientWidth()
Retrieve the width of the client area within the painter. For widgets that support this capability, this method will return the width of the client area of the widget. For ScrollPanes, this will be the width of the visible area, minus the vertical scroll bar width, for AWT components, this will be some hack value approximating same, since the scroll components are not separately available.

Returns:
The visible client width in pixels
Since:
6.1