|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
safehome.device.DeviceControlPanelAbstract
safehome.ControlPanel
class ControlPanel
This class is a simple implementation of the abstract
class
. All abstract methods are
implemented simply to show that each button is working well.
DeviceControlPanelAbstract
The control panel consists of three parts. It looks like this
LCD on the left-up shows the current status, which button is pressed, the system is in stay or away mode, and the system is ready or not. Two LEDs on the left-down indicate the system is armed or not and the system is power-on or off. The keypad on the right-side has 12 buttons, 0 ~ 9, *, #. The corresponding action occurs when a user presses each button.
DeviceControlPanelAbstract
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
(package private) static long |
serialVersionUID
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ControlPanel()
Constructs a control panel frame. |
Method Summary | |
---|---|
void |
button0()
Specifies the action which occurs when button 0 is pressed. |
void |
button1()
Specifies the action which occurs when button 1 is pressed. |
void |
button2()
Specifies the action which occurs when button 2 is pressed. |
void |
button3()
Specifies the action which occurs when button 3 is pressed. |
void |
button4()
Specifies the action which occurs when button 4 is pressed. |
void |
button5()
Specifies the action which occurs when button 5 is pressed. |
void |
button6()
Specifies the action which occurs when button 6 is pressed. |
void |
button7()
Specifies the action which occurs when button 7 is pressed. |
void |
button8()
Specifies the action which occurs when button 8 is pressed. |
void |
button9()
Specifies the action which occurs when button 9 is pressed. |
void |
buttonSharp()
Specifies the action which occurs when button # is pressed. |
void |
buttonStar()
Specifies the action which occurs when button * is pressed. |
Methods inherited from class safehome.device.DeviceControlPanelAbstract |
---|
actionPerformed, setArmedLED, setDisplayAway, setDisplayNotReady, setDisplayShortMessage1, setDisplayShortMessage2, setDisplayStay, setPoweredLED, setSecurityZoneNumber, showSensorTester |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
static final long serialVersionUID
Constructor Detail |
---|
public ControlPanel()
Pre-condition: None.
Post-condition: The control panel frame is ready. It is initially invisible.
DeviceControlPanelAbstract.DeviceControlPanelAbstract().
Method Detail |
---|
public void button1()
Key 1 pressed
On Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 1, power LED is turned on and the message is changed to
Key 1 pressed
On Button
button1
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button1()
public void button2()
Key 2 pressed
Off Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 2, all the LEDs are turned off, the status display is clear and the message is changed to
Key 2 pressed
Off Button
button2
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button2()
public void button3()
Key 3 pressed
Reset Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 3, the 'armed' LED is turned off, the status display is clear and the message is changed to
Key 3 pressed
Reset Button
button3
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button3()
public void button4()
Key 4 pressed
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 4 and the message is changed to
Key 4 pressed
button4
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button4()
public void button5()
Key 5 pressed
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 5 and the message is changed to
Key 5 pressed
button5
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button5()
public void button6()
Key 6 pressed
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 6 and the message is changed to
Key 6 pressed
button6
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button6()
public void button7()
Key 7 pressed
Away Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 7, 'armed' LED is turned on 'Away' status is shown on the display and the message is changed to
Key 7 pressed
Away Button
button7
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button7()
public void button8()
Key 8 pressed
Stay Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 8, 'armed' LED is turned on 'Stay' status is shown on the display and the message is changed to
Key 8 pressed
Stay Button
button8
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button8()
public void button9()
Key 9 pressed
Code Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 9, 'Not Ready' status is shown on the display and the message is changed to
Key 9 pressed
Code Button
button9
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button9()
public void buttonStar()
Key * pressed
Panic Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 10 and the message is changed to
Key * pressed
Panic Button
buttonStar
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.buttonStar()
public void button0()
Key 0 pressed
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 11 and the message is changed to
Key 0 pressed
button0
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.button0()
public void buttonSharp()
Key # pressed
Panic Button
Pre-condition: The control panel is ready and visible to the user.
Post-condition: Security zone number is changed to 12 and the message is changed to
Key # pressed
Panic Button
buttonSharp
in class DeviceControlPanelAbstract
DeviceControlPanelAbstract.buttonSharp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |