public class ResultHistoryPanel
extends javax.swing.JPanel
| Modifier and Type | Class and Description |
|---|---|
static interface |
ResultHistoryPanel.RDeleteListener
Interface for something to be notified when an entry in the list is deleted
|
static class |
ResultHistoryPanel.RKeyAdapter
Extension of KeyAdapter that implements Serializable.
|
static class |
ResultHistoryPanel.RMouseAdapter
Extension of MouseAdapter that implements Serializable.
|
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected ResultHistoryPanel.RDeleteListener |
m_deleteListener
Something listening for list deletions
|
protected java.util.Hashtable<java.lang.String,javax.swing.JTextArea> |
m_FramedOutput
A Hashtable mapping names to output text components
|
protected boolean |
m_HandleRightClicks
Let the result history list handle right clicks in the default manner---ie,
pop up a window displaying the buffer
|
protected javax.swing.JList |
m_List
The list component
|
protected javax.swing.DefaultListModel |
m_Model
The list model
|
protected java.util.Hashtable<java.lang.String,java.lang.Object> |
m_Objs
A hashtable mapping names to arbitrary objects
|
protected PrintableComponent |
m_Printer
for printing the output to files
|
protected java.util.Hashtable<java.lang.String,java.lang.StringBuffer> |
m_Results
A Hashtable mapping names to result buffers
|
protected java.lang.String |
m_SingleName
The named result being viewed in the single-click display
|
protected javax.swing.text.JTextComponent |
m_SingleText
An optional component for single-click display
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
ResultHistoryPanel(javax.swing.text.JTextComponent text)
Create the result history object
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(java.lang.String name,
java.lang.Object o)
Adds an object to the results list.
|
void |
addOrOverwriteObject(java.lang.String name,
java.lang.Object o)
Adds an object to the result list.
|
void |
addResult(java.lang.String name,
java.lang.StringBuffer result)
Adds a new result to the result list.
|
void |
clearResults()
Removes all of the result buffers from the history.
|
javax.swing.JList |
getList()
Gets the JList used by the results list
|
java.lang.String |
getNameAtIndex(int index)
Gets the name of theitem in the list at the specified index
|
java.lang.StringBuffer |
getNamedBuffer(java.lang.String name)
Gets the named buffer
|
java.lang.Object |
getNamedObject(java.lang.String name)
Get the named object from the list
|
java.lang.StringBuffer |
getSelectedBuffer()
Gets the buffer associated with the currently selected item in the list.
|
java.lang.String |
getSelectedName()
Get the name of the currently selected item in the list
|
java.lang.Object |
getSelectedObject()
Gets the object associated with the currently selected item in the list.
|
javax.swing.ListSelectionModel |
getSelectionModel()
Gets the selection model used by the results list.
|
static void |
main(java.lang.String[] args)
Tests out the result history from the command line.
|
void |
openFrame(java.lang.String name)
Opens the named result in a separate frame.
|
void |
removeResult(java.lang.String name)
Removes one of the result buffers from the history.
|
void |
removeResults(int[] selectedI)
Remove the entries at the specified indices in the list
|
void |
removeResults(java.util.List<java.lang.String> entries)
Remove the specified entries from the list
|
void |
setBackground(java.awt.Color c)
Set the background color for this component and the list
|
void |
setDeleteListener(ResultHistoryPanel.RDeleteListener listener)
Set a listener for deletions from the list
|
void |
setFont(java.awt.Font f)
Set the font to use in the list
|
void |
setHandleRightClicks(boolean tf)
Set whether the result history list should handle right clicks or whether
the parent object will handle them.
|
void |
setSelectedListValue(java.lang.String name)
Set the selected list entry.
|
void |
setSingle(java.lang.String name)
Sets the single-click display to view the named result.
|
void |
updateResult(java.lang.String name)
Tells any component currently displaying the named result that the contents
of the result text in the StringBuffer have been updated.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected javax.swing.text.JTextComponent m_SingleText
protected java.lang.String m_SingleName
protected javax.swing.DefaultListModel m_Model
protected javax.swing.JList m_List
protected java.util.Hashtable<java.lang.String,java.lang.StringBuffer> m_Results
protected java.util.Hashtable<java.lang.String,javax.swing.JTextArea> m_FramedOutput
protected java.util.Hashtable<java.lang.String,java.lang.Object> m_Objs
protected boolean m_HandleRightClicks
protected PrintableComponent m_Printer
protected transient ResultHistoryPanel.RDeleteListener m_deleteListener
public ResultHistoryPanel(javax.swing.text.JTextComponent text)
text - the optional text component for single-click displaypublic void setDeleteListener(ResultHistoryPanel.RDeleteListener listener)
listener - the listener to setpublic void addResult(java.lang.String name,
java.lang.StringBuffer result)
name - the name to associate with the resultresult - the StringBuffer that contains the result textpublic void removeResults(int[] selectedI)
selectedI - the entries to removepublic void removeResults(java.util.List<java.lang.String> entries)
entries - the entries to removepublic void removeResult(java.lang.String name)
name - the name of the buffer to remove.public void clearResults()
public void addObject(java.lang.String name,
java.lang.Object o)
name - the name to associate with the objecto - the objectpublic void addOrOverwriteObject(java.lang.String name,
java.lang.Object o)
name - the name to associate with the objecto - the objectpublic java.lang.Object getNamedObject(java.lang.String name)
name - the name of the item to retrieve the stored object forpublic java.lang.Object getSelectedObject()
public java.lang.StringBuffer getNamedBuffer(java.lang.String name)
public java.lang.StringBuffer getSelectedBuffer()
public java.lang.String getSelectedName()
public java.lang.String getNameAtIndex(int index)
public void setSingle(java.lang.String name)
name - the name of the result to display.public void setSelectedListValue(java.lang.String name)
name - the name of the list entry to be selectedpublic void openFrame(java.lang.String name)
name - the name of the result to open.public void updateResult(java.lang.String name)
name - the name of the result that has been updated.public javax.swing.ListSelectionModel getSelectionModel()
public javax.swing.JList getList()
public void setHandleRightClicks(boolean tf)
tf - false if parent object will handle right clickspublic void setBackground(java.awt.Color c)
setBackground in class javax.swing.JComponentc - the background color to usepublic void setFont(java.awt.Font f)
setFont in class javax.swing.JComponentf - the font to usepublic static void main(java.lang.String[] args)
args - ignored