|
||||||||||
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
ace.gui.InstancesPanel
public class InstancesPanel
An object of this class represents a panel in the ACE GUI that allows users to view, edit, load and save the classifications and feature values of a data set. This information relates to the actual feature values, not the features themselves. The FeatureDefinitionsPanel should be consulted if one wishes to view information about the features themselves.
The instances are displayed in table form. This table may be sorted based on the contents of a given column by clicking on the appropriate column heading. The contents of any row may be changed by double clicking on any entry on the table (or clicking once, in the case of check boxes). Columns may also be reordered by dragging their headings. All instances must have unique identifiers and must have at least 1 dimension. Any attempt to enter invalid entries will be rejected by the system. If feature vectors and classifications are loaded for the same instance, the data should be merged into one row.
The Show Subsections column allows the user to check a check box to display the subsctions of an instance. The identifier column specifies the unique name of a instance. The Start column indicates the point in time (in seconds) that an subsection of an instance begins. The Stop column specifies the point in time (in seconds) that a subsection of an instance ends. The Classes column should only displayed if an ACE XML classifications file has been loaded and will display the given classification(s) for each instance.
The status bar displays the total number of loaded feature vectors and the total number of loaded classifications.
The Display Feature Values button causes the feature values columns to become visible.
The Show Misc Info button causes columns containing miscellaneous information to become visible.
The Add Instance button causes a new instance to be added to the end of the table. It is given a unique name.
The Delete Instance button causes the selected instance to be deleted from the table.
The Load Feature Vectors button loads a feature_vectors_file ACE XML file into memory and displays it. If feature values are already loaded, the user will be given a prompt asking them if they want to continue and previously loaded values will be overwritten.
The Load Classifications button loads a model_classifications_file ACE XML file into memory and displays it. If classifications are already loaded, the user will be given a prompt asking them if they want to continue and previously loaded classes will be overwritten.
The Save Feature Vectors button saves the currently loaded feature values into the path referred to in the File Path Settings dialog box as a feature_vectors_file ACE XML file. The Save Feature Vectors As button allows the user to choose the path to which the file is to be saved and updates the path in the File Path Settings dialog box.
The Save Classifications button saves the currently loaded classifications into the path referred to in the File Path Settings dialog box as a classifications_file ACE XML file. The Save Classifications As button allows the user to choose the path to which the file is to be saved and updates the path in the File Path Settings dialog box.
The loadNewPanelContents method can be called by external objects to load instances.
The actual feature values and classifications are not stored in an object of this class, but are instead stored in a DataBoard object stored in the MainGUIFrame object that holds the InstancesPanel.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
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.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 | |
---|---|
InstancesPanel(MainGUIFrame parent_frame)
Basic constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Calls the appropriate methods when the buttons/checkboxes are pressed/checked. |
void |
loadNewPanelContents()
Cause this panel to update to reflect the contents of parent.data_board. |
void |
saveAsClassificationsFile(java.lang.String save_path)
Saves the classifications displayed in the Instances Panel to an ACE XML model classifications file with the given name. |
void |
saveAsFeatureVectorsFile(java.lang.String save_path)
Saves the currently loaded feature vectors to the original file without giving the user the option to choose a new file path (unless save_path parameter is empty, in which case the user is given the chance to select a save path). |
void |
tableChanged(javax.swing.event.TableModelEvent event)
Updates the table whenever a checkbox in the "Show Sections" column is checked or unchecked. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, update |
Methods inherited from class java.awt.Container |
---|
add, 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, 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, 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, hide, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InstancesPanel(MainGUIFrame parent_frame)
parent_frame
- The JFrame that holds this JPanel.Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- The event to react to.public void loadNewPanelContents()
public void saveAsClassificationsFile(java.lang.String save_path)
save_path
- The path to which the model classifications displayed
in the GUI should be saved.public void saveAsFeatureVectorsFile(java.lang.String save_path)
save_path
- The path to which the feature vectors will be saved.public void tableChanged(javax.swing.event.TableModelEvent event)
The listener also ensures that only valid input is entered by the user. All features must have dimensions of at least 1 and all feature names must be unique. The users change is discarded if an invalid entry is entered.
Columns are also automatically resized if necessary, based on the new contents.
tableChanged
in interface javax.swing.event.TableModelListener
event
- An event indicating the change in the table.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |