|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kalmeo.kuix.widget.Widget
org.kalmeo.kuix.widget.FocusableWidget
public class FocusableWidget
This class is base for all focusable widgets.
For further informations, visit the Kuix widgets reference page.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.kalmeo.kuix.widget.Widget |
---|
Widget.BindInstruction |
Field Summary | |
---|---|
static java.lang.String |
DISABLED_PSEUDO_CLASS
|
protected boolean |
enabled
|
protected boolean |
focusable
|
protected boolean |
focused
|
static java.lang.String |
HOVER_PSEUDO_CLASS
|
protected static java.lang.String[] |
PSEUDO_CLASSES
|
Fields inherited from class org.kalmeo.kuix.widget.Widget |
---|
bindInstructions, DEFAULT_ALIGN, DEFAULT_BACKGROUND_ALIGN, DEFAULT_BACKGROUND_REPEAT, DEFAULT_BORDER, DEFAULT_GAP, DEFAULT_MARGIN, DEFAULT_MIN_SIZE, DEFAULT_PADDING, DEFAULT_SPAN, DEFAULT_WEIGHT, next, parent, previous |
Constructor Summary | |
---|---|
FocusableWidget()
Construct a FocusableWidget |
|
FocusableWidget(java.lang.String tag)
Construct a FocusableWidget |
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of the specified attribute |
java.lang.String[] |
getAvailablePseudoClasses()
Retuns the list of available pseudo classes. |
java.lang.String |
getOnFocus()
|
java.lang.String |
getOnLostFocus()
|
void |
giveFocusToNearestWidget()
Give the focus to the nearest focusable widget. |
boolean |
isEnabled()
|
boolean |
isFocusable()
Check if this Widget is focusable. |
boolean |
isFocused()
Check if this Widget is focused. |
boolean |
isPseudoClassCompatible(java.lang.String pseudoClass)
|
protected void |
onAdded(Widget parent)
Event called when the widjet is added to parent . |
boolean |
processFocusEvent(byte type)
Process a focus event |
boolean |
processPointerEvent(byte type,
int x,
int y)
Process a pointer event |
void |
remove()
Remove the current Widget from its parent. |
void |
requestFocus()
Requests the focus of this Widget . |
boolean |
setAttribute(java.lang.String name,
java.lang.String value)
Set the value to the specified attribute representing by
the name |
void |
setEnabled(boolean enabled)
|
void |
setFocusable(boolean focusable)
|
void |
setOnFocus(java.lang.String onFocus)
|
void |
setOnLostFocus(java.lang.String onLostFocus)
|
void |
setVisible(boolean visible)
Set the widget's visibility state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HOVER_PSEUDO_CLASS
public static final java.lang.String DISABLED_PSEUDO_CLASS
protected static final java.lang.String[] PSEUDO_CLASSES
protected boolean focusable
protected boolean focused
protected boolean enabled
Constructor Detail |
---|
public FocusableWidget()
FocusableWidget
public FocusableWidget(java.lang.String tag)
FocusableWidget
tag
- Method Detail |
---|
public boolean setAttribute(java.lang.String name, java.lang.String value)
Widget
value
to the specified attribute representing by
the name
setAttribute
in class Widget
true
if the attribute existspublic java.lang.Object getAttribute(java.lang.String name)
Widget
getAttribute
in class Widget
public void setFocusable(boolean focusable)
focusable
- the focusable to setpublic boolean isFocusable()
Widget
Widget
is focusable.
isFocusable
in class Widget
true
if the widget is focusablepublic boolean isFocused()
Widget
Widget
is focused.
isFocused
in class Widget
true
is the widget is focusedpublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- the enabled to setpublic void setVisible(boolean visible)
Widget
setVisible
in class Widget
visible
- the visible to setpublic java.lang.String getOnFocus()
public void setOnFocus(java.lang.String onFocus)
onFocus
- the onFocus to setpublic java.lang.String getOnLostFocus()
public void setOnLostFocus(java.lang.String onLostFocus)
onLostFocus
- the onLostFocus to setpublic java.lang.String[] getAvailablePseudoClasses()
Widget
hover
,
selected
, ...).
getAvailablePseudoClasses
in class Widget
public boolean isPseudoClassCompatible(java.lang.String pseudoClass)
isPseudoClassCompatible
in class Widget
true
if this widget is compatible with peudo classpublic void giveFocusToNearestWidget()
public void remove()
Widget
Widget
from its parent.
remove
in class Widget
public void requestFocus()
Widget
Widget
.
requestFocus
in class Widget
public boolean processFocusEvent(byte type)
Widget
processFocusEvent
in class Widget
true
if the event is treated by the widgetpublic boolean processPointerEvent(byte type, int x, int y)
Widget
processPointerEvent
in class Widget
true
if the event is treated by the widgetprotected void onAdded(Widget parent)
Widget
widjet
is added to parent
.
onAdded
in class Widget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |