|
|||||||||
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.Panel
java.applet.Applet
buildnet.applets.gui.DeviceApplet
Applet used to control Buildnet WCM device. Applets is configured through PARAMs to control one specific device. Depending on device type some kind of GUI is created, which shows device state (if appropriate) and allows to control the device (if appropriate).
The applet contains also a set of public methods for Javascript use. These methods allow to read device states and control it. The applet contains methods for all types of devices, but only those for configured device (through PARAMs) can be use.
Methods unavailable for this type of device throw java.lang.ClassCastException. See method descriptions for allowed device types.
If device method is called, but the applet could not connect to device, java.lang.NullPointerException is thrown, as the device does not exist.
Supported devices are:
Nested Class Summary |
Nested classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DeviceApplet()
|
Method Summary | |
boolean |
airconditionIsWorking()
aircondition: get working status |
void |
brighter()
light: start dimming light to get brighter. |
protected abstract DeviceProxy |
createDeviceProxy()
Factory method to create BN Proxy |
void |
darker()
light: start dimming light to get darker. |
boolean |
diginIsOn()
digin: returns state of a digin device |
java.lang.String |
getAirconditionMode()
aircondition: get operating mode |
int |
getBrightness()
light: get light brightness |
int |
getCurrentTemperature()
aircondition: get current temperature |
java.lang.String |
getDeviceName()
Returns name of this device (same name as configured by applet params). |
int |
getWantedTemperature()
aircondition: get wanted temperature |
void |
init()
Initializes the applet BuildNetApplet |
boolean |
isAlarmOn()
firealarm: get state of fire alarm |
void |
playFile(java.lang.String filename)
infrared: play infrared signal |
void |
setAirconditionMode(java.lang.String mode)
aircondition: set operating mode |
void |
setBrightness(int brightness)
light: set light brightness |
void |
setWantedTemperature(int wantedTemperature)
aircondition: set wanted temperature |
void |
showStatus(java.lang.String str)
|
void |
start()
|
void |
stop()
|
void |
stopDimming()
light: stop dimming light. |
boolean |
switchIsOn()
switch: returns switch state (DIGOUT) |
void |
switchOff()
switch: switch set to off (DIGOUT set to 0) |
void |
switchOn()
switch: switch set to on(DIGOUT set to 1) |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DeviceApplet()
Method Detail |
public void init()
protected abstract DeviceProxy createDeviceProxy()
public void stop()
public void start()
public void showStatus(java.lang.String str)
public java.lang.String getDeviceName()
param description for list of names and device numbers
public boolean switchIsOn()
public void switchOff()
public void switchOn()
public boolean diginIsOn()
public int getBrightness()
public void setBrightness(int brightness)
brightness
- as percentage (0-100)public void brighter()
public void darker()
public void stopDimming()
public boolean isAlarmOn()
public void playFile(java.lang.String filename)
filename
- contains name of file with IR signal (from the IR directory
on the WCM, 8 characters, without the required .IR extension)public int getCurrentTemperature()
public int getWantedTemperature()
public void setWantedTemperature(int wantedTemperature)
public java.lang.String getAirconditionMode()
public void setAirconditionMode(java.lang.String mode)
mode
- as string: on/off/autopublic boolean airconditionIsWorking()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |