|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--VASSAL.build.AbstractBuildable
|
+--VASSAL.build.AbstractConfigurable
|
+--VASSAL.build.Widget
|
+--VASSAL.build.widget.PieceSlot
A Component that displays a GamePiece.
Can be added to any Widget but cannot contain any children
Keyboard input on a PieceSlot is forwarded to the GamePiece.keyEvent(javax.swing.KeyStroke)
method for the PieceSlot's GamePiece. Clicking on a PieceSlot
initiates a drag
| Nested Class Summary |
| Nested classes inherited from class VASSAL.build.Widget |
Widget.MyCellRenderer |
| Nested classes inherited from class VASSAL.build.AutoConfigurable |
AutoConfigurable.Util |
| Field Summary | |
protected static java.awt.Font |
FONT
|
| Fields inherited from class VASSAL.build.Widget |
buildElement, NAME, parent |
| Fields inherited from class VASSAL.build.AbstractConfigurable |
changeSupport, config, name |
| Fields inherited from class VASSAL.build.AbstractBuildable |
buildComponents |
| Fields inherited from interface VASSAL.build.Configurable |
NAME_PROPERTY |
| Constructor Summary | |
PieceSlot()
|
|
PieceSlot(GamePiece p)
|
|
| Method Summary | |
void |
addTo(Buildable parent)
Adds this component to its parent. |
void |
build(org.w3c.dom.Element e)
When building a PieceSlot, the text contents of the XML element are parsed into a String. |
java.lang.Class[] |
getAllowableConfigureComponents()
The allowable Configurable components of a Widget are the same as its parent |
Configurer[] |
getAttributeConfigurers()
|
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 name)
Called by the getBuildElement(org.w3c.dom.Document) method to write the
attributes into an XML element |
org.w3c.dom.Element |
getBuildElement(org.w3c.dom.Document doc)
|
java.awt.Component |
getComponent()
|
Configurable[] |
getConfigureComponents()
|
java.lang.String |
getConfigureName()
The name of this Configurable Object |
Configurer |
getConfigurer()
The default Configurer of an AbstractConfigurable class is an instance of AutoConfigurer |
static java.lang.String |
getConfigureTypeName()
|
HelpFile |
getHelpFile()
|
GamePiece |
getPiece()
|
java.awt.Dimension |
getPreferredSize()
|
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
paint(java.awt.Graphics g)
|
void |
removeFrom(Buildable parent)
Remove this component from its parent |
void |
setAttribute(java.lang.String name,
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 |
setPiece(GamePiece p)
|
| Methods inherited from class VASSAL.build.Widget |
getParent, rebuild |
| Methods inherited from class VASSAL.build.AbstractConfigurable |
addPropertyChangeListener, getAttributeVisibility, remove, setConfigureName |
| Methods inherited from class VASSAL.build.AbstractBuildable |
add, getBuildComponents, getComponents |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface VASSAL.build.Buildable |
add |
| Field Detail |
protected static java.awt.Font FONT
| Constructor Detail |
public PieceSlot()
public PieceSlot(GamePiece p)
| Method Detail |
public void setPiece(GamePiece p)
public GamePiece getPiece()
public void paint(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic static java.lang.String getConfigureTypeName()
public java.awt.Component getComponent()
getComponent in class WidgetBuildable.build(org.w3c.dom.Element) methodpublic void build(org.w3c.dom.Element e)
GameModule.decode(java.lang.String). The resulting Command
should be an instance of AddPiece. The piece referred to
in the Command becomes the piece contained in the PieceSlot
build in interface Buildablebuild in class Widgete - the XML element containing the object datapublic void addTo(Buildable parent)
Buildable
addTo in interface BuildableaddTo in class Widgetpublic org.w3c.dom.Element getBuildElement(org.w3c.dom.Document doc)
getBuildElement in interface BuildablegetBuildElement in class Widgetpublic void removeFrom(Buildable parent)
Configurable
removeFrom in interface ConfigurableremoveFrom in class Widgetpublic java.lang.String getConfigureName()
Configurable
getConfigureName in interface ConfigurablegetConfigureName in class AbstractConfigurablepublic HelpFile getHelpFile()
getHelpFile in interface ConfigurablegetHelpFile in class Widgetpublic java.lang.String[] getAttributeNames()
getAttributeNames in interface AutoConfigurablegetAttributeNames in class AbstractBuildablepublic java.lang.String[] getAttributeDescriptions()
AbstractConfigurableAbstractBuildable.getAttributeNames()
getAttributeDescriptions in interface AutoConfigurablegetAttributeDescriptions in class AbstractConfigurablepublic java.lang.Class[] getAttributeTypes()
AbstractConfigurableAbstractBuildable.getAttributeNames()
getAttributeTypes in interface AutoConfigurablegetAttributeTypes in class AbstractConfigurable
public void setAttribute(java.lang.String name,
java.lang.Object value)
AutoConfigurableBuildable.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.
setAttribute in interface AutoConfigurablesetAttribute in class AbstractBuildablename - the name of the attribute. Will be one of those
listed in AbstractBuildable.getAttributeNames()public java.lang.String getAttributeValueString(java.lang.String name)
AutoConfigurableBuildable.getBuildElement(org.w3c.dom.Document) method to write the
attributes into an XML element
getAttributeValueString in interface AutoConfigurablegetAttributeValueString in class AbstractBuildablename - the name of the attribute. Will be one of those
listed in AbstractBuildable.getAttributeNames()public Configurer[] getAttributeConfigurers()
public Configurable[] getConfigureComponents()
getConfigureComponents in interface ConfigurablegetConfigureComponents in class Widgetpublic java.lang.Class[] getAllowableConfigureComponents()
Widget
getAllowableConfigureComponents in interface ConfigurablegetAllowableConfigureComponents in class Widgetpublic Configurer getConfigurer()
AbstractConfigurableConfigurer of an AbstractConfigurable class is an instance of AutoConfigurer
getConfigurer in interface ConfigurablegetConfigurer in class AbstractConfigurable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||