cobaUI
Class COBAApplet

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byjavax.swing.JApplet
                      extended bycobaUI.COBAApplet
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable

public class COBAApplet
extends javax.swing.JApplet

COBAApplet is the COBA belief change graphical user interface. It uses classes in the revisionlogic package to carry out parallel change on a belief change scenario. It provides a menu bar for easy navigation and three screens: (1) the main belief change interface with the KB list, the revision list, and the contraction list, (2) the integrity constraints interface with the EB IC list and the CB IC list, and (3) the history of changes log for the KB, the EB IC, and the CB IC.

Author:
Daphne Liu, daphnel@sfu.ca
See Also:
Serialized Form

Nested Class Summary
(package private)  class COBAApplet.AddCBFileHandler
          An action listener for the "Append to Consistency-based IC" menu item under the file menu.
(package private)  class COBAApplet.AddContFileHandler
          An action listener for the "Append to Contractor" menu item under the file menu.
(package private)  class COBAApplet.AddEBFileHandler
          An action listener for the "Append to Entailment-based IC" menu item under the file menu.
(package private)  class COBAApplet.AddKBFileHandler
          An action listener for the "Append to KB" menu item under the file menu.
(package private)  class COBAApplet.AddRevFileHandler
          An action listener for the "Append to Revisor" menu item under the file menu.
(package private)  class COBAApplet.AlgoItemHandler
          An action listener for the search algorithm menu items under the settings menu.
(package private)  class COBAApplet.ChangeItemHandler
          An action listener for the change type menu items under the settings menu.
(package private)  class COBAApplet.ConsCheckHandler
          An action listener for the "Consistency Check" menu item under the settings menu.
(package private)  class COBAApplet.MergeItemHandler
          An action listener for the merge type menu items under the settings menu.
(package private)  class COBAApplet.NewCBFileHandler
          An action listener for the "New Consistency-based IC..." menu item under the file menu.
(package private)  class COBAApplet.NewContFileHandler
          An action listener for the "New Contractor..." menu item under the file menu.
(package private)  class COBAApplet.NewEBFileHandler
          An action listener for the "New Entailment-based IC..." menu item under the file menu.
(package private)  class COBAApplet.NewKBFileHandler
          An action listener for the "New KB..." menu item under the file menu.
(package private)  class COBAApplet.NewRevFileHandler
          An action listener for the "New Revisor..." menu item under the file menu.
(package private)  class COBAApplet.SaveAllHandler
          An action listener for the "Save All" menu item under the file menu.
(package private)  class COBAApplet.SaveAsCBHandler
          An action listener for the "Save CB IC As" menu item under the file menu.
(package private)  class COBAApplet.SaveAsCBHistHandler
          An action listener for the "Save CB IC History As" menu item under the file menu.
(package private)  class COBAApplet.SaveAsContHandler
          An action listener for the "Save Contractor As" menu item under the file menu.
(package private)  class COBAApplet.SaveAsEBHandler
          An action listener for the "Save EB IC As" menu item under the file menu.
(package private)  class COBAApplet.SaveAsEBHistHandler
          An action listener for the "Save EB IC History As" menu item under the file menu.
(package private)  class COBAApplet.SaveAsKBHandler
          An action listener for the "Save KB As" menu item under the file menu.
(package private)  class COBAApplet.SaveAsKBHistHandler
          An action listener for the "Save KB History As" menu item under the file menu.
(package private)  class COBAApplet.SaveAsRevHandler
          An action listener for the "Save Revisor As" menu item under the file menu.
(package private)  class COBAApplet.SaveCBHandler
          An action listener for the "Save CB IC" menu item under the file menu.
(package private)  class COBAApplet.SaveCBHistHandler
          An action listener for the "Save CB IC History" menu item under the file menu.
(package private)  class COBAApplet.SaveContHandler
          An action listener for the "Save Contractor" menu item under the file menu.
(package private)  class COBAApplet.SaveEBHandler
          An action listener for the "Save EB IC" menu item under the file menu.
(package private)  class COBAApplet.SaveEBHistHandler
          An action listener for the "Save EB IC History" menu item under the file menu.
(package private)  class COBAApplet.SaveKBHandler
          An action listener for the "Save KB" menu item under the file menu.
(package private)  class COBAApplet.SaveKBHistHandler
          An action listener for the "Save KB History" menu item under the file menu.
(package private)  class COBAApplet.SaveRevHandler
          An action listener for the "Save Revisor" menu item under the file menu.
 
Nested classes inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
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
(package private)  javax.swing.JMenuItem addKB
          The "Append to KB *" item under the file menu.
(package private)  javax.swing.JRadioButtonMenuItem[] algoItems
          The group of search algorithm radio buttons under the settings menu.
(package private) static java.awt.Color BACKGD
          A reference to the common background color for all three screens.
(package private)  javax.swing.JMenuItem ccKB
          The "Perform Consistency Check -> KB *" item under the settings menu.
(package private)  javax.swing.JRadioButtonMenuItem[] changeItems
          The group of change type radio buttons under the settings menu.
(package private)  javax.swing.JCheckBoxMenuItem consCheck
          The check box for enabling and disabling consistency check on each entry.
(package private)  boolean consCheckOn
          A boolean value which is true only if consistency check should be performed on each entry.
(package private)  javax.swing.JMenu doConsCheck
          The "Perform Consistency Check" submenu under the settings menu.
(package private) static int H_OFFSET
          An int indicating the horizontal gap used in spacing UI components.
(package private)  HistoryPanel historyPanel
          A reference to the history of changes log for the KB, the EB IC, and the CB IC.
(package private)  ICPanel icPanel
          A reference to the integrity constraints interface with the EB IC list and the CB IC list.
(package private)  boolean importingKB
          A boolean value which is true only when "Append to KB" or "New KB" file menu item is invoked.
(package private)  MainPanel mainPanel
          A reference to the main belief change interface with the KB list, the revision list, and the contraction list.
(package private)  javax.swing.JRadioButtonMenuItem[] mergeItems
          The group of merge type radio buttons under the settings menu.
(package private)  javax.swing.JMenuItem saveAll
          The "Save -> All" item under the file menu.
(package private)  javax.swing.JMenuItem saveCB
          The "Save -> Consistency-based IC" item under the file menu.
(package private)  javax.swing.JMenuItem saveCBHist
          The "Save -> CB IC History" item under the file menu.
(package private)  javax.swing.JMenuItem saveCont
          The "Save -> Contractor" item under the file menu.
(package private)  javax.swing.JMenuItem saveEB
          The "Save -> Entailment-based IC" item under the file menu.
(package private)  javax.swing.JMenuItem saveEBHist
          The "Save -> EB IC History" item under the file menu.
(package private)  javax.swing.JMenuItem saveKB
          The "Save -> KB" item under the file menu.
(package private)  javax.swing.JMenuItem saveKBHist
          The "Save -> KB History" item under the file menu.
(package private)  javax.swing.JMenuItem saveRev
          The "Save -> Revisor" item under the file menu.
(package private) static int V_OFFSET
          An int indicating the vertical gap used in spacing UI components.
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
COBAApplet()
           
 
Method Summary
(package private)  void activateAfterDecision()
          Reactivates the three panels and the menu items for importing a new file into the KB list, the revision list, the contraction list, the EB IC list, or the CB IC list, after the user's decision to reject or commit the new KB.
(package private)  void deactivateBeforeDecision()
          Deactivates the three panels and the menu items for importing a new file into the KB list, the revision list, the contraction list, the EB IC list, or the CB IC list, pending the user's decision to reject or commit the new KB.
 void init()
          Initializes all the UI components of the COBAApplet.
(package private)  void setCons(boolean isOn)
          Sets the consistency check on input to isOn.
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, 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
 

Field Detail

V_OFFSET

static final int V_OFFSET
An int indicating the vertical gap used in spacing UI components.

See Also:
Constant Field Values

H_OFFSET

static final int H_OFFSET
An int indicating the horizontal gap used in spacing UI components.

See Also:
Constant Field Values

BACKGD

static final java.awt.Color BACKGD
A reference to the common background color for all three screens.


mainPanel

MainPanel mainPanel
A reference to the main belief change interface with the KB list, the revision list, and the contraction list.


icPanel

ICPanel icPanel
A reference to the integrity constraints interface with the EB IC list and the CB IC list.


historyPanel

HistoryPanel historyPanel
A reference to the history of changes log for the KB, the EB IC, and the CB IC.


algoItems

javax.swing.JRadioButtonMenuItem[] algoItems
The group of search algorithm radio buttons under the settings menu.


mergeItems

javax.swing.JRadioButtonMenuItem[] mergeItems
The group of merge type radio buttons under the settings menu.


changeItems

javax.swing.JRadioButtonMenuItem[] changeItems
The group of change type radio buttons under the settings menu.


consCheck

javax.swing.JCheckBoxMenuItem consCheck
The check box for enabling and disabling consistency check on each entry.


doConsCheck

javax.swing.JMenu doConsCheck
The "Perform Consistency Check" submenu under the settings menu. This is enabed only when the user switches consistency check off or back on.


ccKB

javax.swing.JMenuItem ccKB
The "Perform Consistency Check -> KB *" item under the settings menu.


saveKB

javax.swing.JMenuItem saveKB
The "Save -> KB" item under the file menu.


saveRev

javax.swing.JMenuItem saveRev
The "Save -> Revisor" item under the file menu.


saveCont

javax.swing.JMenuItem saveCont
The "Save -> Contractor" item under the file menu.


saveKBHist

javax.swing.JMenuItem saveKBHist
The "Save -> KB History" item under the file menu.


saveEBHist

javax.swing.JMenuItem saveEBHist
The "Save -> EB IC History" item under the file menu.


saveCBHist

javax.swing.JMenuItem saveCBHist
The "Save -> CB IC History" item under the file menu.


saveEB

javax.swing.JMenuItem saveEB
The "Save -> Entailment-based IC" item under the file menu.


saveCB

javax.swing.JMenuItem saveCB
The "Save -> Consistency-based IC" item under the file menu.


saveAll

javax.swing.JMenuItem saveAll
The "Save -> All" item under the file menu.


addKB

javax.swing.JMenuItem addKB
The "Append to KB *" item under the file menu.


importingKB

boolean importingKB
A boolean value which is true only when "Append to KB" or "New KB" file menu item is invoked.


consCheckOn

boolean consCheckOn
A boolean value which is true only if consistency check should be performed on each entry.

Constructor Detail

COBAApplet

public COBAApplet()
Method Detail

init

public void init()
Initializes all the UI components of the COBAApplet.


setCons

void setCons(boolean isOn)
Sets the consistency check on input to isOn.

Parameters:
isOn - A boolean value that corresponds to 'on' if true, to 'off' if false.

deactivateBeforeDecision

void deactivateBeforeDecision()
Deactivates the three panels and the menu items for importing a new file into the KB list, the revision list, the contraction list, the EB IC list, or the CB IC list, pending the user's decision to reject or commit the new KB.


activateAfterDecision

void activateAfterDecision()
Reactivates the three panels and the menu items for importing a new file into the KB list, the revision list, the contraction list, the EB IC list, or the CB IC list, after the user's decision to reject or commit the new KB.