|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.vizzini.ui.game.AbstractEnvironmentUISwing
org.vizzini.ui.game.boardgame.AbstractGridBoardUISwing
public abstract class AbstractGridBoardUISwing
Provides base functionality for Swing grid board environment user interfaces in the game framework.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
LABEL_PAINTED_PROPERTY
Name of the label painted property. |
| 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.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 | |
|---|---|
AbstractGridBoardUISwing()
Construct this object. |
|
| Method Summary | |
|---|---|
void |
clearCurrentHighlight()
Clear the current highlight. |
void |
clearLastMoveHighlight()
Clear the last move highlight. |
void |
clearSelectionHighlight()
Clear the selection highlight. |
void |
configure(Properties properties)
Configure this environment. |
protected void |
fillAdditionalViewMenuItems(JMenu viewMenu)
Fill in additional view menu items. |
Color |
getBoardColor()
Return the board color. |
Color |
getCurrentColor()
Return the current color. |
int |
getCurrentHighlightWidth()
|
Color |
getFirstColor()
Return the first color. |
Color |
getGridLineColor()
Return the grid line color. |
Color |
getLabelColor()
Return the label color. |
Color |
getLastMoveColor()
Return the last move color. |
int |
getLastMoveHighlightWidth()
|
protected AudioClip |
getPlacementAudioClip()
Return the placement audio clip. |
Color |
getSecondColor()
Return the second color. |
Color |
getSelectionColor()
Return the selection color. |
protected HighlightData |
getSelectionHighlightData()
|
int |
getSelectionHighlightWidth()
|
void |
highlightCurrentPosition(IntegerPosition position)
Set the current position. |
void |
highlightLastMovePosition(IntegerPosition position)
Highlight the given position. |
void |
highlightSelectedPosition(IntegerPosition selectedPosition)
Set the selected position. |
boolean |
isLabelPainted()
Return true if the label painted flag is true. |
protected boolean |
isPositionUsable(IntegerPosition position)
Return true if the given position is usable. |
protected abstract void |
reconcileBoard(IGridBoard board)
Reconcile the token UIs with the real board environment. |
void |
setBoardColor(Color color)
Set the board color. |
void |
setCurrentColor(Color color)
Set the current color. |
protected void |
setCurrentHighlightData(HighlightData currentHighlightData)
|
void |
setCurrentHighlightWidth(int currentHighlightWidth)
|
void |
setFirstColor(Color color)
Set the first color. |
void |
setGridLineColor(Color color)
Set the grid line color. |
void |
setLabelColor(Color color)
Set the label color. |
void |
setLabelPainted(boolean isLabelPainted)
Set the label painted flag. |
void |
setLastMoveColor(Color color)
Set the last move color. |
void |
setLastMoveHighlightWidth(int lastMoveHighlightWidth)
|
void |
setSecondColor(Color color)
Set the second color. |
void |
setSelectionColor(Color color)
Set the selection color. |
protected void |
setSelectionHighlightData(HighlightData selectionHighlightData)
|
void |
setSelectionHighlightWidth(int selectionHighlightWidth)
|
void |
stateChange(StateEvent event)
Respond to state change events. |
| Methods inherited from class org.vizzini.ui.game.AbstractEnvironmentUISwing |
|---|
assignAgentListener, assignAgentListeners, getEnvironment, getSupport, init, isAudioOn, removeAgentListener, removeAgentListeners, reset, scoreChange, setAudioOn, setEnvironment |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.vizzini.ui.game.boardgame.IGridBoardUISwing |
|---|
add, clearHighlights, getPositionForPoint, remove |
| Methods inherited from interface org.vizzini.ui.game.IEnvironmentUI |
|---|
assignAgentListeners, getEnvironment, isAudioOn, removeAgentListeners, reset, setAudioOn, setEnvironment |
| Methods inherited from interface org.vizzini.game.event.IScoreListener |
|---|
scoreChange |
| Field Detail |
|---|
public static final String LABEL_PAINTED_PROPERTY
| Constructor Detail |
|---|
public AbstractGridBoardUISwing()
| Method Detail |
|---|
public void clearCurrentHighlight()
clearCurrentHighlight in interface IGridBoardUISwingpublic void clearLastMoveHighlight()
clearLastMoveHighlight in interface IGridBoardUISwingpublic void clearSelectionHighlight()
clearSelectionHighlight in interface IGridBoardUISwing
public void configure(Properties properties)
throws InstantiationException,
IllegalAccessException
configure in interface IEnvironmentUIconfigure in class AbstractEnvironmentUISwingproperties - Source of configuration information.
InstantiationException
IllegalAccessExceptionpublic Color getBoardColor()
getBoardColor in interface IGridBoardUISwingpublic Color getCurrentColor()
getCurrentColor in interface IGridBoardUISwingpublic int getCurrentHighlightWidth()
getCurrentHighlightWidth in interface IGridBoardUISwingpublic Color getFirstColor()
getFirstColor in interface IGridBoardUISwingpublic Color getGridLineColor()
getGridLineColor in interface IGridBoardUISwingpublic Color getLabelColor()
getLabelColor in interface IGridBoardUISwingpublic Color getLastMoveColor()
getLastMoveColor in interface IGridBoardUISwingpublic int getLastMoveHighlightWidth()
getLastMoveHighlightWidth in interface IGridBoardUISwingpublic Color getSecondColor()
getSecondColor in interface IGridBoardUISwingpublic Color getSelectionColor()
getSelectionColor in interface IGridBoardUISwingpublic int getSelectionHighlightWidth()
getSelectionHighlightWidth in interface IGridBoardUISwingpublic void highlightCurrentPosition(IntegerPosition position)
highlightCurrentPosition in interface IGridBoardUISwingpublic void highlightLastMovePosition(IntegerPosition position)
highlightLastMovePosition in interface IGridBoardUISwingpublic void highlightSelectedPosition(IntegerPosition selectedPosition)
highlightSelectedPosition in interface IGridBoardUISwingpublic boolean isLabelPainted()
isLabelPainted in interface IGridBoardUISwingpublic void setBoardColor(Color color)
setBoardColor in interface IGridBoardUISwingpublic void setCurrentColor(Color color)
setCurrentColor in interface IGridBoardUISwingpublic void setCurrentHighlightWidth(int currentHighlightWidth)
setCurrentHighlightWidth in interface IGridBoardUISwingcurrentHighlightWidth - The currentHighlightWidth to set.public void setFirstColor(Color color)
setFirstColor in interface IGridBoardUISwingpublic void setGridLineColor(Color color)
setGridLineColor in interface IGridBoardUISwingpublic void setLabelColor(Color color)
setLabelColor in interface IGridBoardUISwingpublic void setLabelPainted(boolean isLabelPainted)
setLabelPainted in interface IGridBoardUISwingpublic void setLastMoveColor(Color color)
setLastMoveColor in interface IGridBoardUISwingpublic void setLastMoveHighlightWidth(int lastMoveHighlightWidth)
setLastMoveHighlightWidth in interface IGridBoardUISwinglastMoveHighlightWidth - The lastMoveHighlightWidth to set.public void setSecondColor(Color color)
setSecondColor in interface IGridBoardUISwingpublic void setSelectionColor(Color color)
setSelectionColor in interface IGridBoardUISwingpublic void setSelectionHighlightWidth(int selectionHighlightWidth)
setSelectionHighlightWidth in interface IGridBoardUISwingselectionHighlightWidth - The selectionHighlightWidth to set.public void stateChange(StateEvent event)
stateChange in interface IStateListenerprotected abstract void reconcileBoard(IGridBoard board)
board - The current board environment.protected void fillAdditionalViewMenuItems(JMenu viewMenu)
viewMenu - View menu.protected AudioClip getPlacementAudioClip()
protected HighlightData getSelectionHighlightData()
protected boolean isPositionUsable(IntegerPosition position)
protected void setCurrentHighlightData(HighlightData currentHighlightData)
currentHighlightData - The currentHighlightData to set.protected void setSelectionHighlightData(HighlightData selectionHighlightData)
selectionHighlightData - The selectionHighlightData to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |