public class PebbleTheme extends NewTheme<PebbleInstance>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PEBBLE_THEME |
static int |
VERTEX_RADIUS |
Constructor and Description |
---|
PebbleTheme() |
Modifier and Type | Method and Description |
---|---|
void |
drawAnimation(java.awt.Graphics g2,
PebbleInstance game)
Defines how the Theme subclass should handle animation.
|
void |
drawSelectedVertex(java.awt.Graphics2D g2,
PebbleInstance game,
Vertex vertex)
Draws a vertex in its selected state using the overridden drawVertex method.
|
void |
drawVertex(java.awt.Graphics2D g,
PebbleInstance game,
Vertex v)
Dictates how a vertex should be drawn.
|
int[] |
getAnimationStage(Vertex v,
PebbleInstance game)
Return a number or set of numbers that identifies what stage of drawing animation this vertex is at.
|
int |
getBoundingHeight()
Defines the height of the box used to determine the clickable area of a vertex.
|
int |
getBoundingWidth()
Defines the width of the box used to determine the clickable area of a vertex.
|
int |
getDrawingHeight()
Defines the width of the drawable area of a vertex.
|
int |
getDrawingWidth()
Defines the width of the drawable area of a vertex.
|
java.awt.Color |
getEdgeColor(PebbleInstance game,
Vertex a,
Vertex b)
Defines the color used for drawing edges.
|
int |
getNumberAnimatingFrames() |
java.lang.String |
getThemeName() |
java.awt.Point |
getVertexCenter()
Defines the intended center point, relative to the origin (0, 0), on the image created by drawVertex.
|
void |
setupMoveAnimation(DoubleVertexEvent<?> event)
Assumes the event is a
|
draw, drawBWVertex, drawNormalVertex, drawTargetVertex, getAnimationFrame, getBrightnessFactor, getTheme, getVerticesSortedByY, isAnimatingConfig, isBlinkEdges, isDrawCurvyEdges, setAnimatingConfig, setAnimationFrame, setBlinkEdges, setDrawCurvyEdges, tick, tickIt
public static final int VERTEX_RADIUS
public static final java.lang.String PEBBLE_THEME
public int[] getAnimationStage(Vertex v, PebbleInstance game)
NewTheme
getAnimationStage
in class NewTheme<PebbleInstance>
game
- TODOpublic void drawVertex(java.awt.Graphics2D g, PebbleInstance game, Vertex v)
NewTheme
drawVertex
in class NewTheme<PebbleInstance>
g
- The graphics object to draw ongame
- The PuzzleInstance subclass containing game datav
- The vertex to be drawnpublic void drawSelectedVertex(java.awt.Graphics2D g2, PebbleInstance game, Vertex vertex)
NewTheme
drawSelectedVertex
in class NewTheme<PebbleInstance>
g2
- The graphics object to draw ongame
- The PuzzleInstance subclass containing game datavertex
- The vertex to be drawnpublic int getNumberAnimatingFrames()
getNumberAnimatingFrames
in class NewTheme<PebbleInstance>
public void drawAnimation(java.awt.Graphics g2, PebbleInstance game)
NewTheme
drawAnimation
in class NewTheme<PebbleInstance>
public void setupMoveAnimation(DoubleVertexEvent<?> event)
NewTheme
setupMoveAnimation
in class NewTheme<PebbleInstance>
public java.lang.String getThemeName()
getThemeName
in class NewTheme<PebbleInstance>
public java.awt.Point getVertexCenter()
NewTheme
getVertexCenter
in class NewTheme<PebbleInstance>
public int getBoundingHeight()
NewTheme
getBoundingHeight
in class NewTheme<PebbleInstance>
public int getBoundingWidth()
NewTheme
getBoundingWidth
in class NewTheme<PebbleInstance>
public int getDrawingHeight()
NewTheme
getDrawingHeight
in class NewTheme<PebbleInstance>
public int getDrawingWidth()
NewTheme
getDrawingWidth
in class NewTheme<PebbleInstance>
public java.awt.Color getEdgeColor(PebbleInstance game, Vertex a, Vertex b)
NewTheme
getEdgeColor
in class NewTheme<PebbleInstance>
game
- The PuzzleInstance subclass containing game dataa
- The first vertex connected by an edgeb
- The second vertex connected by this edge