de.dfg.oc.logfileanalyzer.gui
Class ChartFrame

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.ChartFrame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class ChartFrame
extends JFrame

Provides a frame containing a histogram chart.

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  DataElement currentElement
          The current DataElement displayed in the TableFrame.
private  JComboBox jComboBoxHistogramSelector
          Selects the histogram displayed in this ChartFrame.
private  JComboBox jComboBoxTableSelector
          Selects the classifier set displayed in this ChartFrame.
private  JPanel jPanelComboBoxes
          Contains ComboBoxes to select the classifier set and the histogram displayed in this ChartFrame.
private  JPanel jPanelContentpane
          Contains all panels of this ChartFrame.
private  JPanel jPanelHistogram
          Contains the histogram.
private  JPanel jPanelInfoAndHistogram
          Contains the jPanelInformation and the jPanelHistogram.
private  JPanel jPanelInformation
          Contains the iteration and the number of classifiers displayed in this ChartFrame.
private  JPanel jPanelLimits
          Contains panels that define lower and upper limits for values displayed in this ChartFrame.
private  JPanel jPanelLowerLimit
          Contains a TextField to define a lower limit for values displayed in this ChartFrame.
private  JPanel jPanelUpperLimit
          Contains a TextField to define an upper limit for values displayed in this ChartFrame.
private  JTextArea jTextAreaClassifiers
          Contains the number of classifiers displayed in this ChartFrame.
private  JTextArea jTextAreaIteration
          Contains the iteration displayed in this ChartFrame.
private  JTextArea jTextAreaLowerLimit
          Provides a description for the corresponding jTextFieldUpperLimit.
private  JTextArea jTextAreaUpperLimit
          Provides a description for the corresponding jTextFieldLowerLimit.
private  JTextField jTextFieldLowerLimit
          Defines a lower limit for values displayed in this ChartFrame.
private  JTextField jTextFieldUpperLimit
          Defines an upper limit for values displayed in this ChartFrame.
private  TableFrame myTableFrame
          TableFrame that created this ChartFrame
private  String[] tableSelection
          Names of the classifier sets displayed in the jComboBoxTableSelector.
 
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
ChartFrame(TableFrame _myTableFrame)
          Creates a new ChartFrame that displays histograms.
 
Method Summary
private  JComboBox getJComboBoxHistogramSelector()
          Initializes the jComboBoxHistogramSelector that selects the histogram displayed in this ChartFrame.
private  JComboBox getJComboBoxTableSelector()
          Initializes the jComboBoxTableSelector that selects the table displayed in this ChartFrame.
private  JPanel getJPanelComboBoxes()
          Initializes the jPanelComboBoxes.
private  JPanel getJPanelContentpane()
          Initializes the jPanelContentpane that contains all panels used in this ChartFrame.
private  JPanel getJPanelHistogram()
          Initializes the jPanelHistogram that contains the histogram.
private  JPanel getJPanelInfoAndHistogram()
          Initializes the jPanelInfoAndHistogram that contains the jPanelInformation and the jPanelHistogram.
private  JPanel getJPanelInformation()
          Initializes the jPanelInformation.
private  JPanel getJPanelLimits()
          Initializes the jPanelLimits.
private  JPanel getJPanelLowerLimit()
          Initializes the jPanelLowerLimit.
private  JPanel getJPanelUpperLimit()
          Initializes the jPanelUpperLimit.
private  JTextArea getJTextAreaClassifiers()
          Initializes the jTextAreaClassifiers that contains the number of classifiers displayed in this ChartFrame.
private  JTextArea getJTextAreaLowerLimit()
          Initializes the jTextAreaLowerLimit that provides a description for the corresponding jTextFieldLowerLimit.
private  JTextArea getJTextAreaUpperLimit()
          Initializes the jTextAreaUpperLimit that provides a description for the corresponding jTextFieldUpperLimit.
private  JTextField getJTextFieldLowerLimit()
          Initializes the jTextFieldLowerLimit that defines a lower limit for values displayed in this ChartFrame.
private  JTextField getJTextFieldUpperLimit()
          Initializes the jTextFieldUpperLimit that defines an upper limit for values displayed in this ChartFrame.
 TableFrame getMyTableFrame()
          Returns the TableFrame that opened this ChartFrame.
private  void initialize()
          Initializes a new ChartFrame.
(package private)  void loadNewDataSet()
          Updates this ChartFrame with the current DataElement of the TableFrame.
(package private)  void loadNewDataSet(DataElement _newDataSet)
          Updates this ChartFrame with the data set given as parameter.
private  String replaceCommas(String _str)
          Replaces all commas (',') in the given String by points ('.'
private  void setNewChartPanel(JPanel _newPanel)
          Replaces the jPanelHistogram with the panel given as parameter.
private  void updateChart()
          Updates this ChartFrame after changes.
 
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

myTableFrame

private TableFrame myTableFrame
TableFrame that created this ChartFrame


currentElement

private DataElement currentElement
The current DataElement displayed in the TableFrame.


jPanelContentpane

private JPanel jPanelContentpane
Contains all panels of this ChartFrame.


jPanelComboBoxes

private JPanel jPanelComboBoxes
Contains ComboBoxes to select the classifier set and the histogram displayed in this ChartFrame.


jPanelInfoAndHistogram

private JPanel jPanelInfoAndHistogram
Contains the jPanelInformation and the jPanelHistogram.


jComboBoxTableSelector

private JComboBox jComboBoxTableSelector
Selects the classifier set displayed in this ChartFrame.


jComboBoxHistogramSelector

private JComboBox jComboBoxHistogramSelector
Selects the histogram displayed in this ChartFrame.


tableSelection

private String[] tableSelection
Names of the classifier sets displayed in the jComboBoxTableSelector.


jPanelHistogram

private JPanel jPanelHistogram
Contains the histogram.


jPanelInformation

private JPanel jPanelInformation
Contains the iteration and the number of classifiers displayed in this ChartFrame.


jTextAreaIteration

private JTextArea jTextAreaIteration
Contains the iteration displayed in this ChartFrame.


jTextAreaClassifiers

private JTextArea jTextAreaClassifiers
Contains the number of classifiers displayed in this ChartFrame.


jPanelLimits

private JPanel jPanelLimits
Contains panels that define lower and upper limits for values displayed in this ChartFrame.


jPanelUpperLimit

private JPanel jPanelUpperLimit
Contains a TextField to define an upper limit for values displayed in this ChartFrame.


jPanelLowerLimit

private JPanel jPanelLowerLimit
Contains a TextField to define a lower limit for values displayed in this ChartFrame.


jTextAreaUpperLimit

private JTextArea jTextAreaUpperLimit
Provides a description for the corresponding jTextFieldLowerLimit.


jTextAreaLowerLimit

private JTextArea jTextAreaLowerLimit
Provides a description for the corresponding jTextFieldUpperLimit.


jTextFieldLowerLimit

private JTextField jTextFieldLowerLimit
Defines a lower limit for values displayed in this ChartFrame.


jTextFieldUpperLimit

private JTextField jTextFieldUpperLimit
Defines an upper limit for values displayed in this ChartFrame.

Constructor Detail

ChartFrame

ChartFrame(TableFrame _myTableFrame)
Creates a new ChartFrame that displays histograms. A ChartFrame is opened by the TableFrame-class when "View-> New chart" is selected in the menu.

Parameters:
_myTableFrame - TableFrame that opened this ChartFrame
Method Detail

initialize

private void initialize()
Initializes a new ChartFrame.


getJPanelContentpane

private JPanel getJPanelContentpane()
Initializes the jPanelContentpane that contains all panels used in this ChartFrame.

Returns:
the jPanelContentpane

loadNewDataSet

void loadNewDataSet()
Updates this ChartFrame with the current DataElement of the TableFrame.


loadNewDataSet

void loadNewDataSet(DataElement _newDataSet)
Updates this ChartFrame with the data set given as parameter.

Parameters:
_newDataSet - the new data set that will be displayed

updateChart

private void updateChart()
Updates this ChartFrame after changes.


getMyTableFrame

public TableFrame getMyTableFrame()
Returns the TableFrame that opened this ChartFrame.

Returns:
the TableFrame that opened this ChartFrame

getJPanelComboBoxes

private JPanel getJPanelComboBoxes()
Initializes the jPanelComboBoxes. The panel contains ComboBoxes to select the classifier set and the histogram displayed in this ChartFrame.

Returns:
the jPanelComboBoxes

getJPanelInfoAndHistogram

private JPanel getJPanelInfoAndHistogram()
Initializes the jPanelInfoAndHistogram that contains the jPanelInformation and the jPanelHistogram.

Returns:
the jPanelInfoAndHistogram

getJComboBoxTableSelector

private JComboBox getJComboBoxTableSelector()
Initializes the jComboBoxTableSelector that selects the table displayed in this ChartFrame.

Returns:
the jComboBoxTableSelector

getJComboBoxHistogramSelector

private JComboBox getJComboBoxHistogramSelector()
Initializes the jComboBoxHistogramSelector that selects the histogram displayed in this ChartFrame.

Returns:
the jComboBoxHistogramSelector

getJPanelHistogram

private JPanel getJPanelHistogram()
Initializes the jPanelHistogram that contains the histogram.

Returns:
the jPanelChart

setNewChartPanel

private void setNewChartPanel(JPanel _newPanel)
Replaces the jPanelHistogram with the panel given as parameter.

Parameters:
_newPanel - the new panel that will replace the current jPanelHistogram

getJPanelInformation

private JPanel getJPanelInformation()
Initializes the jPanelInformation. The panel contains the iteration and the number of classifiers displayed in this ChartFrame.

Returns:
the jPanelInformation

getJTextAreaClassifiers

private JTextArea getJTextAreaClassifiers()
Initializes the jTextAreaClassifiers that contains the number of classifiers displayed in this ChartFrame.

Returns:
the jTextAreaClassifiers

getJPanelLimits

private JPanel getJPanelLimits()
Initializes the jPanelLimits. The panel contains subpanels that contain TextFields to define lower and upper limits for values displayed in this ChartFrame.

Returns:
the jPanelLimits

getJPanelUpperLimit

private JPanel getJPanelUpperLimit()
Initializes the jPanelUpperLimit. The panel contains a TextField to define an upper limit for values displayed in this ChartFrame.

Returns:
the jPanelUpperLimit

getJPanelLowerLimit

private JPanel getJPanelLowerLimit()
Initializes the jPanelLowerLimit. The panel contains a TextField to define a lower limit for values displayed in this ChartFrame.

Returns:
the jPanelLowerLimit

getJTextAreaUpperLimit

private JTextArea getJTextAreaUpperLimit()
Initializes the jTextAreaUpperLimit that provides a description for the corresponding jTextFieldUpperLimit.

Returns:
the jTextAreaUpperLimit

getJTextAreaLowerLimit

private JTextArea getJTextAreaLowerLimit()
Initializes the jTextAreaLowerLimit that provides a description for the corresponding jTextFieldLowerLimit.

Returns:
the jTextAreaLowerLimit

getJTextFieldLowerLimit

private JTextField getJTextFieldLowerLimit()
Initializes the jTextFieldLowerLimit that defines a lower limit for values displayed in this ChartFrame.

Returns:
the jTextFieldLowerLimit

getJTextFieldUpperLimit

private JTextField getJTextFieldUpperLimit()
Initializes the jTextFieldUpperLimit that defines an upper limit for values displayed in this ChartFrame.

Returns:
the jTextFieldUpperLimit

replaceCommas

private String replaceCommas(String _str)
Replaces all commas (',') in the given String by points ('.'). Furthermore, only the rightmost point is kept.

Parameters:
_str - a String for processing
Returns:
the processed String