public class StatisticGrafic extends javax.swing.JComponent implements Grafic, java.awt.event.MouseListener, java.awt.event.ActionListener
Modifier and Type | Field and Description |
---|---|
static int |
ANIMATION_Histogram |
static int |
ANIMATION_LastValue |
static int |
ANIMATION_TimeValueDiagram |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Border_Default, BOUNDARY_WIDTH, COLOR_BACKGROUND, COLOR_BORDER, COLOR_FOREGROUND, COLOR_INFOPANE_MARKED, COLOR_SWITCH_BACKGROUND, COLOR_SWITCH_STOCK_BOUND, COLOR_ZOOM_MARKER, FONT_BIG, FONT_DEFAULT, FONT_SMALL, LAYER_BACKGROUND, LAYER_BackGroundElement, LAYER_BackGroundLine, LAYER_Bin, LAYER_ENTITY, LAYER_LIST, LAYER_MARKER, LAYER_PROCESS, LAYER_PROCESS_LINE_LIST, LAYER_RESOURCE, LAYER_ROUTE_DYNAMIC, LAYER_ROUTE_STATIC, LAYER_STATION, LAYER_STATISTIC, LAYER_STOCK, LAYER_WAITING_QUEUE, layer0, STATION_DEFAULT_DIMENSION
Constructor and Description |
---|
StatisticGrafic(Statistic statistic,
java.lang.String viewId,
java.awt.Point pointExtern,
int typeAnimation,
boolean isIntValue,
java.awt.Dimension deltaSize,
boolean infopane)
Build a StatisticGrafic Instance
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Called by popup menu items to show statistics in InfoPane.
|
java.awt.Rectangle |
getBoundsExtern() |
static java.awt.Rectangle |
getBoundsExternGlobal(Model model,
java.lang.String viewId)
Construct the smallest rectangle,
which include the positions of all statistics in view
|
java.lang.String |
getViewId() |
static java.lang.String[] |
getViews(Model model)
get all views (viewId's) with Statistic
|
void |
mouseClicked(java.awt.event.MouseEvent event) |
void |
mouseEntered(java.awt.event.MouseEvent event) |
void |
mouseExited(java.awt.event.MouseEvent event) |
void |
mousePressed(java.awt.event.MouseEvent event) |
void |
mouseReleased(java.awt.event.MouseEvent event) |
void |
transform()
Transforms pointExtern to point Intern
|
void |
update()
updates the StatisticGrafic Instance.
|
static void |
updateInit(Model model,
java.lang.String viewId,
javax.swing.JComponent panel)
Put all StatisticGrafic instances into panel.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, 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, 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, transferFocusBackward, transferFocusUpCycle
public static final int ANIMATION_LastValue
public static final int ANIMATION_TimeValueDiagram
public static final int ANIMATION_Histogram
public StatisticGrafic(Statistic statistic, java.lang.String viewId, java.awt.Point pointExtern, int typeAnimation, boolean isIntValue, java.awt.Dimension deltaSize, boolean infopane) throws ModelException
statistic
- The associated statistic instanceviewId
- Id of viewpointExtern
- Middle pointtypeAnimation
- Default animation type. This can changed by popup menu.
For animation types look at StatisticGrafic.ANIMATION_...isIntValue
- In typeAnimation == StatisticGrafic.ANIMATION_LastValue
value is shown as integer.deltaSize
- The default size can be incremented/decremented
by deltaSize. Null means no change.infopane
- Grafic is used for infopaneModelException
public static java.lang.String[] getViews(Model model)
public static java.awt.Rectangle getBoundsExternGlobal(Model model, java.lang.String viewId)
viewId
- id of viewpublic static void updateInit(Model model, java.lang.String viewId, javax.swing.JComponent panel)
panel
- public java.lang.String getViewId()
public void update() throws ModelException
ModelException
public void transform()
public java.awt.Rectangle getBoundsExtern()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent event)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface java.awt.event.MouseListener