|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcontrol.ui.wombat.Component
jcontrol.ui.wombat.AbstractFocusComponent
public abstract class AbstractFocusComponent
Abstract superclass for components that can be controlled by the keyboard.
(C) DOMOLOGIC Home Automation GmbH 2005 - 2007
Field Summary |
---|
Fields inherited from interface jcontrol.ui.wombat.IFocusable |
---|
TRANSFER_FOCUS_BACKWARD, TRANSFER_FOCUS_FORWARD |
Fields inherited from interface jcontrol.ui.wombat.event.TouchListener |
---|
RESULT_ACCEPTED, RESULT_EXECUTED, RESULT_NONE |
Constructor Summary | |
---|---|
AbstractFocusComponent()
|
Method Summary | |
---|---|
ActionListener |
getActionListener()
Returns the ActionListener of this Component. |
abstract KeyEvent |
onKeyEvent(KeyEvent event)
This method is called when a keyboard action has been performed. |
abstract int |
onTouchEvent(TouchEvent event)
Every time a touch event is fired, this method will be called. |
boolean |
requestFocus()
Sets the focus to this Component. |
void |
setActionListener(ActionListener listener)
Add an ActionListener to the component. |
void |
setEnabled(boolean enabled)
Sets the enabled state of this component. |
void |
setVisible(boolean visible)
Turns the component visible or invisible. |
Methods inherited from class jcontrol.ui.wombat.Component |
---|
getFrame, isEnabled, isVisible, paint, repaint, repaintAll, safeExec, setBackgroundColor, setBounds, setDirty, setFont, setForegroundColor, setRedraw, setTransparentColor, unsafeExec, update |
Methods inherited from class java.lang.Object |
---|
equals, getClass, notifyAll, toString, wait |
Constructor Detail |
---|
public AbstractFocusComponent()
Method Detail |
---|
public ActionListener getActionListener()
getActionListener
in interface ActionProducer
public abstract KeyEvent onKeyEvent(KeyEvent event)
onKeyEvent
in interface KeyListener
event
- the event that contains information about the key.
null
if the KeyEvent has been consumed by the KeyListener,public abstract int onTouchEvent(TouchEvent event)
TouchListener
onTouchEvent
in interface TouchListener
event
- The touch event.
RESULT_ACCEPTED
if the TouchEvent has been consumed by the TouchListener,RESULT_EXECUTED
if the TouchEvent has been consumed by the TouchListener and some important action has been performed, e.g. an action event has been invoked,RESULT_NONE
if the TouchEvent should be passed on to the next TouchListener.public boolean requestFocus()
requestFocus
in interface IFocusable
public void setActionListener(ActionListener listener)
setActionListener
in interface ActionProducer
listener
- an ActionListenerpublic void setEnabled(boolean enabled)
setEnabled
in class Component
enabled
- the enabled state.public void setVisible(boolean visible)
setVisible
in class Component
visible
- the visible state to set.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |