All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.gui.ResultHistoryPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JPanel
|
+----weka.gui.ResultHistoryPanel
- public class ResultHistoryPanel
- extends JPanel
A component that accepts named stringbuffers and displays the name in a list
box. When a name is right-clicked, a frame is popped up that contains
the string held by the stringbuffer. Optionally a text component may be
provided that will have it's text set to the named result text on a
left-click.
- Version:
- $Revision: 1.9 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
-
ResultHistoryPanel(JTextComponent)
- Create the result history object
-
addObject(String, Object)
- Adds an object to the results list
-
addResult(String, StringBuffer)
- Adds a new result to the result list.
-
getSelectedBuffer()
- Gets the buffer associated with the currently
selected item in the list.
-
getSelectedObject()
- Gets the object associated with the currently
selected item in the list.
-
getSelectionModel()
- Gets the selection model used by the results list.
-
main(String[])
- Tests out the result history from the command line.
-
openFrame(String)
- Opens the named result in a separate frame.
-
removeResult(String)
- Removes one of the result buffers from the history.
-
setSingle(String)
- Sets the single-click display to view the named result.
-
updateResult(String)
- Tells any component currently displaying the named result that the
contents of the result text in the StringBuffer have been updated.
ResultHistoryPanel
public ResultHistoryPanel(JTextComponent text)
- Create the result history object
- Parameters:
- text - the optional text component for single-click display
addResult
public void addResult(String name,
StringBuffer result)
- Adds a new result to the result list.
- Parameters:
- name - the name to associate with the result
- result - the StringBuffer that contains the result text
removeResult
public void removeResult(String name)
- Removes one of the result buffers from the history. Any windows currently
displaying the contents of the buffer are not affected.
- Parameters:
- name - the name of the buffer to remove.
addObject
public void addObject(String name,
Object o)
- Adds an object to the results list
- Parameters:
- name - the name to associate with the object
- o - the object
getSelectedObject
public Object getSelectedObject()
- Gets the object associated with the currently
selected item in the list.
- Returns:
- the object or null if there is no
object corresponding to the current selection in
the list
getSelectedBuffer
public StringBuffer getSelectedBuffer()
- Gets the buffer associated with the currently
selected item in the list.
- Returns:
- the buffer or null if there are no items in
the list
setSingle
public void setSingle(String name)
- Sets the single-click display to view the named result.
- Parameters:
- name - the name of the result to display.
openFrame
public void openFrame(String name)
- Opens the named result in a separate frame.
- Parameters:
- name - the name of the result to open.
updateResult
public void updateResult(String name)
- Tells any component currently displaying the named result that the
contents of the result text in the StringBuffer have been updated.
- Parameters:
- name - the name of the result that has been updated.
getSelectionModel
public ListSelectionModel getSelectionModel()
- Gets the selection model used by the results list.
- Returns:
- a value of type 'ListSelectionModel'
main
public static void main(String args[])
- Tests out the result history from the command line.
- Parameters:
- args - ignored
All Packages Class Hierarchy This Package Previous Next Index WEKA's home