|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
cobaUI.SentenceList
SentenceList is a general wrapper for the KB/Revision/Contraction/Entailment-based Integrity Constraint (EB IC)/ Consistency-based Integrity Constraint (CB IC) sentence list. It provides three view formats (default, cnf, dnf) as well as a remove button and a clear-all button.
Nested Class Summary | |
(package private) class |
SentenceList.ClearAllListener
An action listener for erasing all sentences from the list and logging the removals in the history panel. |
(package private) class |
SentenceList.CNFListener
An action listener for the cnf radio button, which displays the sentences in cnf format. |
(package private) class |
SentenceList.DefaultListener
An action listener for the default radio button, which displays the sentences in default format. |
(package private) class |
SentenceList.DNFListener
An action listener for the dnf radio button, which displays the sentences in dnf format. |
(package private) class |
SentenceList.MyListDataListener
A list data listener which (1) enables the remove and clear-all buttons only if the list is non-empty, (2) enables the appropriate "save" menu item when the list contents change, and (3) enables the "Get Parallel Change" button only when there are sentences to be merged, revised, and/or contracted. |
(package private) class |
SentenceList.RemoveListener
An action listener for removing the selected sentence from the list. |
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 | |
(package private) static int |
CB
An int representing the CB IC type. |
(package private) static int |
Contractor
An int representing the Contractor type. |
(package private) static int |
EB
An int representing the EB IC type. |
(package private) static int |
KB
An int representing the KB type. |
(package private) javax.swing.DefaultListModel |
listModel
The list model for specifying the listener for the data change in JList Items. |
(package private) java.util.Vector |
LSVec
The vector of the ListSent objects in this SentenceList. |
(package private) COBAApplet |
ParentApplet
A reference to the enclosing applet. |
(package private) static int |
Revisor
An int representing the Revisor type. |
(package private) short |
stringFormat
An int set to indicate the current display format: default, cnf, dnf. |
(package private) java.util.Vector |
SVec
The vector of the corresponding ISent objects in this SentenceList. |
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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
(package private) |
SentenceList(int _type,
COBAApplet _parentApp)
Constructs a new SentenceList of type _type for the enclosing applet _parentApp . |
Method Summary | |
(package private) void |
activateAfterDecision()
Reactivates the remove and clear-all buttons after the user's decision to reject or commit the new KB, and only if the SentenceList has at least one sentence. |
(package private) void |
addRevertedKBSentence(int whichKB,
java.lang.String sLabel)
Parses sLabel as an ISent, creates the corresponding ListSent, and adds the ISent and
ListSent to the KB indexed whichKB . |
(package private) void |
addRevertedSentence(java.lang.String sLabel)
Parses sLabel as an ISent, creates the corresponding ListSent, and adds the ListSent to the
LSVec and the list, and the ISent to the SVec. |
(package private) void |
addToKB(int whichKB,
java.lang.String sLabel)
Adds the sentence represented by sLabel to the KB indexed whichKB , updates
SentenceEditor's whichKB if the KB is new. |
(package private) void |
addToList(java.lang.String sLabel)
Parses sLabel as an ISent, checks its consistency if required, creates the corresponding ListSent,
and adds the ListSent to LSVec and the list, and the ISent to SVec. |
(package private) void |
deactivateBeforeDecision()
Deactivates the remove and clear-all buttons pending the user's decision to reject or commit the new KB. |
void |
paintComponent(java.awt.Graphics g)
Resizes, repositions, and redraws all UI components of this SentenceList. |
void |
removeAll()
Removes all the sentences from the list, clears the LSVec and the SVec, and updates SentenceEditor's KBBox accordingly. |
(package private) void |
removeFromList(ListSent s)
Removes s from LSVec and the list, removes the underlying ISent in s from SVec, and logs
the removal if this SentenceList is of either the KB, the EB, or the CB type. |
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, 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, 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 |
Field Detail |
static final int KB
static final int Revisor
static final int Contractor
static final int CB
static final int EB
COBAApplet ParentApplet
javax.swing.DefaultListModel listModel
java.util.Vector LSVec
java.util.Vector SVec
short stringFormat
Constructor Detail |
SentenceList(int _type, COBAApplet _parentApp)
_type
for the enclosing applet _parentApp
.
_type
- an int indicating the type of SentenceList._parentApp
- a reference to the enclosing applet.Method Detail |
void deactivateBeforeDecision()
void activateAfterDecision()
void addToKB(int whichKB, java.lang.String sLabel)
sLabel
to the KB indexed whichKB
, updates
SentenceEditor's whichKB if the KB is new.
whichKB
- an int representing the index of the KB to which to add the constructed sentence.sLabel
- the string from which to construct a new sentence.void addToList(java.lang.String sLabel)
sLabel
as an ISent, checks its consistency if required, creates the corresponding ListSent,
and adds the ListSent to LSVec and the list, and the ISent to SVec.This method can be invoked only on a SentenceList of a non-KB type.
sLabel
- the string from which to construct a new ISent.void addRevertedSentence(java.lang.String sLabel)
sLabel
as an ISent, creates the corresponding ListSent, and adds the ListSent to the
LSVec and the list, and the ISent to the SVec.This method can be invoked only on a SentenceList of either the EB or the CB type, in reverting to an earlier EB IC or CB IC snapshot.
sLabel
- the string from which to construct a new ISent.void addRevertedKBSentence(int whichKB, java.lang.String sLabel)
sLabel
as an ISent, creates the corresponding ListSent, and adds the ISent and
ListSent to the KB indexed whichKB
.
This method can be invoked only on a SentenceList of the KB type, in reverting to an earlier KB snapshot.
whichKB
- an int representing the index of the KB to which to add the constructed sentence.sLabel
- the string from which to construct a new ISent.void removeFromList(ListSent s)
s
from LSVec and the list, removes the underlying ISent in s
from SVec, and logs
the removal if this SentenceList is of either the KB, the EB, or the CB type.
s
- the ListSent to be removed from the list.public void removeAll()
public void paintComponent(java.awt.Graphics g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |