de.dfg.oc.logfileanalyzer.gui
Class TableFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by de.dfg.oc.logfileanalyzer.gui.TableFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class TableFrame
extends JFrame

Provides the main window containing the menu, buttons to step through the iterations, and tables displaying the classifier sets. It also manages the ChartFrames and provides them with the current data.

Author:
Clemens Gersbacher, Holger Prothmann
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  Vector<ChartFrame> chartFrames
          Contains all opened ChartFrames displaying histograms
private  DataElement currentElement
          Containing the classifier sets of the current iteration
private  DataMemory dataMemory
          Contains all classifier sets
private  JButton jButtonFirst
          Gets the fist DataElement and updates the tables.
private  JButton jButtonLast
          Gets the last DataElement and updates the tables.
private  JButton jButtonNext
          Gets the next DataElement and updates the tables.
private  JButton jButtonPrevious
          Gets the previous DataElement and updates the tables.
private  JCheckBoxMenuItem jCheckBoxMenuItemAll
          JCheckBoxItem for selecting all table columns.
private  JCheckBoxMenuItem jCheckBoxMenuItemNone
          JCheckBoxItem for deselecting all table columns.
private  JPanel jContentPane
          Contains the jPanelControlPane and jTabbedPane.
private  JMenuBar jJMenuBar
          MenuBar
private  JLabel jLabel_input
          Label "LCS input"
private  JLabel jLabel_iteration
          Label "iteration"
private  JMenu jMenuFile
          File menu
private  JMenuItem jMenuItemExit
          File menu item "exit"
private  JMenuItem jMenuItemOpen
          File menu item "open"
private  JMenuItem jMenuNewChart
          Menu item "New chart"
private  JMenu jMenuSelectColumns
          Menu item to hide or show columns.
private  JMenu jMenuView
          View menu
private  JPanel jPanelControlpane
          Contains the jTextFieldIteration, jButtonNext, jButtonPrevious, jButtonFirst and jButtonLast.
private  JScrollPane jScrollPaneActionSet
          Contains a table for the action set.
private  JScrollPane jScrollPaneMatchSet
          Contains a table for the match set.
private  JScrollPane jScrollPanePopulation
          Contains the population table.
private  JTabbedPane jTabbedPane
          Tabs for switching among population, match and action sets.
private  JTable jTableActionSet
          Contains the match set.
private  JTable jTableMatchSet
          Contains the match set.
private  JTable jTablePopulation
          Contains a table for the classifier population.
private  JTextField jTextField_input
           
private  JTextField jTextFieldIteration
          Shows the current iteration.
private  File logFilePath
          Path to the last opened file.
private  JCheckBoxMenuItem[] viewItems
          Array creating a JCheckBoxItem-object for every column of the table.
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TableFrame()
          Constructor.
 
Method Summary
(package private)  void addChartFrame(ChartFrame newChartFrame)
          Stores a new ChartFrame into this class' vector of ChartFrames.
private  void addTableRowSort(JTable table)
          Adds RowSorters to every column of the given table.
(package private)  DataElement getCurrentElement()
          Returns the current DataElement with the currently shown data.
private  JButton getJButtonFirst()
          Initializes the jButtonFirst.
private  JButton getJButtonLast()
          Initializes the jButtonLast.
private  JButton getJButtonNext()
          Initializes the jButtonNext.
private  JButton getJButtonPrevious()
          Initializes the jButtonPrevious.
private  JCheckBoxMenuItem getJCheckBoxMenuItemAll()
          Initializes the jCheckBoxMenuItemAll.
private  JCheckBoxMenuItem getJCheckBoxMenuItemNone()
          Initializes the jCheckBoxMenuItemNone.
private  JPanel getJContentPane()
          Initializes the jContentPane.
private  JMenuBar getJJMenuBar()
          Initializes the jJMenuBar and adds jMenuFile and jMenuView.
private  JMenu getJMenuFile()
          Initializes the jMenuFile and adds jMenuItemOpen and jMenuItemExit.
private  JMenuItem getJMenuItemChart()
          Initializes the jMenuNewChart and adds an actionListener.
private  JMenuItem getJMenuItemExit()
          Initializes the jMenuItemExit and adds an actionListener.
private  JMenuItem getJMenuItemOpen()
          Initializes the jMenuItemOpen and adds an actionListener.
private  JMenu getJMenuTable()
          Initializes the jMenuSelectColumns.
private  JMenu getJMenuView()
          Initializes the jMenuView.
private  JPanel getJPanelControlpane()
          Initializes the jPanelControlpane and adds jTextFieldIteration, jButtonPrevious jButtonNext, jButtonFirst and jButtonLast.
private  JScrollPane getJScrollPaneActionSet()
          Initializes the jScrollPaneActionSet.
private  JScrollPane getJScrollPaneMatchSet()
          Initializes the jScrollPaneMatchSet.
private  JScrollPane getJScrollPanePopulation()
          Initializes the jScrollPanePopulation.
private  JTabbedPane getJTabbedPane()
          Initializes the jTabbedPane.
private  JTable getJTableActionSet()
          Initializes the jTableActionSet.
private  JTable getJTableMatchSet()
          Initializes the jTableMatchSet.
private  JTable getJTablePopulation()
          Initializes the jTablePopulation.
private  JTextField getJTextField_input()
          Initializes jTextField_input.
private  JTextField getJTextFieldIteration()
          Initializes the jTextFieldIteration and adds an actionListener to search for a specific iteration.
private  void initialize()
          Initializes the GUI and all contents.
private  void refresh()
          Refreshes the tables and all open ChartFrames.
private  void refreshCharts()
          Refreshes all open ChartFrames.
(package private)  void removeChartFrame(ChartFrame deleteChartFrame)
          Deletes a ChartFrame out of this class' vector of ChartFrames.
private  void resizeTable(JTable table)
          Resizes the column widths of a table to fit the size of the contents and the header.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

dataMemory

private DataMemory dataMemory
Contains all classifier sets


currentElement

private DataElement currentElement
Containing the classifier sets of the current iteration


chartFrames

private Vector<ChartFrame> chartFrames
Contains all opened ChartFrames displaying histograms


jContentPane

private JPanel jContentPane
Contains the jPanelControlPane and jTabbedPane.


jPanelControlpane

private JPanel jPanelControlpane
Contains the jTextFieldIteration, jButtonNext, jButtonPrevious, jButtonFirst and jButtonLast.


jTextFieldIteration

private JTextField jTextFieldIteration
Shows the current iteration.


jButtonNext

private JButton jButtonNext
Gets the next DataElement and updates the tables.


jButtonPrevious

private JButton jButtonPrevious
Gets the previous DataElement and updates the tables.


jJMenuBar

private JMenuBar jJMenuBar
MenuBar


jMenuFile

private JMenu jMenuFile
File menu


jMenuItemOpen

private JMenuItem jMenuItemOpen
File menu item "open"


jTabbedPane

private JTabbedPane jTabbedPane
Tabs for switching among population, match and action sets.


jScrollPanePopulation

private JScrollPane jScrollPanePopulation
Contains the population table.


jTablePopulation

private JTable jTablePopulation
Contains a table for the classifier population.


jScrollPaneMatchSet

private JScrollPane jScrollPaneMatchSet
Contains a table for the match set.


jTableMatchSet

private JTable jTableMatchSet
Contains the match set.


jScrollPaneActionSet

private JScrollPane jScrollPaneActionSet
Contains a table for the action set.


jTableActionSet

private JTable jTableActionSet
Contains the match set.


jButtonFirst

private JButton jButtonFirst
Gets the fist DataElement and updates the tables.


jButtonLast

private JButton jButtonLast
Gets the last DataElement and updates the tables.


jMenuItemExit

private JMenuItem jMenuItemExit
File menu item "exit"


jMenuView

private JMenu jMenuView
View menu


jMenuSelectColumns

private JMenu jMenuSelectColumns
Menu item to hide or show columns.


viewItems

private JCheckBoxMenuItem[] viewItems
Array creating a JCheckBoxItem-object for every column of the table. With these checkboxes you can hide or show a specific column.


jCheckBoxMenuItemAll

private JCheckBoxMenuItem jCheckBoxMenuItemAll
JCheckBoxItem for selecting all table columns.


jCheckBoxMenuItemNone

private JCheckBoxMenuItem jCheckBoxMenuItemNone
JCheckBoxItem for deselecting all table columns.


logFilePath

private File logFilePath
Path to the last opened file.


jMenuNewChart

private JMenuItem jMenuNewChart
Menu item "New chart"


jTextField_input

private JTextField jTextField_input

jLabel_input

private JLabel jLabel_input
Label "LCS input"


jLabel_iteration

private JLabel jLabel_iteration
Label "iteration"

Constructor Detail

TableFrame

public TableFrame()
Constructor. Starts the GUI.

Method Detail

getJPanelControlpane

private JPanel getJPanelControlpane()
Initializes the jPanelControlpane and adds jTextFieldIteration, jButtonPrevious jButtonNext, jButtonFirst and jButtonLast.

Returns:
the jPanelControlpane

getJTextFieldIteration

private JTextField getJTextFieldIteration()
Initializes the jTextFieldIteration and adds an actionListener to search for a specific iteration.

Returns:
the jTextFieldIteration

getJButtonNext

private JButton getJButtonNext()
Initializes the jButtonNext. On click the next DataElement is loaded.

Returns:
the jButtonNext

getJButtonPrevious

private JButton getJButtonPrevious()
Initializes the jButtonPrevious. On click the previous DataElement is loaded.

Returns:
the jButtonPrevious

getJJMenuBar

private JMenuBar getJJMenuBar()
Initializes the jJMenuBar and adds jMenuFile and jMenuView.

Returns:
the jJMenuBar.

getJMenuFile

private JMenu getJMenuFile()
Initializes the jMenuFile and adds jMenuItemOpen and jMenuItemExit.

Returns:
the jMenuFile

getJMenuItemOpen

private JMenuItem getJMenuItemOpen()
Initializes the jMenuItemOpen and adds an actionListener. On click an OpenFile-dialogue is opened and the DataMemory is created.

Returns:
the jMenuItemOpen

getJTabbedPane

private JTabbedPane getJTabbedPane()
Initializes the jTabbedPane.

Returns:
the jTabbedPane

getJScrollPanePopulation

private JScrollPane getJScrollPanePopulation()
Initializes the jScrollPanePopulation.

Returns:
the jScrollPanePopulation

getJTablePopulation

private JTable getJTablePopulation()
Initializes the jTablePopulation.

Returns:
the jTablePopulation

getJScrollPaneMatchSet

private JScrollPane getJScrollPaneMatchSet()
Initializes the jScrollPaneMatchSet.

Returns:
the jScrollPaneMatchSet

getJTableMatchSet

private JTable getJTableMatchSet()
Initializes the jTableMatchSet.

Returns:
the jTableMatchSet

getJScrollPaneActionSet

private JScrollPane getJScrollPaneActionSet()
Initializes the jScrollPaneActionSet.

Returns:
the jScrollPaneActionSet

getJTableActionSet

private JTable getJTableActionSet()
Initializes the jTableActionSet.

Returns:
the jTableActionSet

getJButtonFirst

private JButton getJButtonFirst()
Initializes the jButtonFirst. On click the first DataElement is loaded.

Returns:
the jButtonFirst

getJButtonLast

private JButton getJButtonLast()
Initializes the jButtonLast. On click the last DataElement is loaded.

Returns:
the jButtonLast

getJMenuItemExit

private JMenuItem getJMenuItemExit()
Initializes the jMenuItemExit and adds an actionListener. On click the program is closed.

Returns:
the jMenuItemExit

getJMenuView

private JMenu getJMenuView()
Initializes the jMenuView.

Returns:
the jMenuView

getJMenuTable

private JMenu getJMenuTable()
Initializes the jMenuSelectColumns. For each column of the table a checkbox-item is created.

Returns:
the jMenuSelectColumns

getJCheckBoxMenuItemAll

private JCheckBoxMenuItem getJCheckBoxMenuItemAll()
Initializes the jCheckBoxMenuItemAll.

Returns:
jCheckBoxMenuItemAll

getJCheckBoxMenuItemNone

private JCheckBoxMenuItem getJCheckBoxMenuItemNone()
Initializes the jCheckBoxMenuItemNone.

Returns:
the jCheckBoxMenuItemNone

getJMenuItemChart

private JMenuItem getJMenuItemChart()
Initializes the jMenuNewChart and adds an actionListener. On action a new ChartFrame is created.

Returns:
the jMenuNewChart

initialize

private void initialize()
Initializes the GUI and all contents.


getJContentPane

private JPanel getJContentPane()
Initializes the jContentPane.

Returns:
the jContentPane

refresh

private void refresh()
Refreshes the tables and all open ChartFrames. The method removes columns deselected in the View->Columns-Menu, resizes the column width and sets RowSorters for the tables. If the currentElement is null, the controls are disabled and a notification is shown.


refreshCharts

private void refreshCharts()
Refreshes all open ChartFrames.


resizeTable

private void resizeTable(JTable table)
Resizes the column widths of a table to fit the size of the contents and the header.

Parameters:
table - table used for resize

addTableRowSort

private void addTableRowSort(JTable table)
Adds RowSorters to every column of the given table.

Parameters:
table - table that will equipped with RowSorters

getCurrentElement

DataElement getCurrentElement()
Returns the current DataElement with the currently shown data.

Returns:
the current DataElement

addChartFrame

void addChartFrame(ChartFrame newChartFrame)
Stores a new ChartFrame into this class' vector of ChartFrames.

Parameters:
newChartFrame - a new ChartFrame

removeChartFrame

void removeChartFrame(ChartFrame deleteChartFrame)
Deletes a ChartFrame out of this class' vector of ChartFrames.

Parameters:
deleteChartFrame - ChartFrame to delete

getJTextField_input

private JTextField getJTextField_input()
Initializes jTextField_input.

Returns:
javax.swing.JTextField