|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openuat.channel.oob.ButtonChannelImpl
org.openuat.channel.oob.AWTButtonChannelImpl
public class AWTButtonChannelImpl
This is an AWT specific implementation of
the ButtonChannelImpl class.
Special care must be taken to handle fake key events from the OS when
a key is held down. Key press (and release) events MAY be fired by the OS
at the systems (variable) keyboard repeat rate.
| User: | Key press | Hold the key | Key release |
| Windows: | Key press event | Key press events at systems keyboard repeat rate | Key release event |
| Linux: | Key press event | Key release/key press event pairs (in that order, with identical timestamps) at systems keyboard repeat rate | Key release event |
| Linux (modifier keys): | Key press event | No events | Key release event |
| Field Summary | |
|---|---|
protected javax.swing.JButton |
abortButton
A button that allows the user to abort the current processing (capture or transmit). |
protected int |
buttonKey
The keyboard key which is used as the button for user input. |
protected java.lang.String |
currentText
Text content which will be displayed in the textComponent
gui element. |
protected java.awt.Font |
defaultFont
Default font when displaying text. |
protected java.awt.Component |
paintableComponent
A gui component that paints to the screen. |
protected java.awt.Container |
parent
The parent gui component. |
protected javax.swing.JTextPane |
textComponent
A gui component that displays text. |
| Fields inherited from class org.openuat.channel.oob.ButtonChannelImpl |
|---|
intervalList, logger, prepareSignal, progress, showCount, showSignal, signalCount, transmissionMode, TRANSMIT_BAR, TRANSMIT_PLAIN, TRANSMIT_SIGNAL, TRANSMIT_TRAFFIC_LIGHT, TRANSMIT_VERT_BARS |
| Constructor Summary | |
|---|---|
AWTButtonChannelImpl(java.awt.Container parentComponent,
java.awt.event.ActionListener abortHandler)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
repaint()
Repaints the currently displayed gui element. |
void |
showCaptureGui(java.lang.String text,
ButtonInputHandler inputHandler)
Starts the capturing process by launching a gui element that listens to button inputs. |
void |
showTransmitGui(java.lang.String text,
int type)
Starts the transmitting process. |
void |
vibrate(int milliseconds)
Vibrates for milliseconds ms. |
| Methods inherited from class org.openuat.channel.oob.ButtonChannelImpl |
|---|
setInterval, setPrepareSignal, setProgress, setShowCount, setSignal, setSignalCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Container parent
protected java.awt.Component paintableComponent
repaint method.
protected javax.swing.JTextPane textComponent
repaint
method is called, its content will be updated with the current
signalCount
protected java.lang.String currentText
textComponent
gui element.
protected javax.swing.JButton abortButton
protected java.awt.Font defaultFont
protected int buttonKey
| Constructor Detail |
|---|
public AWTButtonChannelImpl(java.awt.Container parentComponent,
java.awt.event.ActionListener abortHandler)
parentComponent - The parent gui element which will hold gui elements
created by this class.abortHandler - An action listener which will be called when the user
aborts the current transmission or capture process.| Method Detail |
|---|
public void repaint()
ButtonChannelImpl
repaint in class ButtonChannelImpl
public void showCaptureGui(java.lang.String text,
ButtonInputHandler inputHandler)
ButtonChannelImpltext should be an instructive
and/or informative text that helps the user to perform his task.
showCaptureGui in class ButtonChannelImpltext - Is displayed on screen while capturing.inputHandler - Button inputs are delegated to inputHandler.
public void showTransmitGui(java.lang.String text,
int type)
ButtonChannelImpl
showTransmitGui in class ButtonChannelImpltext - Is displayed on screen before transmitting starts.type - Defines the transmission type.public void vibrate(int milliseconds)
ButtonChannelImplmilliseconds ms.
vibrate in class ButtonChannelImplmilliseconds - The vibration duration.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||