public class LongButton extends Button implements ThirdEventThread.ThirdEventWidget
Notes:
LongButton.LongButtonListener to send the button events,| Modifier and Type | Class and Description |
|---|---|
static interface |
LongButton.LongButtonListener
Interface that handle long button press events.
|
static class |
LongButton.LongButtonListenerToButtonEvents
Default implementation of
LongButton.LongButtonListener. |
Button.ButtonListener, Button.ButtonListenerToButtonEvents| Constructor and Description |
|---|
LongButton()
Creates a long button widget.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
int |
getSleepPeriod()
Gets the sleep period the thread has to wait before asking to send third event.
|
protected java.lang.Object |
newDefaultListener()
Lets subclass creates a default listener.
|
protected void |
press()
Default implementation of press action: update the skin and ask to the listener to manage the event.
|
protected void |
release()
Default implementation of release action: update the skin and ask to the listener to manage the event.
|
void |
sendThirdEvent()
Asks to send the third event.
|
void |
setListenerClass(java.lang.String listenerClassName)
Defines the user class which has to implement
Button.ButtonListener. |
void |
setLongPeriod(int longPeriod)
Set the long event period.
|
void |
start() |
getID, getListener, getPushedSkin, mousePressed, mouseReleased, setLabel, setPushedSkinnewListener, setListenerClassfinalizeConfiguration, getAbsoluteX, getAbsoluteY, getCurrentSkin, getFilter, getHeight, getLabel, getParent, getSkin, getWidth, getX, getY, isOver, repaint, repaint, setCurrentSkin, setFilter, setHeight, setOverlay, setSkin, setWidth, setX, setY, showYourselfpublic LongButton()
The default long period is 500ms.
public void setLongPeriod(int longPeriod)
This method should only be called by front panel parser.
longPeriod - a time in milliseconds.public void setListenerClass(java.lang.String listenerClassName)
ButtonButton.ButtonListener.
This method should only be called by front panel parser.
setListenerClass in class ButtonlistenerClassName - user listener class name.protected java.lang.Object newDefaultListener()
WidgetWithListenernewDefaultListener in class Buttonpublic void sendThirdEvent()
ThirdEventThread.ThirdEventWidgetsendThirdEvent in interface ThirdEventThread.ThirdEventWidgetpublic int getSleepPeriod()
ThirdEventThread.ThirdEventWidgetgetSleepPeriod in interface ThirdEventThread.ThirdEventWidgetprotected void press()
Button