org.processmining.analysis.performance.dottedchart.ui
Class TitlePanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.processmining.analysis.performance.dottedchart.ui.TitlePanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class TitlePanel
extends javax.swing.JPanel

LogItemPanel. The purpose of this class is to provide a view of a log, in form of a horizontal ribbon, with abstract items (that have a start and end time) laid out on it, equipped with handles to distinguish. This class expects SortedSets of LogItems, which are grouped automatically with a specific color and can be removed again bulk-wise. Make sure that the added LogItems fully support the methods to retrieve start and end in temporal fashion, as the implementation of this class depends on that.

Author:
Christian W. Guenther (christian at deckfour dot org)
See Also:
Serialized Form

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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  int border
           
protected  java.util.Calendar cal
           
protected  java.awt.Color colorBaseGreen
           
protected  java.awt.Color colorBg
           
protected  java.awt.Color colorFg
           
protected  java.awt.Color colorLogBright
           
protected  java.awt.Color colorLogDark
           
protected  java.lang.String colorStandard
           
protected  java.awt.Color colorTimeLine
           
protected  java.util.HashMap endTimeBaseHashMap
           
protected  java.util.ArrayList<java.lang.String> eventTypeToKeep
           
static java.lang.String[] HANDLE_ICONS
           
protected  double handleRatio
           
protected  double height2pixels
           
static java.lang.String ITEM_HANDLE_BOX
           
static java.lang.String ITEM_HANDLE_CIRCLE
           
static java.lang.String ITEM_HANDLE_DOT
           
static java.lang.String ITEM_HANDLE_DRAW_BOX
           
static java.lang.String ITEM_HANDLE_DRAW_CIRCLE
           
static java.lang.String ITEM_HANDLE_DRAW_RHOMBUS
           
static java.lang.String ITEM_HANDLE_DRAW_ROUND_BOX
           
static java.lang.String ITEM_HANDLE_DRAW_TRIANGLE
           
static java.lang.String ITEM_HANDLE_RHOMBUS
           
static java.lang.String ITEM_HANDLE_ROUND_BOX
           
static java.lang.String ITEM_HANDLE_TRIANGLE
           
protected  ColorReference itemColors
           
protected  java.lang.String itemHandle
           
protected  java.util.HashMap itemHashMap
           
protected  ShapeReference itemShapes
           
protected  java.util.Date logBoundaryLeft
           
protected  java.util.Date logBoundaryRight
           
protected  int logLanePixStep
           
protected  long logLaneStep
           
protected  double milli2pixels
           
protected  java.lang.String relativeTimeBase
           
protected  java.lang.String shapeStandard
           
static java.lang.String ST_DATA
           
static java.lang.String ST_EVEN
           
static java.lang.String ST_INST
           
static java.lang.String ST_ORIG
           
static java.lang.String ST_TASK
           
static java.lang.String STATISTICS_OVERALL
           
static java.lang.String STR_NONE
           
static java.lang.String TIME_ACTUAL
           
static java.lang.String TIME_LOGICAL
           
static java.lang.String TIME_RELATIVE_RATIO
           
static java.lang.String TIME_RELATIVE_TIME
           
protected  java.util.HashMap timeBaseHashMap
           
protected  java.lang.String timeOption
           
protected  java.lang.String typeHashMap
           
protected  int updHight
           
protected  int updWidth
           
protected  double viewportZoomX
           
protected  double viewportZoomY
           
 
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
TitlePanel(java.util.HashMap aItemSets, java.util.ArrayList<java.lang.String> aEventTypeToKeep, java.util.ArrayList anInstanceIDs)
          constructor
 
Method Summary
 void addItemSets(java.util.HashMap aItemSets)
          Adds a SortedSet of LogItems to be displayed as a group of items within this viewport.
 void changeInstanceTypeToKeep(java.util.ArrayList anInstanceIDs)
           
 int getHashMapSize()
           
 java.util.ArrayList getInstanceTypeToKeep()
           
 java.lang.String getTypeHashMap()
           
 void paintComponent(java.awt.Graphics grx)
          paints this log item panel and all contained log items as specified.
 void setInstanceTypeToKeep(java.util.ArrayList anInstanceIDs)
           
 void setSize(java.awt.Dimension d)
          overwritten as proxy, to update mill2pixels ratio
 void setSize(int width, int height)
          overwritten as proxy, to update mill2pixels ratio
 void setTypeHashMap(java.lang.String str)
           
 void setViewportZoomY(double aZoom)
          adjusts the viewable are of the log (zoom)
protected  int unit2Cord(int unit_number)
          Convenience method.
 
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, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STR_NONE

public static java.lang.String STR_NONE

ITEM_HANDLE_DOT

public static java.lang.String ITEM_HANDLE_DOT

ITEM_HANDLE_CIRCLE

public static java.lang.String ITEM_HANDLE_CIRCLE

ITEM_HANDLE_TRIANGLE

public static java.lang.String ITEM_HANDLE_TRIANGLE

ITEM_HANDLE_BOX

public static java.lang.String ITEM_HANDLE_BOX

ITEM_HANDLE_RHOMBUS

public static java.lang.String ITEM_HANDLE_RHOMBUS

ITEM_HANDLE_ROUND_BOX

public static java.lang.String ITEM_HANDLE_ROUND_BOX

ITEM_HANDLE_DRAW_BOX

public static java.lang.String ITEM_HANDLE_DRAW_BOX

ITEM_HANDLE_DRAW_CIRCLE

public static java.lang.String ITEM_HANDLE_DRAW_CIRCLE

ITEM_HANDLE_DRAW_TRIANGLE

public static java.lang.String ITEM_HANDLE_DRAW_TRIANGLE

ITEM_HANDLE_DRAW_RHOMBUS

public static java.lang.String ITEM_HANDLE_DRAW_RHOMBUS

ITEM_HANDLE_DRAW_ROUND_BOX

public static java.lang.String ITEM_HANDLE_DRAW_ROUND_BOX

STATISTICS_OVERALL

public static final java.lang.String STATISTICS_OVERALL
See Also:
Constant Field Values

TIME_ACTUAL

public static final java.lang.String TIME_ACTUAL
See Also:
Constant Field Values

TIME_RELATIVE_TIME

public static final java.lang.String TIME_RELATIVE_TIME
See Also:
Constant Field Values

TIME_RELATIVE_RATIO

public static final java.lang.String TIME_RELATIVE_RATIO
See Also:
Constant Field Values

TIME_LOGICAL

public static final java.lang.String TIME_LOGICAL
See Also:
Constant Field Values

ST_ORIG

public static final java.lang.String ST_ORIG
See Also:
Constant Field Values

ST_TASK

public static final java.lang.String ST_TASK
See Also:
Constant Field Values

ST_INST

public static final java.lang.String ST_INST
See Also:
Constant Field Values

ST_EVEN

public static final java.lang.String ST_EVEN
See Also:
Constant Field Values

ST_DATA

public static final java.lang.String ST_DATA
See Also:
Constant Field Values

HANDLE_ICONS

public static java.lang.String[] HANDLE_ICONS

itemHashMap

protected java.util.HashMap itemHashMap

typeHashMap

protected java.lang.String typeHashMap

logBoundaryLeft

protected java.util.Date logBoundaryLeft

logBoundaryRight

protected java.util.Date logBoundaryRight

milli2pixels

protected double milli2pixels

height2pixels

protected double height2pixels

logLaneStep

protected long logLaneStep

logLanePixStep

protected int logLanePixStep

viewportZoomX

protected double viewportZoomX

viewportZoomY

protected double viewportZoomY

updWidth

protected int updWidth

updHight

protected int updHight

itemHandle

protected java.lang.String itemHandle

colorBg

protected java.awt.Color colorBg

colorFg

protected java.awt.Color colorFg

colorLogDark

protected java.awt.Color colorLogDark

colorLogBright

protected java.awt.Color colorLogBright

colorTimeLine

protected java.awt.Color colorTimeLine

colorBaseGreen

protected java.awt.Color colorBaseGreen

colorStandard

protected java.lang.String colorStandard

shapeStandard

protected java.lang.String shapeStandard

itemShapes

protected ShapeReference itemShapes

timeOption

protected java.lang.String timeOption

timeBaseHashMap

protected java.util.HashMap timeBaseHashMap

endTimeBaseHashMap

protected java.util.HashMap endTimeBaseHashMap

relativeTimeBase

protected java.lang.String relativeTimeBase

itemColors

protected ColorReference itemColors

eventTypeToKeep

protected java.util.ArrayList<java.lang.String> eventTypeToKeep

border

protected int border

handleRatio

protected double handleRatio

cal

protected java.util.Calendar cal
Constructor Detail

TitlePanel

public TitlePanel(java.util.HashMap aItemSets,
                  java.util.ArrayList<java.lang.String> aEventTypeToKeep,
                  java.util.ArrayList anInstanceIDs)
constructor

Parameters:
aItemSets - HashMap representing Item (start) of the log to be visualized
rightBoundary - Date representing the right boundary (end) of the log to be visualized
Method Detail

setTypeHashMap

public void setTypeHashMap(java.lang.String str)

getTypeHashMap

public java.lang.String getTypeHashMap()

getInstanceTypeToKeep

public java.util.ArrayList getInstanceTypeToKeep()

setInstanceTypeToKeep

public void setInstanceTypeToKeep(java.util.ArrayList anInstanceIDs)

changeInstanceTypeToKeep

public void changeInstanceTypeToKeep(java.util.ArrayList anInstanceIDs)

addItemSets

public void addItemSets(java.util.HashMap aItemSets)
Adds a SortedSet of LogItems to be displayed as a group of items within this viewport. They are referenced by a string key, to be able to e.g. selectively remove groups of items later on.

Parameters:
key - reference to this item set, for e.g. later selective removal
anItemSet - expects a sorted set of 'LogItem' instances.

setSize

public void setSize(int width,
                    int height)
overwritten as proxy, to update mill2pixels ratio

Overrides:
setSize in class java.awt.Component

setSize

public void setSize(java.awt.Dimension d)
overwritten as proxy, to update mill2pixels ratio

Overrides:
setSize in class java.awt.Component

setViewportZoomY

public void setViewportZoomY(double aZoom)
adjusts the viewable are of the log (zoom)

Parameters:
aZoom - fraction of the log to be viewable (within (0,1] !)

getHashMapSize

public int getHashMapSize()

unit2Cord

protected int unit2Cord(int unit_number)
Convenience method. Transforms a timestamp (Date) into the corresponding horizontal position within the viewport.

Parameters:
aTimestamp -
Returns:

paintComponent

public void paintComponent(java.awt.Graphics grx)
paints this log item panel and all contained log items as specified.

Overrides:
paintComponent in class javax.swing.JComponent
Parameters:
g - the graphics object used for painting