|
|||||||||||
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 | +--org.gjt.universe.gui.MapComponentJFC
MapComponentJFC.java Created: Thu Jun 10 10:04:47 1999 Modified: Sat Apr 28, 2001 (Dave Butler)
Nested Class Summary | |
(package private) class |
MapComponentJFC.MapMouseAdapter
|
(package private) class |
MapComponentJFC.MapMouseMotionAdapter
|
(package private) class |
MapComponentJFC.PopMenuFleetListener
|
(package private) class |
MapComponentJFC.PopMenuSystemListener
|
Field Summary | |
private MapDisplayOptions |
displayOptions
|
private ScreenObjectHandler |
fleetHandler
|
private java.util.Vector |
fleetLocations
|
private GUIMapJFC |
mainwindow
|
private DisplayMap |
mapInfo
|
private java.awt.Dimension |
offDimension
|
private java.awt.Graphics |
offGraphics
|
private java.awt.Image |
offImage
|
(package private) static int |
prevX
|
(package private) static int |
prevY
|
private static java.awt.Color |
RGB_000_000_100
|
private static java.awt.Color |
RGB_000_050_000
|
private static java.awt.Color |
RGB_000_100_000
|
private static java.awt.Color |
RGB_025_025_000
|
private static java.awt.Color |
RGB_050_000_050
|
private static java.awt.Color |
RGB_100_000_000
|
private static java.awt.Color |
RGB_100_100_000
|
private java.util.Vector |
screenObjectsList
|
private VectorSystemScreenCoord |
starLocations
|
private ScreenObjectHandler |
systemHandler
|
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.Container |
|
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 | |
(package private) |
MapComponentJFC(GUIMapJFC in,
DisplayMap dmap,
MapDisplayOptions in_options,
CivID player)
|
Method Summary | |
(package private) void |
clearFleetLocations()
|
(package private) void |
clearStarLocations()
|
Index |
getContext()
|
MapDisplayOptions |
getMapDisplayOptions()
|
(package private) FleetID[] |
getNearestFleet(int x,
int y,
int maxd)
|
(package private) SystemID |
getNearestSystem(int x,
int y,
int maxd)
Gets the nearest system to ScreenCoord x,y. |
(package private) void |
paintComponent()
Deprecated. Use repaint() instead |
void |
paintComponent(java.awt.Graphics g)
|
private void |
paintMap(java.awt.Graphics g)
|
(package private) void |
putFleetLocation(FleetID FID,
int x,
int y)
|
(package private) void |
putStarLocation(SystemScreenCoord SSC)
|
void |
setFleetHandler(ScreenObjectHandler FH)
|
void |
setSource(Coord center)
|
void |
setSystemHandler(ScreenObjectHandler SH)
|
void |
update(java.awt.Graphics g)
Updates this component. |
void |
update(java.util.Observable ob,
java.lang.Object o)
This method triggers a repaint whenever an observed object is changed. |
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, getMinimumSize, getNextFocusableComponent, getPreferredSize, 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, 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, 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 |
Field Detail |
private GUIMapJFC mainwindow
private VectorSystemScreenCoord starLocations
private java.util.Vector fleetLocations
private java.awt.Dimension offDimension
private java.awt.Image offImage
private java.awt.Graphics offGraphics
private java.util.Vector screenObjectsList
private MapDisplayOptions displayOptions
private DisplayMap mapInfo
private ScreenObjectHandler fleetHandler
private ScreenObjectHandler systemHandler
private static final java.awt.Color RGB_000_050_000
private static final java.awt.Color RGB_025_025_000
private static final java.awt.Color RGB_000_000_100
private static final java.awt.Color RGB_100_000_000
private static final java.awt.Color RGB_100_100_000
private static final java.awt.Color RGB_000_100_000
private static final java.awt.Color RGB_050_000_050
static int prevX
static int prevY
Constructor Detail |
MapComponentJFC(GUIMapJFC in, DisplayMap dmap, MapDisplayOptions in_options, CivID player)
Method Detail |
public void update(java.util.Observable ob, java.lang.Object o)
update
in interface java.util.Observer
public void update(java.awt.Graphics g)
update
in class javax.swing.JComponent
void paintComponent()
java.awt.Component.repaint()
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
private void paintMap(java.awt.Graphics g)
void clearStarLocations()
void putStarLocation(SystemScreenCoord SSC)
void clearFleetLocations()
void putFleetLocation(FleetID FID, int x, int y)
SystemID getNearestSystem(int x, int y, int maxd)
x
- the x-coordinate on StarMapComponenty
- the y-coordinate on StarMapComponentmaxd
- maximum distance (in pixels) to the system
FleetID[] getNearestFleet(int x, int y, int maxd)
public void setFleetHandler(ScreenObjectHandler FH)
public void setSystemHandler(ScreenObjectHandler SH)
public void setSource(Coord center)
public Index getContext()
public MapDisplayOptions getMapDisplayOptions()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |