VASSAL.build.module
Class PrivateMap

java.lang.Object
  |
  +--VASSAL.build.AbstractBuildable
        |
        +--VASSAL.build.AbstractConfigurable
              |
              +--VASSAL.build.module.Map
                    |
                    +--VASSAL.build.module.PrivateMap
All Implemented Interfaces:
AutoConfigurable, Buildable, Configurable, java.awt.dnd.DropTargetListener, java.util.EventListener, java.awt.event.FocusListener, GameComponent, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, UniqueIdManager.Identifyable, ValidityChecker
Direct Known Subclasses:
PlayerHand

public class PrivateMap
extends Map

A Map that may be configured to be visible only a particular side. If visible to all, the map will respond to key/mouse events only from the player playing the assigned side


Inner Class Summary
static class PrivateMap.View
           
 
Inner classes inherited from class VASSAL.build.module.Map
Map.ChangeFormatConfig, Map.CreateFormatConfig, Map.IconConfig, Map.MoveToFormatConfig, Map.MoveWithinFormatConfig, Map.UnmovedIconConfig, Map.View
 
Inner classes inherited from class VASSAL.build.AutoConfigurable
AutoConfigurable.Util
 
Field Summary
static java.lang.String SIDE
           
static java.lang.String USE_BOARDS
           
static java.lang.String VISIBLE
           
 
Fields inherited from class VASSAL.build.module.Map
ALLOW_MULTIPLE, boards, BUTTON_NAME, CHANGE_FORMAT, CREATE_FORMAT, EDGE_HEIGHT, EDGE_WIDTH, edgeBuffer, HIGHLIGHT_COLOR, HIGHLIGHT_THICKNESS, highlighter, HOTKEY, ICON, launchButton, LOCATION, mainWindowDock, MAP_NAME, MARK_MOVED, MARK_UNMOVED_ICON, markMovedOption, markUnmovedIcon, MESSAGE, metrics, mouseListenerStack, MOVE_TO_FORMAT, MOVE_WITHIN_FORMAT, multicaster, NAME, OLD_LOCATION, OLD_MAP, picker, PIECE_NAME, pieces, scroll, SUPPRESS_AUTO, theMap, toolBar, USE_LAUNCH_BUTTON, useLaunchButton, zoom
 
Fields inherited from class VASSAL.build.AbstractConfigurable
changeSupport, config, name
 
Fields inherited from class VASSAL.build.AbstractBuildable
buildComponents, validator
 
Fields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY
 
Constructor Summary
PrivateMap()
           
 
Method Summary
 void build(org.w3c.dom.Element el)
          Build the object
protected  java.awt.Window createParentFrame()
           
 java.lang.String[] getAttributeDescriptions()
          Return an array of Strings describing the attributes of this object.
 java.lang.String[] getAttributeNames()
           
 java.lang.Class[] getAttributeTypes()
          Return the Class for the attributes of this object.
 java.lang.String getAttributeValueString(java.lang.String key)
          Called by the AbstractBuildable.getBuildElement(org.w3c.dom.Document) method to write the attributes into an XML element
static java.lang.String getConfigureTypeName()
           
 HelpFile getHelpFile()
           
 javax.swing.JComponent getView()
          Return the AWT component representing the map
 boolean isAccessibleTo(java.lang.String playerSide)
          Return true if the player playing the given side can access this map
 void setAttribute(java.lang.String key, java.lang.Object value)
          Called by the build(org.w3c.dom.Element) method, where value is the String value read by the XML attribute.
 void setBoards(java.util.Enumeration boardList)
          Set the boards for this map.
 void setup(boolean show)
          When a game is started, create a top-level window, if none exists.
 boolean shouldDockIntoMainWindow()
           
 
Methods inherited from class VASSAL.build.module.Map
addDrawComponent, addLocalMouseListener, addPiece, addTo, appendToTitle, apply, boundingBoxOf, centerAt, centerAt, clearMapBorder, componentCoordinates, componentRectangle, dragEnter, dragExit, dragOver, drawBoards, drawBoardsInRegion, drawDrawable, drawPieces, drawPiecesInRegion, drop, dropActionChanged, ensureVisible, findBoard, findPiece, focusGained, focusLost, getAllBoards, getAllowableConfigureComponents, getAttributeVisibility, getBoardByName, getBoardCount, getBoardPicker, getChangeFormat, getCreateFormat, getDeckNameAt, getDeckNameContaining, getDefaultWindowTitle, getDragGestureListener, getEdgeBuffer, getFullLocationName, getHighlighter, getId, getIdentifier, getMapById, getMapName, getMoveToFormat, getMoveWithinFormat, getPieceCollection, getPieces, getPreferredSize, getRestoreCommand, getStackMetrics, getToolBar, getZoom, getZoomer, indexOf, isPiecesVisible, isSnappable, isVisibleToAll, locationName, mapCoordinates, mapRectangle, mapSize, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, paint, paintRegion, placeAt, placeOrMerge, popMouseListener, pushMouseListener, removeDrawComponent, removeFrom, removeLocalMouseListener, removePiece, repaint, repaint, repaint, reposition, scroll, scrollAtEdge, selectionBoundsOf, setBoardBoundaries, setBoardPicker, setDragGestureListener, setHighlighter, setId, setMapName, setPieceCollection, setPiecesVisible, setStackMetrics, setZoomer, snapTo
 
Methods inherited from class VASSAL.build.AbstractConfigurable
addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, remove, setConfigureName
 
Methods inherited from class VASSAL.build.AbstractBuildable
add, getBuildComponents, getBuildElement, getComponents, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface VASSAL.build.Configurable
addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, remove
 
Methods inherited from interface VASSAL.build.Buildable
add, getBuildElement
 
Methods inherited from interface VASSAL.tools.UniqueIdManager.Identifyable
getConfigureName
 

Field Detail

VISIBLE

public static final java.lang.String VISIBLE

SIDE

public static final java.lang.String SIDE

USE_BOARDS

public static final java.lang.String USE_BOARDS
Constructor Detail

PrivateMap

public PrivateMap()
Method Detail

getAttributeNames

public java.lang.String[] getAttributeNames()
Overrides:
getAttributeNames in class Map
Following copied from interface: VASSAL.build.AutoConfigurable
Returns:
an array of Strings giving all attributes of this Buildable component that will be written to/read from an XML element

getAttributeDescriptions

public java.lang.String[] getAttributeDescriptions()
Description copied from class: AbstractConfigurable
Return an array of Strings describing the attributes of this object. These strings are used as prompts in the Properties window for this object. The order of descriptions should be the same as the order of names in AbstractBuildable.getAttributeNames()
Overrides:
getAttributeDescriptions in class Map

getAttributeTypes

public java.lang.Class[] getAttributeTypes()
Description copied from class: AbstractConfigurable
Return the Class for the attributes of this object. Valid classes are: String, Integer, Double, Boolean, Image, Color, and KeyStroke The order of classes should be the same as the order of names in AbstractBuildable.getAttributeNames()
Overrides:
getAttributeTypes in class Map

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Description copied from interface: AutoConfigurable
Called by the Buildable.build(org.w3c.dom.Element) method, where value is the String value read by the XML attribute. Can also be called with Object value to set the attribute.
Overrides:
setAttribute in class Map
Following copied from class: VASSAL.build.AbstractBuildable
Parameters:
key - the name of the attribute. Will be one of those listed in AbstractBuildable.getAttributeNames()

getAttributeValueString

public java.lang.String getAttributeValueString(java.lang.String key)
Description copied from interface: AutoConfigurable
Called by the Buildable.getBuildElement(org.w3c.dom.Document) method to write the attributes into an XML element
Overrides:
getAttributeValueString in class Map
Following copied from class: VASSAL.build.AbstractBuildable
Parameters:
key - the name of the attribute. Will be one of those listed in AbstractBuildable.getAttributeNames()

createParentFrame

protected java.awt.Window createParentFrame()
Overrides:
createParentFrame in class Map
Following copied from class: VASSAL.build.module.Map
Returns:
the top-level window containing this map

shouldDockIntoMainWindow

public boolean shouldDockIntoMainWindow()
Overrides:
shouldDockIntoMainWindow in class Map

isAccessibleTo

public boolean isAccessibleTo(java.lang.String playerSide)
Return true if the player playing the given side can access this map
See Also:
PlayerRoster

setup

public void setup(boolean show)
Description copied from class: Map
When a game is started, create a top-level window, if none exists. When a game is ended, remove all boards from the map
Overrides:
setup in class Map
Following copied from class: VASSAL.build.module.Map
See Also:
GameComponent

setBoards

public void setBoards(java.util.Enumeration boardList)
Description copied from class: Map
Set the boards for this map. Each map may contain more than one Board
Overrides:
setBoards in class Map

getView

public javax.swing.JComponent getView()
Description copied from class: Map
Return the AWT component representing the map
Overrides:
getView in class Map

getConfigureTypeName

public static java.lang.String getConfigureTypeName()

getHelpFile

public HelpFile getHelpFile()
Overrides:
getHelpFile in class Map
Following copied from interface: VASSAL.build.Configurable
Returns:
a HelpFilte describing how to use and configure this component

build

public void build(org.w3c.dom.Element el)
Description copied from interface: Buildable
Build the object
Overrides:
build in class Map
Following copied from interface: VASSAL.build.Buildable
Parameters:
e - the XML element containing the object data