superwaba.ext.xplat.html.ui
Class Button
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Button
|
+--superwaba.ext.xplat.html.ui.Button
- Direct Known Subclasses:
- Reset, Submit
- public class Button
- extends Button
- implements Controllable
Button extends the Waba Button control
and implements it as a Controllable
| Fields inherited from class waba.ui.Button |
aColor,
armed,
border,
BORDER_3D,
BORDER_NONE,
BORDER_SIMPLE,
commonGap,
cutText,
fColor,
fourColors,
gap,
hh,
ignoreEvents,
img,
imgColor,
isText,
myg,
text,
ww |
| Fields inherited from class waba.ui.Control |
AFTER,
appId,
appObj,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
clearValueInt,
clearValueStr,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
focusTraversable,
font,
foreColor,
foreDis,
height,
highlightRectsCount,
isHighlighting,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
uiCE,
uiFlat,
uiPalm,
uiVista,
visible,
width,
x,
x2,
y,
y2 |
|
Constructor Summary |
Button(java.lang.String name,
java.lang.String text)
Constructor |
|
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 |
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 |
paintButton(Graphics g)
|
void |
repaint()
Marks the control for repaint. |
void |
reset()
Resets the control to its original default value. |
void |
setHtmlContainer(HtmlContainer htmlCnr)
Set the Html HtmlContainer associated to this Controllable |
| Methods inherited from class waba.ui.Button |
createArrowButton,
getImage,
getText,
onBoundsChanged,
onColorsChanged,
onEvent,
onFontChanged,
onlyShowImage,
paintButton,
press,
setBorder,
setGap,
setImage,
setPressedColor,
setText,
simulatePress |
| Methods inherited from class waba.ui.Control |
addTimer,
changeHighlighted,
clear,
contains,
createGraphics,
drawHighlight,
getAbsoluteRect,
getBackColor,
getFont,
getFontMetrics,
getForeColor,
getNext,
getParent,
getParentWindow,
getPos,
getRect,
getSize,
isDisplayed,
isEnabled,
isVisible,
onWindowPaintFinished,
postEvent,
removeTimer,
repaintNow,
requestFocus,
setBackColor,
setBackForeColors,
setEnabled,
setFocusLess,
setFont,
setForeColor,
setRect,
setRect,
setRect,
setVisible,
translateFromOrigin,
uiStyleChanged |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
htmlCnr
protected HtmlContainer htmlCnr
Button
public Button(java.lang.String name,
java.lang.String text)
- Constructor
- Parameters:
name - Name of this Controllabletext - string to be displayed in this Button.
setHtmlContainer
public void setHtmlContainer(HtmlContainer htmlCnr)
- Description copied from interface: Controllable
- Set the Html HtmlContainer associated to this Controllable
- Specified by:
- setHtmlContainer in interface Controllable
- Tags copied from interface: Controllable
- Parameters:
htmlCnr - the HtmlContainer associated to this Controllable
getFocus
public void getFocus()
- Description copied from interface: Controllable
- Make this controllable gets the focus
- Specified by:
- getFocus in interface Controllable
getPreferredWidth
public int getPreferredWidth()
- Description copied from interface: Controllable
- Get the width of this Controllable
- Specified by:
- getPreferredWidth in interface Controllable
- Overrides:
- getPreferredWidth in class Button
- Tags copied from interface: Controllable
- Returns:
- the width of this Controllable
getPreferredHeight
public int getPreferredHeight()
- Description copied from interface: Controllable
- Get the height of this Controllable
- Specified by:
- getPreferredHeight in interface Controllable
- Overrides:
- getPreferredHeight in class Button
- Tags copied from interface: Controllable
- Returns:
- the height of this Controllable
getName
public java.lang.String getName()
- Description copied from interface: Controllable
- Get the name of this Controllable
- Specified by:
- getName in interface Controllable
- Tags copied from interface: Controllable
- Returns:
- the name of this Controllable
getValue
public java.lang.String getValue()
- Description copied from interface: Controllable
- Get the value hold by this Controllable
- Specified by:
- getValue in interface Controllable
- Tags copied from interface: Controllable
- Returns:
- the value hold by this Controllable
paintButton
public void paintButton(Graphics g)
onPaint
public void onPaint(Graphics g)
- Description copied from interface: Controllable
- 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.
- Specified by:
- onPaint in interface Controllable
- Overrides:
- onPaint in class Button
- Tags copied from interface: Controllable
- Parameters:
g - the graphics object for drawing
repaint
public void repaint()
- Description copied from class: Control
- Marks the control for repaint. Important note: when you call repaint, the absolute
area of the control regarding its parent Window is invalidated (marked
for repaint); then, the next time a event (a keypress, a timer, a pen event)
occurs, the screen is updated. If you call repaint and the control isn't
effectively repainted, you have 2 choices: call Window._doPaint(), or,
use Control.repaintNow.
- Overrides:
- repaint in class Control
reset
public void reset()
- Description copied from interface: Controllable
- Resets the control to its original default value.
- Specified by:
- reset in interface Controllable