|
|||||||||
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 infinitewisdom.view.GameWorldView
public abstract class GameWorldView
Nested Class Summary | |
---|---|
static class |
GameWorldView.GWVState
|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected boolean |
captureKeys
|
protected boolean |
cheat
|
protected CheatManagerIF |
cheatManager
Currenly only manages who can see a unit's goal. |
protected GameWorld |
gameWorld
|
protected GameWorldView.GWVState |
gwvstate
GameWorldView state. |
protected java.util.List<OverlayIF> |
overlays
|
protected PlayerIF |
player
|
protected java.util.List<PlayerView> |
playerViews
|
protected double |
scale
|
protected UnitView |
selectedUnitView
|
protected javax.swing.JPanel |
toppanel
|
protected Vec2f |
transIncrement
|
protected Vec2f |
translate
|
protected UnitControlPanel |
unitControlPanel
|
java.awt.Font |
unitlabels
Lazy |
protected java.util.List<UnitSelectionListener> |
unitListeners
|
protected UnitPalette |
unitPalette
|
protected java.util.List<UnitView> |
unitviews
|
protected ViewConfig |
viewConfig
|
protected double |
zoomRate
|
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 | |
---|---|
GameWorldView(GameWorld gw,
CheatManagerIF lp)
|
Method Summary | |
---|---|
void |
addUnitSelectionListener(UnitSelectionListener ul)
|
void |
createViewForNewUnits()
|
GameWorld |
getGameWorld()
|
java.util.List<OverlayIF> |
getOverlays()
|
PlayerIF |
getPlayer()
|
java.util.List<PlayerView> |
getPlayerViews()
|
double |
getScale()
|
UnitView |
getSelectedUnitView()
|
javax.swing.JPanel |
getToppanel()
|
Vec2f |
getTranslate()
|
java.util.List<UnitView> |
getUnitviews()
|
ViewConfig |
getViewConfig()
|
boolean |
isCaptureKeys()
|
boolean |
isCheat()
|
void |
overlaytest(java.awt.Graphics graphics)
Deprecated. |
void |
paint(java.awt.Graphics g)
|
void |
scrollDown()
|
void |
scrollLeft()
|
void |
scrollRight()
|
void |
scrollUp()
|
void |
setCaptureKeys(boolean captureKeys)
|
void |
setCheat(boolean cheat)
|
void |
setPlayer(PlayerIF player)
|
void |
setPlayerViews(java.util.List<PlayerView> playerViews)
|
void |
setScale(double scale)
|
void |
setState(GameWorldView.GWVState st)
Used by UnitControlPanel, when it gives back the control to GameWorldView. |
void |
setToppanel(javax.swing.JPanel toppanel)
|
void |
setTranslate(Vec2f translate)
|
void |
setUnitControlPanel(UnitControlPanel controlPanel)
|
void |
setUnitPalette(UnitPalette unitPalette)
|
protected void |
signalUnitSelected()
|
Vec2f |
UIToWorldCoord(java.awt.Point p)
|
UnitView |
unitSelector(java.awt.Point p)
|
java.awt.Point |
WorldToUICoord(Vec2f v)
|
void |
zoomin()
|
void |
zoomout()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, firePropertyChange, 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, hide, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ViewConfig viewConfig
protected double scale
protected Vec2f translate
protected Vec2f transIncrement
protected final double zoomRate
public java.awt.Font unitlabels
protected GameWorld gameWorld
protected java.util.List<PlayerView> playerViews
protected java.util.List<UnitView> unitviews
protected java.util.List<UnitSelectionListener> unitListeners
protected UnitView selectedUnitView
protected CheatManagerIF cheatManager
protected PlayerIF player
protected UnitControlPanel unitControlPanel
protected javax.swing.JPanel toppanel
protected UnitPalette unitPalette
protected boolean cheat
protected boolean captureKeys
protected GameWorldView.GWVState gwvstate
protected java.util.List<OverlayIF> overlays
Constructor Detail |
---|
public GameWorldView(GameWorld gw, CheatManagerIF lp)
Method Detail |
---|
public boolean isCaptureKeys()
public void setCaptureKeys(boolean captureKeys)
public UnitView unitSelector(java.awt.Point p)
public void setState(GameWorldView.GWVState st)
public Vec2f UIToWorldCoord(java.awt.Point p)
public java.awt.Point WorldToUICoord(Vec2f v)
protected void signalUnitSelected()
public java.util.List<PlayerView> getPlayerViews()
public void setPlayerViews(java.util.List<PlayerView> playerViews)
public Vec2f getTranslate()
public void setTranslate(Vec2f translate)
public double getScale()
public void setScale(double scale)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void overlaytest(java.awt.Graphics graphics)
graphics
- public void addUnitSelectionListener(UnitSelectionListener ul)
public void setUnitControlPanel(UnitControlPanel controlPanel)
public javax.swing.JPanel getToppanel()
public void setToppanel(javax.swing.JPanel toppanel)
public GameWorld getGameWorld()
public PlayerIF getPlayer()
public void setPlayer(PlayerIF player)
public void zoomin()
public void zoomout()
public void scrollLeft()
public void scrollRight()
public void scrollUp()
public void scrollDown()
public java.util.List<OverlayIF> getOverlays()
public boolean isCheat()
public void setCheat(boolean cheat)
public void createViewForNewUnits()
public ViewConfig getViewConfig()
public void setUnitPalette(UnitPalette unitPalette)
public java.util.List<UnitView> getUnitviews()
public UnitView getSelectedUnitView()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |