public class SetInstancesPanel
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.JComboBox |
m_ClassComboBox
the class combobox.
|
protected javax.swing.JLabel |
m_ClassLabel
the label for the class combobox.
|
protected javax.swing.JButton |
m_CloseBut
Click to close the dialog.
|
protected javax.swing.JPanel |
m_CloseButPanel
the panel the Close-Button is located in.
|
protected ConverterFileChooser |
m_FileChooser
The file chooser for selecting arff files.
|
protected Instances |
m_Instances
The current set of instances loaded.
|
protected java.lang.Thread |
m_IOThread
The thread we do loading in.
|
protected java.lang.String |
m_LastURL
Stores the last URL that instances were loaded from.
|
protected Loader |
m_Loader
The current loader used to obtain the current instances.
|
protected javax.swing.JButton |
m_OpenFileBut
Click to open instances from a file.
|
protected javax.swing.JButton |
m_OpenURLBut
Click to open instances from a URL.
|
protected javax.swing.JFrame |
m_ParentFrame
the parent frame. if one is provided, the close-button is displayed
|
protected boolean |
m_readIncrementally
whether to read the instances incrementally, if possible.
|
protected boolean |
m_showClassComboBox
whether to display a combobox that allows the user to choose the class
attribute.
|
protected boolean |
m_showZeroInstancesAsUnknown
whether to display zero instances as unknown ("?").
|
protected InstancesSummaryPanel |
m_Summary
The instance summary component.
|
protected java.beans.PropertyChangeSupport |
m_Support
Manages sending notifications to people when we change the set of working
instances.
|
static java.lang.String |
NO_CLASS
the text denoting "no class" in the class combobox.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
SetInstancesPanel()
Default constructor.
|
SetInstancesPanel(boolean showZeroInstancesAsUnknown,
boolean showClassComboBox,
ConverterFileChooser chooser)
Create the panel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.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.
|
javax.swing.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(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener.
|
void |
setInstances(Instances i)
Updates the set of instances that is currently held by the panel.
|
protected void |
setInstancesFromFile(java.io.File f)
Loads results from a set of instances contained in the supplied file.
|
void |
setInstancesFromFileQ()
Queries the user for a file to load instances from, then loads the
instances in a background process.
|
protected void |
setInstancesFromURL(java.net.URL u)
Loads instances from a URL.
|
void |
setInstancesFromURLQ()
Queries the user for a URL to load instances from, then loads the instances
in a background process.
|
void |
setParentFrame(javax.swing.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.
|
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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, 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, 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, transferFocusUpCyclepublic static final java.lang.String NO_CLASS
protected javax.swing.JButton m_OpenFileBut
protected javax.swing.JButton m_OpenURLBut
protected javax.swing.JButton m_CloseBut
protected InstancesSummaryPanel m_Summary
protected javax.swing.JLabel m_ClassLabel
protected javax.swing.JComboBox m_ClassComboBox
protected ConverterFileChooser m_FileChooser
protected java.lang.String m_LastURL
protected java.lang.Thread m_IOThread
protected java.beans.PropertyChangeSupport m_Support
protected Instances m_Instances
protected Loader m_Loader
protected javax.swing.JFrame m_ParentFrame
protected javax.swing.JPanel m_CloseButPanel
protected boolean m_readIncrementally
protected boolean m_showZeroInstancesAsUnknown
protected boolean m_showClassComboBox
public SetInstancesPanel()
public SetInstancesPanel(boolean showZeroInstancesAsUnknown,
boolean showClassComboBox,
ConverterFileChooser chooser)
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 attributechooser - the file chooser to use (may be null to use the default file
chooser)public void setParentFrame(javax.swing.JFrame parent)
parent - the parent framepublic javax.swing.JFrame getParentFrame()
public void closeFrame()
public void setInstancesFromFileQ()
public void setInstancesFromURLQ()
protected void setInstancesFromFile(java.io.File f)
f - a value of type 'File'protected void setInstancesFromURL(java.net.URL u)
u - the URL to load from.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(java.beans.PropertyChangeListener l)
addPropertyChangeListener in class java.awt.Containerl - a value of type 'PropertyChangeListener'public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in class java.awt.Componentl - a value of type 'PropertyChangeListener'