|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--haifa.shopsim.UI.shopanim.ShopAnim
A graphical view of a Job Shop. Gets ShopChangeEvents but does not use the information in them. It rather uses a refrence to a ShopState object for this purpuse.
Inner Class Summary | |
(package private) class |
ShopAnim.MachineCheckBox
|
(package private) class |
ShopAnim.RouteCheckBox
|
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.ActionStandin, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardState |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
private javax.swing.JButton |
allButton
|
private javax.swing.JPanel |
allNonePanel
|
(package private) java.util.HashMap |
bufferIndexesMap
Maps each buffer to an index (Integer). |
protected static int |
DRAWING_HEIGHT
|
protected static int |
DRAWING_WIDTH
|
private javax.swing.JPanel |
drawingPanel
|
private int |
firstStreetHeight
|
private int |
firstStreetWidth
|
private int |
iconHeight
|
private int |
iconWidth
|
protected JobShopGraphics |
jobShopGraphics
A reference to the the object that stores the graphics information of the job shop. |
(package private) java.awt.Point[][] |
machineCoords
|
protected MachineAnimIcon[][] |
machines
A matrix of refernces to Machine Icons. |
(package private) javax.swing.JCheckBox[] |
machinesCheckBoxes
|
(package private) java.util.HashMap |
machinesMap
Maps machine indexes (Integer objects) to MachineAnimIcon objects. |
private javax.swing.JPanel |
machinesPanel
|
(package private) java.util.HashMap |
machinesSpotMap
|
(package private) boolean[] |
machinesToView
An array that specifies at each moment, which machines are to be drawn. |
private javax.swing.JButton |
noneButton
|
private javax.swing.JPanel |
routeChoosePanel
The panel on which there are two panels, one for machines and one for routes whole routes. |
(package private) java.util.HashMap |
routeEndsIndexesMap
Maps route indexs (Integer) to (Integer) objects. |
(package private) java.util.HashMap |
routeEndsSidesMap
Maps route indexs (Integer) to (Integer) objects. where the values are EAST/WEST/NORTH/SOUTH |
(package private) javax.swing.JCheckBox[] |
routesCheckBoxes
|
(package private) java.util.HashMap |
routeStartsIndexesMap
Maps route indexs (Integer) to (Integer) objects. |
(package private) java.util.HashMap |
routeStartsSidesMap
Maps route indexs (Integer) to (Integer) objects. where the values are EAST/WEST/NORTH/SOUTH |
(package private) boolean[] |
routesToView
An array that specifies at each moment, which routes are to be drawn. |
protected RouteAnimIcon[][] |
routeTips
References to route tip icons. |
(package private) java.awt.Point[][] |
routeTipsCoords
|
protected ShopData |
shopData
A reference to the object that stores the information of the job shop. |
protected ShopState |
shopState
A reference to the shopstate object. |
protected static int |
STREET_HEIGHT
|
protected static int |
STREET_WIDTH
|
protected int |
totalStreetHeight
|
protected int |
totalStreetWidth
|
private javax.swing.JPanel |
wholeRoutesPanel
|
Fields inherited from class javax.swing.JPanel |
defaultLayout, uiClassID |
Fields inherited from class javax.swing.JComponent |
_bounds, accessibleContext, actionMap, ACTIONMAP_CREATED, alignmentX, alignmentY, ANCESTOR_INPUTMAP_CREATED, ANCESTOR_USING_BUFFER, ancestorInputMap, ancestorNotifier, autoscroller, border, changeSupport, clientProperties, CREATED_DOUBLE_BUFFER, flags, FOCUS_INPUTMAP_CREATED, focusInputMap, HAS_FOCUS, htmlKey, htmlView, inputVerifier, IS_DOUBLE_BUFFERED, IS_OPAQUE, IS_PAINTING_TILE, IS_PRINTING, IS_PRINTING_ALL, KEY_EVENTS_ENABLED, KEYBOARD_BINDINGS_KEY, listenerList, maximumSize, minimumSize, NEXT_FOCUS, paintImmediatelyClip, paintingChild, preferredSize, readObjectCallbacks, REQUEST_FOCUS_DISABLED, tmpRect, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, verifyInputWhenFocusTarget, vetoableChangeSupport, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, WHEN_IN_FOCUSED_WINDOW_BINDINGS, WIF_INPUTMAP_CREATED, windowInputMap |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads, serialVersionUID |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface haifa.shopsim.UI.shopanim.ShopAnimConstants |
EAST, NORTH, NOT_SET, NUM_MACHINE_SPOTS_HEIGHT, NUM_MACHINE_SPOTS_WIDTH, SOUTH, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ShopAnim(ShopData shopData_,
JobShopGraphics jobShopGraphics_)
Creates new ShopAnim |
Method Summary | |
protected void |
calcDims()
|
protected void |
drawMachines(java.awt.Graphics g)
|
protected void |
drawRoute(int rnum,
java.awt.Graphics g)
|
protected void |
drawRouteMachine(int machine,
java.awt.Graphics g)
|
protected void |
drawRoutes(java.awt.Graphics g)
|
protected void |
drawRouteTips(java.awt.Graphics g)
|
javax.swing.JPanel |
getRouteChoosePanel()
|
static void |
main(java.lang.String[] args)
For testing. |
void |
paint(java.awt.Graphics g)
|
void |
setShopState(ShopState shopState_)
|
private void |
setUpDataStructures()
sets up all of the datastrucutures and allocates Icons. |
private void |
setUpGUI()
Sets up all of the GUI components. |
void |
shopChanged(ShopChangeEvent sce)
|
Methods inherited from class javax.swing.JPanel |
|
Methods inherited from class javax.swing.JComponent |
_paintImmediately, addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, adjustPaintFlags, alwaysOnTop, checkIfChildObscuredBySibling, clearFocusOwners, componentInputMapChanged, computeVisibleRect, computeVisibleRect, compWriteObjectNotify, contains, createToolTip, disable, enable, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperties, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getFlag, getGraphics, getHeight, getInputMap, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paintWithBuffer, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseMotionEvent, putClientProperty, readObject, rectangleIsObscured, rectangleIsObscuredBySibling, registerKeyboardAction, registerKeyboardAction, registerWithKeyboardManager, registerWithKeyboardManager, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFlag, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, unregisterWithKeyboardManager, unregisterWithKeyboardManager, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFocusOwner, setLayout, transferFocus, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, constructComponentName, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, getWindowForObject, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resetGC, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
protected JobShopGraphics jobShopGraphics
protected ShopData shopData
protected ShopState shopState
protected MachineAnimIcon[][] machines
protected RouteAnimIcon[][] routeTips
java.awt.Point[][] routeTipsCoords
java.awt.Point[][] machineCoords
java.util.HashMap machinesMap
java.util.HashMap machinesSpotMap
java.util.HashMap bufferIndexesMap
java.util.HashMap routeStartsIndexesMap
java.util.HashMap routeEndsIndexesMap
java.util.HashMap routeStartsSidesMap
java.util.HashMap routeEndsSidesMap
boolean[] routesToView
boolean[] machinesToView
javax.swing.JCheckBox[] machinesCheckBoxes
javax.swing.JCheckBox[] routesCheckBoxes
private int iconWidth
private int iconHeight
private int firstStreetWidth
private int firstStreetHeight
protected static final int DRAWING_WIDTH
protected static final int DRAWING_HEIGHT
protected static final int STREET_WIDTH
protected static final int STREET_HEIGHT
protected int totalStreetWidth
protected int totalStreetHeight
private javax.swing.JPanel drawingPanel
private javax.swing.JPanel routeChoosePanel
private javax.swing.JPanel wholeRoutesPanel
private javax.swing.JPanel machinesPanel
private javax.swing.JPanel allNonePanel
private javax.swing.JButton allButton
private javax.swing.JButton noneButton
Constructor Detail |
public ShopAnim(ShopData shopData_, JobShopGraphics jobShopGraphics_)
Method Detail |
private void setUpGUI()
private void setUpDataStructures()
public javax.swing.JPanel getRouteChoosePanel()
public void shopChanged(ShopChangeEvent sce)
shopChanged
in interface ShopChangeListener
public void setShopState(ShopState shopState_)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
protected void drawMachines(java.awt.Graphics g)
protected void drawRouteTips(java.awt.Graphics g)
protected void calcDims()
protected void drawRoutes(java.awt.Graphics g)
protected void drawRoute(int rnum, java.awt.Graphics g)
protected void drawRouteMachine(int machine, java.awt.Graphics g)
public static void main(java.lang.String[] args)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |