|
||||||||||
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 javax.swing.JPanel javax.media.opengl.awt.GLJPanel nl.tudelft.goal.ut2004.visualizer.map.MapGLPanel nl.tudelft.goal.ut2004.visualizer.map.SelectableMapGLPanel nl.tudelft.goal.ut2004.visualizer.map.PureMapGLPanel
public class PureMapGLPanel
Simple map that overviews what is happening in the level right now. It listens for changes in server.getAgents() and server.getNativeBots() for adding and removing bots from map. This is intended for one map only, it is not intended to handle change from one map to another, simply discard this, call destroy() and create a new one. This is panel that shows one particular map. After you are finished with using the class, please call destroy() to remove listeners, stops redrawing and do some other clean up.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Nested classes/interfaces inherited from interface javax.media.nativewindow.WindowClosingProtocol |
---|
javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode |
Field Summary | |
---|---|
protected cz.cuni.amis.pogamut.unreal.server.IUnrealServer |
server
Server on which we listen for changes in agents and bots |
Fields inherited from class nl.tudelft.goal.ut2004.visualizer.map.MapGLPanel |
---|
agentRenderes, environmentRenderer, lastGLName, mapController, mapRenderer, mapViewpoint, objectRenderes |
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 javax.media.opengl.GLAutoDrawable |
---|
SCREEN_CHANGE_ACTION_ENABLED |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
protected |
PureMapGLPanel(cz.cuni.amis.pogamut.unreal.communication.worldview.map.IUnrealMap map,
cz.cuni.amis.pogamut.unreal.server.IUnrealServer server)
|
Method Summary | |
---|---|
void |
destroy()
Remove listeners and basically clean up this map. |
void |
postAddEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> alreadyAdded,
Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereWereAdded)
Add renderers representing the agents to the map. |
void |
postRemoveEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> alreadyAdded,
Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereWereRemoved)
Do nothing |
void |
preAddEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> toBeAdded,
Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereToAdd)
Do nothing. |
void |
preRemoveEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> toBeRemoved,
Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereToRemove)
Remove renderers that represented the removed agents from the map |
void |
startDisplayLoop()
Start display loop |
void |
stopDisplayLoop()
Stop display loop |
Methods inherited from class nl.tudelft.goal.ut2004.visualizer.map.SelectableMapGLPanel |
---|
getSelectionHandler, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, setSelectionHandler |
Methods inherited from class nl.tudelft.goal.ut2004.visualizer.map.MapGLPanel |
---|
getMap, getObjectsAt, onChangedViewpoint |
Methods inherited from class javax.media.opengl.awt.GLJPanel |
---|
addGLEventListener, addGLEventListener, addNotify, createContext, display, dispose, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getDefaultCloseOperation, getDelegatedDrawable, getFactory, getGL, getGLProfile, getHandle, getNativeSurface, getThreadName, getUpstreamWidget, invoke, isRealized, paintComponent, removeGLEventListener, removeGLEventListener, removeNotify, reshape, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setDefaultCloseOperation, setGL, setOpaque, setRealized, shouldPreserveColorBufferIfTranslucent, swapBuffers, toString |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.media.opengl.awt.AWTGLAutoDrawable |
---|
repaint, setSize |
Methods inherited from interface javax.media.opengl.GLDrawable |
---|
getHeight, getWidth |
Methods inherited from interface javax.media.opengl.awt.ComponentEvents |
---|
addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
protected cz.cuni.amis.pogamut.unreal.server.IUnrealServer server
Constructor Detail |
---|
protected PureMapGLPanel(cz.cuni.amis.pogamut.unreal.communication.worldview.map.IUnrealMap map, cz.cuni.amis.pogamut.unreal.server.IUnrealServer server)
Method Detail |
---|
public void startDisplayLoop()
public void stopDisplayLoop()
public void preAddEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> toBeAdded, Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereToAdd)
preAddEvent
in interface cz.cuni.amis.utils.collections.CollectionEventListener<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>
toBeAdded
- whereToAdd
- public void postAddEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> alreadyAdded, Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereWereAdded)
postAddEvent
in interface cz.cuni.amis.utils.collections.CollectionEventListener<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>
alreadyAdded
- whereWereAdded
- public void preRemoveEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> toBeRemoved, Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereToRemove)
preRemoveEvent
in interface cz.cuni.amis.utils.collections.CollectionEventListener<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>
toBeRemoved
- whereToRemove
- public void postRemoveEvent(Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> alreadyAdded, Collection<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer> whereWereRemoved)
postRemoveEvent
in interface cz.cuni.amis.utils.collections.CollectionEventListener<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>
alreadyAdded
- whereWereRemoved
- public void destroy()
MapGLPanel
destroy
in interface javax.media.opengl.GLAutoDrawable
destroy
in class SelectableMapGLPanel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |