public class ModelGrafic extends javax.swing.JPanel implements Grafic, javax.swing.event.ChangeListener
Modifier and Type | Class and Description |
---|---|
class |
ModelGrafic.ZoomEntry |
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 |
---|
ModelGrafic(Model model) |
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
getBoundsExtern()
Construct the smallest rectangle,
which include the positions of all
entities, routes, lists, processes and stations;
|
javax.swing.JScrollPane |
getSelectedComponent() |
ViewGrafic |
getSelectedView() |
java.lang.String |
getSelectedViewId() |
double |
getZoomFactor(java.lang.String viewId) |
java.awt.Point |
getZoomPoint(java.lang.String viewId) |
java.util.Hashtable<java.lang.String,ModelGrafic.ZoomEntry> |
getZoomProperty() |
boolean |
isInZoomCenter(java.awt.Point p) |
boolean |
makeSnapShot(java.io.File directory,
boolean all)
make snapshots as png image and store it into directory
|
void |
paintZoomMarker(java.awt.Point zoomPoint,
boolean shiftMode) |
void |
reset() |
void |
setZoomFactor(double zoomFactor,
java.awt.Point zoomPoint,
long time) |
void |
setZoomProperty(java.util.Hashtable<java.lang.String,ModelGrafic.ZoomEntry> zoomProperty) |
void |
stateChanged(javax.swing.event.ChangeEvent e) |
java.awt.Point |
transformToExtern(java.awt.Point p) |
java.awt.Point |
transformToExtern(java.lang.String viewId,
java.awt.Point p) |
java.awt.Point |
transformToIntern(java.awt.Point p) |
java.awt.Point |
transformToIntern(java.lang.String viewId,
java.awt.Point p) |
void |
updateDynamic(long time) |
void |
updateInit(long time) |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
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, 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
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, 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 ModelGrafic(Model model) throws ModelGraficException
ModelGraficException
public void reset()
public java.awt.Rectangle getBoundsExtern()
public java.awt.Point transformToIntern(java.lang.String viewId, java.awt.Point p)
public java.awt.Point transformToIntern(java.awt.Point p)
public java.awt.Point transformToExtern(java.lang.String viewId, java.awt.Point p)
public java.awt.Point transformToExtern(java.awt.Point p)
public ViewGrafic getSelectedView()
public java.lang.String getSelectedViewId()
public javax.swing.JScrollPane getSelectedComponent()
public void paintZoomMarker(java.awt.Point zoomPoint, boolean shiftMode)
public boolean isInZoomCenter(java.awt.Point p)
public void setZoomFactor(double zoomFactor, java.awt.Point zoomPoint, long time)
public double getZoomFactor(java.lang.String viewId)
public java.awt.Point getZoomPoint(java.lang.String viewId)
public java.util.Hashtable<java.lang.String,ModelGrafic.ZoomEntry> getZoomProperty()
public void setZoomProperty(java.util.Hashtable<java.lang.String,ModelGrafic.ZoomEntry> zoomProperty)
public void updateInit(long time)
public void updateDynamic(long time)
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
public boolean makeSnapShot(java.io.File directory, boolean all) throws java.io.IOException
directory
- A directoryall
- Make snapshots from all views or only from the actual selected viewjava.io.IOException