org.vizzini.ui.game.boardgame
Interface IGridBoardUISwing

All Superinterfaces:
IEnvironmentUI, IGridBoardUI, IListener, IScoreListener, IStateListener
All Known Subinterfaces:
IGridBoard3DUISwing
All Known Implementing Classes:
AbstractGridBoardUISwing, AbstractGridBoardUISwing, DefaultGridBoard3DUISwing, DefaultGridBoardUISwing, GridBoard3DUISwing, GridBoardUISwing, GridBoardUISwing, GridBoardUISwing

public interface IGridBoardUISwing
extends IGridBoardUI

Defines methods required by grid board environment user interfaces in the game framework.

Color definitions:

boardColor
Main board color.
firstColor
Color of the square at (0, 0, 0), continuing in a checkerboard pattern.
secondColor
Color of the square at (1, 0, 0), continuing in a checkerboard pattern.
gridLineColor
Grid line color.
labelColor
Board notation label color.
currentColor
Current mouse position color.
lastMoveColor
Last move position color.
selectionColor
Currently selected position color.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
 void add(HighlightData highlightData)
          Add the given highlight data.
 void clearCurrentHighlight()
          Clear the current highlight.
 void clearHighlights()
          Clear the highlighted positions.
 void clearLastMoveHighlight()
          Clear the last move highlight.
 void clearSelectionHighlight()
          Clear the selection highlight.
 Color getBoardColor()
          Return the board color.
 Color getCurrentColor()
          Return the current color, used to indicate the current mouse position.
 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()
           
 IPosition getPositionForPoint(Point point)
          Map the screen coordinates to a board position.
 Color getSecondColor()
          Return the second color.
 Color getSelectionColor()
          Return the selection color.
 int getSelectionHighlightWidth()
           
 void highlightCurrentPosition(IntegerPosition position)
          Highlight the current position.
 void highlightLastMovePosition(IntegerPosition position)
          Highlight the given position.
 void highlightSelectedPosition(IntegerPosition position)
          Highlight the selected position.
 boolean isLabelPainted()
          Return true if the label painted flag is true.
 void remove(HighlightData highlightData)
          Remove the given highlight data.
 void setBoardColor(Color color)
          Set the board color.
 void setCurrentColor(Color color)
          Set the current color, used to indicate the current mouse position.
 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.
 void setSelectionHighlightWidth(int selectionHighlightWidth)
           
 
Methods inherited from interface org.vizzini.ui.game.IEnvironmentUI
assignAgentListeners, configure, getEnvironment, isAudioOn, removeAgentListeners, reset, setAudioOn, setEnvironment
 
Methods inherited from interface org.vizzini.game.event.IStateListener
stateChange
 
Methods inherited from interface org.vizzini.game.event.IScoreListener
scoreChange
 

Method Detail

add

void add(HighlightData highlightData)
Add the given highlight data.

Since:
v0.1

clearCurrentHighlight

void clearCurrentHighlight()
Clear the current highlight.

Since:
v0.3

clearHighlights

void clearHighlights()
Clear the highlighted positions.

Since:
v0.1

clearLastMoveHighlight

void clearLastMoveHighlight()
Clear the last move highlight.

Since:
v0.3

clearSelectionHighlight

void clearSelectionHighlight()
Clear the selection highlight.

Since:
v0.3

getBoardColor

Color getBoardColor()
Return the board color.

Since:
v0.2

getCurrentColor

Color getCurrentColor()
Return the current color, used to indicate the current mouse position.

Since:
v0.3

getCurrentHighlightWidth

int getCurrentHighlightWidth()
Returns:
Return currentHighlightWidth.
Since:
v0.3

getFirstColor

Color getFirstColor()
Return the first color.

Since:
v0.2

getGridLineColor

Color getGridLineColor()
Return the grid line color.

Since:
v0.2

getLabelColor

Color getLabelColor()
Return the label color.

Since:
v0.2

getLastMoveColor

Color getLastMoveColor()
Return the last move color.

Since:
v0.2

getLastMoveHighlightWidth

int getLastMoveHighlightWidth()
Returns:
Return lastMoveHighlightWidth.

getPositionForPoint

IPosition getPositionForPoint(Point point)
Map the screen coordinates to a board position.

Parameters:
point - A mouse click point.
Since:
v0.1

getSecondColor

Color getSecondColor()
Return the second color.

Since:
v0.2

getSelectionColor

Color getSelectionColor()
Return the selection color.

Since:
v0.2

getSelectionHighlightWidth

int getSelectionHighlightWidth()
Returns:
Return selectionHighlightWidth.
Since:
v0.2

highlightCurrentPosition

void highlightCurrentPosition(IntegerPosition position)
Highlight the current position.

Since:
v0.3

highlightLastMovePosition

void highlightLastMovePosition(IntegerPosition position)
Highlight the given position.

Since:
v0.2

highlightSelectedPosition

void highlightSelectedPosition(IntegerPosition position)
Highlight the selected position.

Since:
v0.2

isLabelPainted

boolean isLabelPainted()
Return true if the label painted flag is true.

Since:
v0.2

remove

void remove(HighlightData highlightData)
Remove the given highlight data.

Since:
v0.3

setBoardColor

void setBoardColor(Color color)
Set the board color.

Since:
v0.2

setCurrentColor

void setCurrentColor(Color color)
Set the current color, used to indicate the current mouse position.

Since:
v0.3

setCurrentHighlightWidth

void setCurrentHighlightWidth(int currentHighlightWidth)
Parameters:
currentHighlightWidth - The currentHighlightWidth to set.
Since:
v0.3

setFirstColor

void setFirstColor(Color color)
Set the first color.

Since:
v0.2

setGridLineColor

void setGridLineColor(Color color)
Set the grid line color.

Since:
v0.2

setLabelColor

void setLabelColor(Color color)
Set the label color.

Since:
v0.2

setLabelPainted

void setLabelPainted(boolean isLabelPainted)
Set the label painted flag.

Since:
v0.2

setLastMoveColor

void setLastMoveColor(Color color)
Set the last move color.

Since:
v0.2

setLastMoveHighlightWidth

void setLastMoveHighlightWidth(int lastMoveHighlightWidth)
Parameters:
lastMoveHighlightWidth - The lastMoveHighlightWidth to set.

setSecondColor

void setSecondColor(Color color)
Set the second color.

Since:
v0.2

setSelectionColor

void setSelectionColor(Color color)
Set the selection color.

Since:
v0.2

setSelectionHighlightWidth

void setSelectionHighlightWidth(int selectionHighlightWidth)
Parameters:
selectionHighlightWidth - The selectionHighlightWidth to set.
Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02