superwaba.ext.xplat.html.ui
Interface Controllable

All Known Subinterfaces:
ControllableSelectable
All Known Implementing Classes:
Radio, MultiEdit, Check, Hidden, Button, Edit

public interface Controllable

Interface to graphic controls.


Method Summary
 void getFocus()
          Make this controllable gets the focus
 java.lang.String getName()
          Get the name of this Controllable
 int getPreferredHeight()
          Get the height of this Controllable
 int getPreferredWidth()
          Get the width of this Controllable
 java.lang.String getValue()
          Get the value hold by this Controllable
 void onEvent(Event event)
          Called to process key, pen, control and other posted events.
 void onPaint(Graphics g)
          When this method is called, the graphics object passed has been translated into the coordinate system of the control and the area behind the control has already been painted.
 void reset()
          Resets the control to its original default value.
 void setHtmlContainer(HtmlContainer htmlCnr)
          Set the Html HtmlContainer associated to this Controllable
 void setRect(Rect rect)
          Sets the control's position and size.
 

Method Detail

setHtmlContainer

public void setHtmlContainer(HtmlContainer htmlCnr)
Set the Html HtmlContainer associated to this Controllable
Parameters:
htmlCnr - the HtmlContainer associated to this Controllable

getFocus

public void getFocus()
Make this controllable gets the focus

getPreferredWidth

public int getPreferredWidth()
Get the width of this Controllable
Returns:
the width of this Controllable

getPreferredHeight

public int getPreferredHeight()
Get the height of this Controllable
Returns:
the height of this Controllable

getName

public java.lang.String getName()
Get the name of this Controllable
Returns:
the name of this Controllable

getValue

public java.lang.String getValue()
Get the value hold by this Controllable
Returns:
the value hold by this Controllable

onPaint

public void onPaint(Graphics g)
When this method is called, the graphics object passed has been translated into the coordinate system of the control and the area behind the control has already been painted. The background is painted by the top-level window control.
Parameters:
g - the graphics object for drawing

onEvent

public void onEvent(Event event)
Called to process key, pen, control and other posted events.
Parameters:
event - the event to process

setRect

public void setRect(Rect rect)
Sets the control's position and size.
Parameters:
rect - rectangular cooridantes to set

reset

public void reset()
Resets the control to its original default value.