|
||||||||||
| 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
weka.gui.SetInstancesPanel
public class SetInstancesPanel
A panel that displays an instance summary for a set of instances and lets the user open a set of instances from either a file or URL. Instances may be obtained either in a batch or incremental fashion. If incremental reading is used, then the client should obtain the Loader object (by calling getLoader()) and read the instances one at a time. If batch loading is used, then SetInstancesPanel will load the data into memory inside of a separate thread and notify the client when the operation is complete. The client can then retrieve the instances by calling getInstances().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.BaselineResizeBehavior |
| Field Summary | |
|---|---|
static String |
NO_CLASS
the text denoting "no class" in the class combobox. |
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| 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 | |
|---|---|
SetInstancesPanel()
Default constructor. |
|
SetInstancesPanel(boolean showZeroInstancesAsUnknown,
boolean showClassComboBox)
Create the panel. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a PropertyChangeListener who will be notified of value changes. |
void |
closeFrame()
closes the frame, i.e., the visibility is set to false. |
int |
getClassIndex()
Returns the currently selected class index. |
Instances |
getInstances()
Gets the set of instances currently held by the panel. |
Loader |
getLoader()
Gets the currently used Loader. |
JFrame |
getParentFrame()
Returns the current frame the panel knows of, that it resides in. |
boolean |
getReadIncrementally()
Gets whether instances are to be read incrementally or not. |
InstancesSummaryPanel |
getSummary()
Gets the instances summary panel associated with this panel. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a PropertyChangeListener. |
void |
setInstances(Instances i)
Updates the set of instances that is currently held by the panel. |
void |
setInstancesFromFileQ()
Queries the user for a file to load instances from, then loads the instances in a background process. |
void |
setInstancesFromURLQ()
Queries the user for a URL to load instances from, then loads the instances in a background process. |
void |
setParentFrame(JFrame parent)
Sets the frame, this panel resides in. |
void |
setReadIncrementally(boolean incremental)
Sets whether or not instances should be read incrementally by the Loader. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NO_CLASS
| Constructor Detail |
|---|
public SetInstancesPanel()
public SetInstancesPanel(boolean showZeroInstancesAsUnknown,
boolean showClassComboBox)
showZeroInstancesAsUnknown - whether to display zero instances
as unknown (e.g., when reading data
incrementally)showClassComboBox - whether to display a combobox
allowing the user to choose the class
attribute| Method Detail |
|---|
public void setParentFrame(JFrame parent)
parent - the parent framepublic JFrame getParentFrame()
public void closeFrame()
public void setInstancesFromFileQ()
public void setInstancesFromURLQ()
public void setInstances(Instances i)
i - a value of type 'Instances'public Instances getInstances()
public int getClassIndex()
public Loader getLoader()
public InstancesSummaryPanel getSummary()
public void setReadIncrementally(boolean incremental)
incremental - true if instances are to be read incrementallypublic boolean getReadIncrementally()
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in class Containerl - a value of type 'PropertyChangeListener'public void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in class Componentl - a value of type 'PropertyChangeListener'
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||