|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--PlayerCanvas
Inner classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
private int |
ball_width
|
private java.awt.Color |
ballcolor
|
private int |
centre_x
|
private int |
centre_y
|
private int |
centrecircle_width
|
private java.awt.Color |
conecolor
|
InputHandler |
control
|
private java.awt.Polygon |
field
|
private java.util.Vector |
field_flags
|
private double |
field_length
|
private double |
field_width
|
private java.awt.Color |
fieldcolor
|
private int |
flag_width
|
private java.awt.Color |
flagcolor
|
private java.awt.Color |
goalcolor
|
private int |
goalpost_width
|
private int |
height
|
private int |
line_width
|
private java.awt.Color |
linecolor
|
private java.awt.Color |
opponentcolor
|
private double |
perspective_width
|
private int |
player_width
|
private int |
scale
|
private char |
side
|
private java.lang.String |
team
|
private java.awt.Color |
teamcolor
|
private int |
user_x
|
private int |
user_y
|
private int |
visible_dist
|
private java.util.Vector |
visuals
|
private int |
width
|
Fields inherited from class java.awt.Canvas |
base, nameCounter, serialVersionUID |
Fields inherited from class java.awt.Component |
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dbg, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, 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, windowClosingException, windowListenerK, x, y |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
PlayerCanvas()
|
Method Summary | |
private java.awt.Point |
calculatePoint(double distance,
double direction,
int width)
|
private void |
drawBall(BallInfo ball,
java.awt.Graphics g)
|
private void |
drawField(java.util.Vector m_flags,
java.awt.Graphics g)
|
private void |
drawFieldLine(LineInfo line,
java.awt.Graphics g)
|
private void |
drawFlag(FlagInfo flag,
java.awt.Graphics g)
|
private void |
drawGoalPost(FlagInfo goalpost,
java.awt.Graphics g)
|
private void |
drawLine(ObjectInfo flag_a,
ObjectInfo flag_b,
java.awt.Graphics g)
|
private void |
drawPlayer(PlayerInfo player,
java.awt.Graphics g)
|
java.awt.Point |
getUserCoordinates()
|
void |
paint(java.awt.Graphics g)
|
private ObjectInfo |
perpVCP(ObjectInfo origLine,
ObjectInfo cornerPoint,
boolean right)
|
private void |
setField(java.util.Vector m_objects)
|
void |
setObjects(java.util.Vector vobj)
|
void |
setSide(char s)
|
void |
setSquare(int w,
int h)
|
void |
setTeam(java.lang.String teamname)
|
private ObjectInfo |
vcPoint(ObjectInfo line,
boolean right)
|
Methods inherited from class java.awt.Canvas |
|
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkGD, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createChildHierarchyEvents, createHierarchyEvents, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initIDs, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, numListening, paintAll, paintHeavyweightComponents, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, readObject, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate, writeObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
private java.util.Vector visuals
private java.util.Vector field_flags
private int width
private int height
private int centre_x
private int centre_y
private java.awt.Polygon field
private double field_length
private double field_width
private double perspective_width
private java.lang.String team
private char side
private java.awt.Color goalcolor
private java.awt.Color ballcolor
private java.awt.Color opponentcolor
private java.awt.Color teamcolor
private java.awt.Color fieldcolor
private java.awt.Color linecolor
private java.awt.Color conecolor
private java.awt.Color flagcolor
private int user_x
private int user_y
private int ball_width
private int player_width
private int goalpost_width
private int line_width
private int flag_width
private int centrecircle_width
private int scale
private int visible_dist
public InputHandler control
Constructor Detail |
public PlayerCanvas()
Method Detail |
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
public void setObjects(java.util.Vector vobj)
private void setField(java.util.Vector m_objects)
public void setSquare(int w, int h)
public void setTeam(java.lang.String teamname)
public void setSide(char s)
private void drawGoalPost(FlagInfo goalpost, java.awt.Graphics g)
private void drawFlag(FlagInfo flag, java.awt.Graphics g)
private void drawField(java.util.Vector m_flags, java.awt.Graphics g)
private void drawLine(ObjectInfo flag_a, ObjectInfo flag_b, java.awt.Graphics g)
private void drawFieldLine(LineInfo line, java.awt.Graphics g)
private void drawBall(BallInfo ball, java.awt.Graphics g)
private void drawPlayer(PlayerInfo player, java.awt.Graphics g)
private ObjectInfo vcPoint(ObjectInfo line, boolean right)
private ObjectInfo perpVCP(ObjectInfo origLine, ObjectInfo cornerPoint, boolean right)
private java.awt.Point calculatePoint(double distance, double direction, int width)
public java.awt.Point getUserCoordinates()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |