jhomenet.gui.responsive
Class PlanEditor

java.lang.Object
  extended by jhomenet.gui.AbstractWindow
      extended by jhomenet.gui.AbstractEditor
          extended by jhomenet.gui.responsive.PlanEditor
All Implemented Interfaces:
java.util.EventListener, PlanListener

public class PlanEditor
extends AbstractEditor
implements PlanListener

This editor is used to edit sensor response plans.
ID: $Id$

Author:
David Irwin

Field Summary
 
Fields inherited from class jhomenet.gui.AbstractEditor
cancel_b, commit_b, isInitialized, lock
 
Fields inherited from class jhomenet.gui.AbstractWindow
internalFrame
 
Constructor Summary
PlanEditor()
          Default constructor.
 
Method Summary
protected  javax.swing.JPanel buildMainPanel()
          Used to build the panel editor panel.
protected  WindowStatusBar buildStatusBar()
          Build and add the status bar to the Plan editor window.
protected  void commitButtonClicked()
           
 void expressionUpdated()
          A plan's expression has been updated.
 java.lang.String getIdentifier()
          Get the window identifier.
 java.lang.String getTitle()
          Get the plan editor window title.
 void loadObject(java.lang.Object obj)
          Load an model into the editor.
 void onFalseResponseListUpdated()
          A plan's list of on-false responses has been updated.
 void onTrueResponseListUpdated()
          A plan's list of responses has been updated.
protected  void resetGUI()
          Reset the GUI.
 void responseUpdated()
          A response in the list of responses has been updated.
 
Methods inherited from class jhomenet.gui.AbstractEditor
buildButtonPanel, buildGUI, initializationComplete, waitForInitialization
 
Methods inherited from class jhomenet.gui.AbstractWindow
addChildWindow, closeWindow, createAsInternalFrame, createAsInternalFrame, getDesiredLocation, getPanel, getWindowDimension, setPanel, startWork, startWork, stopWork, stopWork, windowClosing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanEditor

public PlanEditor()
Default constructor.

Method Detail

getIdentifier

public java.lang.String getIdentifier()
Description copied from class: AbstractWindow
Get the window identifier. This identifier is used as the control in not allowing multiple windows of the same type to be opened. For example, two services status window should not allowed to be opened. In general, the system will not create another window if the identifier is already in the current list.

Specified by:
getIdentifier in class AbstractWindow
Returns:
The window's identifier
See Also:
AbstractWindow.getIdentifier()

getTitle

public java.lang.String getTitle()
Get the plan editor window title.

Specified by:
getTitle in class AbstractWindow
Returns:
The frame title
See Also:
AbstractWindow.getTitle()

buildStatusBar

protected WindowStatusBar buildStatusBar()
Build and add the status bar to the Plan editor window.

Overrides:
buildStatusBar in class AbstractWindow
Returns:
A status bar panel
See Also:
AbstractWindow.buildStatusBar()

buildMainPanel

protected javax.swing.JPanel buildMainPanel()
Description copied from class: AbstractEditor
Used to build the panel editor panel.

Specified by:
buildMainPanel in class AbstractEditor
Returns:
A reference to the newly created main panel
See Also:
AbstractEditor.buildMainPanel()

resetGUI

protected void resetGUI()
Description copied from class: AbstractWindow
Reset the GUI.

Specified by:
resetGUI in class AbstractWindow
See Also:
AbstractWindow.resetGUI()

commitButtonClicked

protected void commitButtonClicked()
Specified by:
commitButtonClicked in class AbstractEditor
See Also:
AbstractEditor.commitButtonClicked()

loadObject

public void loadObject(java.lang.Object obj)
Description copied from class: AbstractEditor
Load an model into the editor.

Specified by:
loadObject in class AbstractEditor
See Also:
AbstractEditor.loadObject(Object)

expressionUpdated

public void expressionUpdated()
A plan's expression has been updated. Replace the existing expression with the newly updated expression.

Specified by:
expressionUpdated in interface PlanListener
See Also:
PlanListener.expressionUpdated()

onTrueResponseListUpdated

public void onTrueResponseListUpdated()
A plan's list of responses has been updated. TODO: This method is implemented rather poorly. When an update is requested, all the list elements are removed and then are added back again from the plan. Can we cache this better to be more efficient?

Specified by:
onTrueResponseListUpdated in interface PlanListener
See Also:
PlanListener.onTrueResponseListUpdated()

onFalseResponseListUpdated

public void onFalseResponseListUpdated()
A plan's list of on-false responses has been updated. TODO: This method is implemented rather poorly. When an update is requested, all the list elements are removed and then are added back again from the plan. Can we cache this better to be more efficient?

Specified by:
onFalseResponseListUpdated in interface PlanListener
See Also:
PlanListener.onFalseResponseListUpdated()

responseUpdated

public void responseUpdated()
Description copied from interface: PlanListener
A response in the list of responses has been updated.

Specified by:
responseUpdated in interface PlanListener
See Also:
PlanListener.responseUpdated()


Copyright © 2004-2005 David Irwin. All Rights Reserved.