|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--cad.simcad.pathfinding.ui.map.MapDisplayer | +--cad.simcad.pathfinding.ui.map.MapFieldPanel
This is the panel with the map. It implements the MapEventListener interface
Field Summary |
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 | |
MapFieldPanel(AStarInterface frame,
UIMediator uim,
SimMediator sm)
Creates new form MapFieldPanel |
Method Summary | |
void |
addObject(PathPlace pp)
|
void |
blankMap()
|
void |
cellRightClicked(GridCell gc)
|
void |
cellSelected(GridCell gc)
|
void |
computePath()
|
void |
computePath(PathUser pu,
PathPlace origin,
PathPlace dest)
|
void |
computeProductivePath(PathUser pu,
PathPlace origin,
PathPlace dest)
|
boolean |
drawBorder()
|
int |
getActiveControlTabbed()
|
int |
getBottomY()
|
boolean |
getDoWork()
|
java.awt.Color |
getFillerColor(Filler fil)
|
java.awt.Image |
getFillerImage(Filler fil)
|
Filler |
getFillerTypeSelected()
|
GridCell |
getFinishCell()
|
java.awt.Dimension |
getMinimumSize()
|
int |
getMode()
|
SimObject |
getObject(MapUnit mu)
Returns the Object (possibly null) on the MapUnit mu |
java.awt.Image |
getObjectImage(SimObject so)
|
java.awt.Dimension |
getPreferredScrollableViewportSize()
|
java.awt.Dimension |
getPreferredSize()
|
AbstractMap |
getRenderedMap()
|
int |
getRightX()
|
int |
getScrollableBlockIncrement(java.awt.Rectangle rectangle,
int param,
int param2)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(java.awt.Rectangle rectangle,
int param,
int param2)
|
Filler |
getSelectedFiller()
|
PathUser |
getSelectedPathUser()
Returns the a new instance PathUser selected in the user interface |
Selection |
getSelection()
Return emptry selection |
GridCell |
getStartCell()
|
UIMediator |
getUIMed()
Returns the UIMediator |
int |
getViewableHeight()
|
int |
getViewableWidth()
|
int |
getXCentered()
|
int |
getYCentered()
|
boolean |
isShowValues()
|
boolean |
isStartSet()
|
boolean |
isThereObject(MapUnit pu)
|
void |
mapPlaceStateChanged(PathPlaceEvent p)
|
void |
newMapOpened(AbstractMap am)
|
void |
noticeModeChange(java.lang.String s)
|
void |
noticeMouseReleased()
|
void |
pathComputed(AbstractMapEvent p)
This method deal with the event of a computed path, fired by an AbstractMap The AbstractMapEvent object has the computed path |
void |
redoLastAction()
|
void |
refreshAllCells()
|
void |
resetAllCells()
Reset all the cells of the map object this container is rendering We call the resetAllCells on the map object |
void |
resetFinishCell()
|
void |
resetPathCells()
|
void |
resetStartCell()
|
void |
setDoWork(boolean doWork)
|
void |
setDrawBorder(boolean b)
|
void |
setEditMode(int mode)
|
void |
setFinishCell(GridCell gc)
|
void |
setShowCoordinate(boolean b)
|
void |
setShowValues(boolean b)
|
void |
setSizeOfCells(int value)
|
void |
setStartCell(GridCell gc)
According to flag, if flag is true Set the GridCell given in parameter as the starting cell if flag is false Set the GridCell as a normal cell |
boolean |
showCoordinate()
|
boolean |
showFillerImages()
|
void |
shwErrMsg(java.lang.String err)
|
void |
updateAllVisualComponents()
|
void |
updateMiniMap()
|
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MapFieldPanel(AStarInterface frame, UIMediator uim, SimMediator sm)
Method Detail |
public void setShowValues(boolean b)
setShowValues
in class MapDisplayer
public boolean isShowValues()
public UIMediator getUIMed()
public SimObject getObject(MapUnit mu)
public java.awt.Image getFillerImage(Filler fil)
public java.awt.Image getObjectImage(SimObject so)
public void cellSelected(GridCell gc)
public void cellRightClicked(GridCell gc)
public void addObject(PathPlace pp)
public void newMapOpened(AbstractMap am)
newMapOpened
in interface MapUIEventListener
newMapOpened
in class MapDisplayer
public boolean isThereObject(MapUnit pu)
public void updateAllVisualComponents()
public void updateMiniMap()
public void shwErrMsg(java.lang.String err)
public java.awt.Color getFillerColor(Filler fil)
public boolean showFillerImages()
public int getRightX()
getRightX
in class MapDisplayer
public int getBottomY()
getBottomY
in class MapDisplayer
public int getXCentered()
getXCentered
in class MapDisplayer
public int getYCentered()
getYCentered
in class MapDisplayer
public int getViewableWidth()
getViewableWidth
in class MapDisplayer
public int getViewableHeight()
getViewableHeight
in class MapDisplayer
public boolean drawBorder()
public void setDrawBorder(boolean b)
setDrawBorder
in class MapDisplayer
public void setSizeOfCells(int value)
setSizeOfCells
in class MapDisplayer
public void setShowCoordinate(boolean b)
setShowCoordinate
in class MapDisplayer
public boolean showCoordinate()
showCoordinate
in class MapDisplayer
public GridCell getStartCell()
public GridCell getFinishCell()
public void setStartCell(GridCell gc)
public void setFinishCell(GridCell gc)
public void resetStartCell()
public void resetFinishCell()
public void blankMap()
blankMap
in class MapDisplayer
public void resetAllCells()
resetAllCells
in class MapDisplayer
public void resetPathCells()
public void refreshAllCells()
public void computePath()
computePath
in class MapDisplayer
public void computePath(PathUser pu, PathPlace origin, PathPlace dest)
public void computeProductivePath(PathUser pu, PathPlace origin, PathPlace dest)
public boolean isStartSet()
isStartSet
in class MapDisplayer
public PathUser getSelectedPathUser()
getSelectedPathUser
in class MapDisplayer
public Filler getSelectedFiller()
public void noticeMouseReleased()
noticeMouseReleased
in class MapDisplayer
public void setDoWork(boolean doWork)
public boolean getDoWork()
public int getActiveControlTabbed()
public int getMode()
getMode
in class MapDisplayer
public void setEditMode(int mode)
setEditMode
in class MapDisplayer
public void noticeModeChange(java.lang.String s)
noticeModeChange
in class MapDisplayer
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class MapDisplayer
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class MapDisplayer
public Filler getFillerTypeSelected()
public AbstractMap getRenderedMap()
public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in interface javax.swing.Scrollable
public java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface javax.swing.Scrollable
public int getScrollableUnitIncrement(java.awt.Rectangle rectangle, int param, int param2)
getScrollableUnitIncrement
in interface javax.swing.Scrollable
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface javax.swing.Scrollable
public int getScrollableBlockIncrement(java.awt.Rectangle rectangle, int param, int param2)
getScrollableBlockIncrement
in interface javax.swing.Scrollable
public void pathComputed(AbstractMapEvent p)
pathComputed
in interface AbstractMapEventListener
public void mapPlaceStateChanged(PathPlaceEvent p)
mapPlaceStateChanged
in interface PathPlaceEventListener
public Selection getSelection()
getSelection
in class MapDisplayer
public void redoLastAction()
redoLastAction
in class MapDisplayer
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |