VASSAL.build.module.map
Class DrawPile

java.lang.Object
  |
  +--VASSAL.build.AbstractBuildable
        |
        +--VASSAL.build.AbstractConfigurable
              |
              +--VASSAL.build.module.map.SetupStack
                    |
                    +--VASSAL.build.module.map.DrawPile
All Implemented Interfaces:
AutoConfigurable, Buildable, Configurable, GameComponent, UniqueIdManager.Identifyable, ValidityChecker

public class DrawPile
extends SetupStack


Inner Class Summary
static class DrawPile.AssignedDeckPrompt
          generates a prompt with the names of all decks already defined
static class DrawPile.FormattedStringConfig
           
static class DrawPile.Prompt
           
 
Inner classes inherited from class VASSAL.build.module.map.SetupStack
SetupStack.OwningBoardPrompt
 
Inner classes inherited from class VASSAL.build.AutoConfigurable
AutoConfigurable.Util
 
Field Summary
static java.lang.String ALLOW_MULTIPLE
           
static java.lang.String ALLOW_SELECT
           
static java.lang.String ALWAYS
           
static java.lang.String COLOR
           
static java.lang.String COMMAND_NAME
           
static java.lang.String DECK_NAME
           
static java.lang.String DRAW
           
static java.lang.String DRAW_FACE_UP
           
protected  Deck dummy
           
static java.lang.String FACE_DOWN
           
static java.lang.String FACE_DOWN_REPORT_FORMAT
           
static java.lang.String HEIGHT
           
static java.lang.String NEVER
           
static java.lang.String REPORT_FORMAT
           
static java.lang.String RESHUFFLABLE
           
static java.lang.String RESHUFFLE_COMMAND
           
static java.lang.String RESHUFFLE_MESSAGE
           
static java.lang.String RESHUFFLE_TARGET
           
static java.lang.String REVERSE_REPORT_FORMAT
           
static java.lang.String REVERSIBLE
           
static java.lang.String SHUFFLE
           
static java.lang.String SHUFFLE_REPORT_FORMAT
           
static java.lang.String USE_MENU
           
static java.lang.String WIDTH
           
 
Fields inherited from class VASSAL.build.module.map.SetupStack
COMMAND_PREFIX, id, map, NAME, OWNING_BOARD, owningBoardName, pos, X_POSITION, Y_POSITION
 
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
DrawPile()
           
 
Method Summary
 void addTo(Buildable parent)
          Adds this component to its parent.
 Command addToContents(GamePiece p)
           
 java.awt.Rectangle boundingBox()
           
protected  javax.swing.JPopupMenu buildPopup()
           
static DrawPile findDrawPile(java.lang.String id)
          Return the DrawPile instance with the matching id or name
 java.lang.Class[] getAllowableConfigureComponents()
          Return a list of valid sub-component Classes.
 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
 VisibilityCondition getAttributeVisibility(java.lang.String name)
          By default, all attributes are visible
static java.lang.String getConfigureTypeName()
           
 HelpFile getHelpFile()
           
 Map getMap()
           
 java.awt.Point getPosition()
           
protected  Stack initializeContents()
           
protected  boolean placeNonStackingSeparately()
           
 void setAttribute(java.lang.String key, java.lang.Object value)
          Called by the AbstractBuildable.build(org.w3c.dom.Element) method, where value is the String value read by the XML attribute.
 
Methods inherited from class VASSAL.build.module.map.SetupStack
createStack, getConfigurer, getId, getRestoreCommand, isOwningBoardActive, removeFrom, setId, setup
 
Methods inherited from class VASSAL.build.AbstractConfigurable
addPropertyChangeListener, getConfigureComponents, getConfigureName, remove, setConfigureName
 
Methods inherited from class VASSAL.build.AbstractBuildable
add, build, 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.tools.UniqueIdManager.Identifyable
getConfigureName
 
Methods inherited from interface VASSAL.build.Buildable
add, build, getBuildElement
 

Field Detail

dummy

protected Deck dummy

WIDTH

public static final java.lang.String WIDTH

HEIGHT

public static final java.lang.String HEIGHT

ALLOW_MULTIPLE

public static final java.lang.String ALLOW_MULTIPLE

ALLOW_SELECT

public static final java.lang.String ALLOW_SELECT

FACE_DOWN

public static final java.lang.String FACE_DOWN

DRAW_FACE_UP

public static final java.lang.String DRAW_FACE_UP

FACE_DOWN_REPORT_FORMAT

public static final java.lang.String FACE_DOWN_REPORT_FORMAT

SHUFFLE

public static final java.lang.String SHUFFLE

SHUFFLE_REPORT_FORMAT

public static final java.lang.String SHUFFLE_REPORT_FORMAT

REVERSIBLE

public static final java.lang.String REVERSIBLE

REVERSE_REPORT_FORMAT

public static final java.lang.String REVERSE_REPORT_FORMAT

DRAW

public static final java.lang.String DRAW

COLOR

public static final java.lang.String COLOR

RESHUFFLABLE

public static final java.lang.String RESHUFFLABLE

RESHUFFLE_COMMAND

public static final java.lang.String RESHUFFLE_COMMAND

RESHUFFLE_TARGET

public static final java.lang.String RESHUFFLE_TARGET

RESHUFFLE_MESSAGE

public static final java.lang.String RESHUFFLE_MESSAGE

REPORT_FORMAT

public static final java.lang.String REPORT_FORMAT

ALWAYS

public static final java.lang.String ALWAYS

NEVER

public static final java.lang.String NEVER

USE_MENU

public static final java.lang.String USE_MENU

COMMAND_NAME

public static final java.lang.String COMMAND_NAME

DECK_NAME

public static final java.lang.String DECK_NAME
Constructor Detail

DrawPile

public DrawPile()
Method Detail

addTo

public void addTo(Buildable parent)
Description copied from interface: Buildable
Adds this component to its parent. In order to make Buildable objects extensible, the child is reponsible for adding itself to the parent. That way, Buildable subcomponents can be defined in an extension package without needing to modify the containing class.
Overrides:
addTo in class SetupStack

buildPopup

protected javax.swing.JPopupMenu buildPopup()

findDrawPile

public static DrawPile findDrawPile(java.lang.String id)
Return the DrawPile instance with the matching id or name
Parameters:
id - the Id or ConfigureName of the target DrawPile
Returns:
the matching DrawPile, or null if none found
See Also:
SetupStack.getId(), AbstractConfigurable.getConfigureName()

getAttributeNames

public java.lang.String[] getAttributeNames()
Overrides:
getAttributeNames in class SetupStack
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 SetupStack

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 SetupStack

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 SetupStack
Following copied from class: VASSAL.build.AbstractBuildable
Parameters:
key - the name of the attribute. Will be one of those listed in AbstractBuildable.getAttributeNames()

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 SetupStack
Following copied from class: VASSAL.build.AbstractBuildable
Parameters:
key - the name of the attribute. Will be one of those listed in AbstractBuildable.getAttributeNames()

getAttributeVisibility

public VisibilityCondition getAttributeVisibility(java.lang.String name)
Description copied from class: AbstractConfigurable
By default, all attributes are visible
Overrides:
getAttributeVisibility in class AbstractConfigurable
Following copied from class: VASSAL.build.AbstractConfigurable
Parameters:
name -  
Returns:
 

getAllowableConfigureComponents

public java.lang.Class[] getAllowableConfigureComponents()
Description copied from interface: Configurable
Return a list of valid sub-component Classes. If a Class appears in this list, then instances of that class may be added to this component from the Configuration Window.
Overrides:
getAllowableConfigureComponents in class SetupStack

getPosition

public java.awt.Point getPosition()

getMap

public Map getMap()

boundingBox

public java.awt.Rectangle boundingBox()

addToContents

public Command addToContents(GamePiece p)

initializeContents

protected Stack initializeContents()
Overrides:
initializeContents in class SetupStack

placeNonStackingSeparately

protected boolean placeNonStackingSeparately()
Overrides:
placeNonStackingSeparately in class SetupStack

getHelpFile

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

getConfigureTypeName

public static java.lang.String getConfigureTypeName()