public class RepeatButton extends Button implements ThirdEventThread.ThirdEventWidget
Notes:
RepeatButton.RepeatButtonListener to send the button
events,| Modifier and Type | Class and Description |
|---|---|
static interface |
RepeatButton.RepeatButtonListener
Interface that handle repeat button press events.
|
static class |
RepeatButton.RepeatButtonListenerToButtonEvents
Default implementation of
RepeatButton.RepeatButtonListener. |
Button.ButtonListener, Button.ButtonListenerToButtonEventsWidget.WidgetAttribute, Widget.WidgetDescriptionMouseListener.MouseButtonDEFAULT_LABEL| Constructor and Description |
|---|
RepeatButton()
Creates a repeat button widget.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the widget's associated resources (such as threads, images...).
|
int |
getSleepPeriod()
Gets the sleep period the thread has to wait before asking to send third event.
|
protected 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(String listenerClassName)
Defines the user class which has to implement
Button.ButtonListener. |
void |
setRepeatPeriod(int period)
Sets the repeat event period.
|
void |
start()
Starts the widget.
|
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, showYourselfclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMovedpublic RepeatButton()
The default repeat period is 200ms.
public void dispose()
WidgetDefault behavior disposes the common images and subclasses should override this method to define their own behavior.
This method should only be called by front panel engine.
public int getSleepPeriod()
ThirdEventThread.ThirdEventWidgetgetSleepPeriod in interface ThirdEventThread.ThirdEventWidgetprotected Object newDefaultListener()
WidgetWithListenernewDefaultListener in class Buttonprotected void press()
Buttonprotected void release()
Buttonpublic void sendThirdEvent()
ThirdEventThread.ThirdEventWidgetsendThirdEvent in interface ThirdEventThread.ThirdEventWidgetpublic void setListenerClass(String listenerClassName)
ButtonButton.ButtonListener.
This method should only be called by front panel parser.
setListenerClass in class ButtonlistenerClassName - user listener class name.public void setRepeatPeriod(int period)
This method should only be called by front panel parser.
period - a time in milliseconds.public void start()
WidgetWidget.finalizeConfiguration()).
Main implementation does nothing.
This method should only be called by front panel engine.