org.wcb.autohome
Class MacroTriggerPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.wcb.autohome.MacroTriggerPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, RefreshInterface, java.io.Serializable, javax.swing.SwingConstants, X10DeviceConstants

public class MacroTriggerPanel
extends javax.swing.JPanel
implements RefreshInterface, javax.swing.SwingConstants, X10DeviceConstants

Filename: $Id: MacroTriggerPanel.java,v 1.20 2004/07/22 03:06:49 wbogaardt Exp $ Abstract: This class renders the trigger panel where you can add or modify a particular macro trigger. That is the user specifies the triggers whether they are event based such as a light being turned on to trigger a particular macro to execute or if the trigger is time based instaniating a macro to excecute at a particular time and date. See the Macro Sequence Panel in reference to having an assigned macro fire off a number of actions such as turning on all lights and appliances in area A or B.

Author:
wbogaardt
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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 javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface org.wcb.autohome.interfaces.X10DeviceConstants
APPLIANCE_MODULE_OFF, APPLIANCE_MODULE_ON, BAUD, BAUD_RATE_ARRAY, BRIGHT_ACTION, BROWSER, CM11A_TRANSMITTER, CM17A_TRANSMITTER, CONNECT_ON_START, COUNTRY, DATA_BIT, DATA_BITS_ARRAY, DEVICE_ARRAY, DIM_ACTION, EMAIL_AUTHORIZE, EMAIL_FREQUENCY, EMAIL_FROM, EMAIL_PASSWORD, EMAIL_SMTP, EMAIL_TO, EMAIL_USERNAME, FALSE, HOUSE_CODES_ARRAY, INTERFACE_TYPE, LAMP_MODULE_OFF, LAMP_MODULE_ON, LANGUAGE, LAST_FILE, LOCALHOST, LOOK_AND_FEEL, MAC, METAL, MOTIF, OFF_ACTION, ON_ACTION, PARITY, PARITY_ARRAY, RECOVER_CM11A, RMI_HOST, SEPARATOR, SERIAL_PORT, SPEECH_ENGINE, STOP_BIT, STOP_BITS_ARRAY, TEST_TRANSMITTER, TIMER_EVENT, TRIGGER_EVENT, TRUE, USER_HOME, WINDOWS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MacroTriggerPanel()
          This creates the macro trigger panel component for the swing application.
 
Method Summary
 void addMacro()
          add a new macro to the macro table
 void addTriggerID(javax.swing.JComboBox comboBox)
          Builds a trigger ICON for the trigger combo box.
 void deleteMacroRow()
          This deletes the table row from the table model.
 RefreshInterface getInterface()
          This returns an instance of the MessageInterface that is used in this class to control the various messages.
 void loadTriggers()
          loads the Macro Events from the AutoHomeAdminSession object That call in turn calls DeviceFactory which handles calling the file system and loading the macros into it.
 void refresh()
          Allows the items to refresh across multiple objects and in this case the GUI.
 void saveTriggers()
          Save the entire table model into a properties The format for the key is Macro.A21=TM,12:15/20:30,description,SMTWTFS,Macro1 for timer trigger events and for Trigger events it is Macro.A21=EV,A1,description,Off,Macro2
 void setModel(java.util.Vector tableData)
          takes a table vector and puts it into the table model format then refreshes the UI to display the new table information.
 void updateMacroRow()
          Updates the currently selected row from the details panel information.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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

MacroTriggerPanel

public MacroTriggerPanel()
This creates the macro trigger panel component for the swing application.

Method Detail

getInterface

public RefreshInterface getInterface()
This returns an instance of the MessageInterface that is used in this class to control the various messages.

Returns:
The interface refres to this class.

refresh

public void refresh()
Allows the items to refresh across multiple objects and in this case the GUI.

Specified by:
refresh in interface RefreshInterface

setModel

public void setModel(java.util.Vector tableData)
takes a table vector and puts it into the table model format then refreshes the UI to display the new table information.

Parameters:
tableData - data to load to the table view.

addTriggerID

public void addTriggerID(javax.swing.JComboBox comboBox)
Builds a trigger ICON for the trigger combo box.


loadTriggers

public void loadTriggers()
loads the Macro Events from the AutoHomeAdminSession object That call in turn calls DeviceFactory which handles calling the file system and loading the macros into it.


addMacro

public void addMacro()
add a new macro to the macro table


deleteMacroRow

public void deleteMacroRow()
This deletes the table row from the table model. It should also delete the item from the memory properties hash so that it doesn't get saved into the file when the user hits save file. This is done at the DeviceFactory object.


updateMacroRow

public void updateMacroRow()
Updates the currently selected row from the details panel information.


saveTriggers

public void saveTriggers()
Save the entire table model into a properties The format for the key is Macro.A21=TM,12:15/20:30,description,SMTWTFS,Macro1 for timer trigger events and for Trigger events it is Macro.A21=EV,A1,description,Off,Macro2



Copyright © 1999-2004 Walter Bogaardt. All Rights Reserved.