From 51b7fbe822bd9a3804c061f0b844884769d7ddba Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Wed, 6 Jul 2011 16:36:06 +0200 Subject: Javadoc git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@609 72836036-5685-4462-b002-a69064685172 --- doc/jrummikub/view/impl/StonePainter.html | 599 ++++++++++++++++++++++++++++-- 1 file changed, 564 insertions(+), 35 deletions(-) (limited to 'doc/jrummikub/view/impl/StonePainter.html') diff --git a/doc/jrummikub/view/impl/StonePainter.html b/doc/jrummikub/view/impl/StonePainter.html index be9d94c..61a2c92 100644 --- a/doc/jrummikub/view/impl/StonePainter.html +++ b/doc/jrummikub/view/impl/StonePainter.html @@ -2,12 +2,12 @@ - + StonePainter - + @@ -56,7 +56,7 @@ function windowTitle()  PREV CLASS  - NEXT CLASSNEXT CLASS FRAMES    NO FRAMES   @@ -76,7 +76,7 @@ function windowTitle() - SUMMARY: NESTED | FIELD | CONSTR | METHOD + SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD @@ -109,7 +109,24 @@ The StonePainter paints stones and converts between pixel and grid

- + + + + + + + + + + + +
+Nested Class Summary
+(package private) static classStonePainter.StoneState + +
+           
@@ -119,7 +136,71 @@ The StonePainter paints stones and converts between pixel and grid +private static double + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +private static double + + + + + + + + + + + + + + + + + + + + - @@ -161,7 +282,15 @@ The StonePainter paints stones and converts between pixel and grid +private static java.awt.Color + + + + +private static int + + + + + + + + +private  java.awt.image.BufferedImage + + + + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + @@ -227,10 +467,130 @@ The StonePainter paints stones and converts between pixel and grid
-static floatASPECT_RATIO + +
+           
+private static java.awt.ColorBACKGROUND_COLOR + +
+           
+private static doubleBRIGHTER_SCALE + +
+           
+private static doubleCIRCLE_POS + +
+           
+private static doubleCIRCLE_WIDTH + +
+           
+private static doubleDEFAULT_WIDTH + +
+           
+private  java.util.Map<StonePainter.StoneState,java.util.Map<StoneColor,java.util.Map<java.lang.Integer,java.awt.image.BufferedImage>>>defaultStones + +
+           
+private static doubleFACE_WIDTH + +
+           
+(package private) static double HEIGHT_SCALE
@@ -127,7 +208,47 @@ The StonePainter paints stones and converts between pixel and grid
-static floatHOVER_RATIO + +
+           
+private  java.util.Map<StonePainter.StoneState,java.util.Map<StoneColor,java.util.Map<java.lang.Integer,java.awt.image.BufferedImage>>>hoveredStones + +
+           
+private static doubleREDDEN_RATIO + +
+           
+private  doublescale + +
+           
+private static doubleTEXT_POS + +
+           
+(package private) static double WIDTH_SCALE
@@ -144,7 +265,7 @@ The StonePainter paints stones and converts between pixel and grid Constructor Summary
StonePainter(float scale) +StonePainter(double scale)
           
- Positionbrighter(java.awt.Color color) + +
+           
+(package private)  Position calculatePosition(int x, int y) @@ -170,7 +299,23 @@ The StonePainter paints stones and converts between pixel and grid
- inteven(double f) + +
+           
+(package private) static java.awt.ColorgetColor(StoneColor color) + +
+           
+(package private)  int getStoneHeight()
@@ -178,7 +323,18 @@ The StonePainter paints stones and converts between pixel and grid
- intgetStoneImage(StoneColor color, + int value, + StonePainter.StoneState state, + boolean hovered) + +
+           
+(package private)  int getStoneWidth()
@@ -186,11 +342,48 @@ The StonePainter paints stones and converts between pixel and grid
- voidpaintStone(java.awt.Graphics2D g, +private static java.awt.Colorhover(java.awt.Color color) + +
+           
+private  voidpaintCircle(java.awt.Graphics2D g, + java.awt.Rectangle r, + java.awt.Color background) + +
+           
+private  voidpaintJoker(java.awt.Graphics2D g, + java.awt.Rectangle r, + java.awt.Color color) + +
+           
+private  voidpaintJokerFace(java.awt.Graphics2D g, + java.awt.Rectangle r) + +
+           
+(package private)  voidpaintStone(java.awt.Graphics2D g, Stone stone, Position p, - boolean selected, + StonePainter.StoneState state, boolean hovered)
@@ -198,8 +391,55 @@ The StonePainter paints stones and converts between pixel and grid
- voidsetScale(float scale) +private  voidpaintStoneBackground(java.awt.Graphics2D g, + java.awt.Rectangle r, + java.awt.Color background) + +
+           
+private  voidpaintStoneValue(java.awt.Graphics2D g, + java.awt.Rectangle r, + java.awt.Color color, + int v) + +
+           
+private  java.awt.image.BufferedImageprepaintStone(java.awt.Color fg, + java.awt.Color bg, + int value) + +
+           
+private static java.awt.Colorredden(java.awt.Color color) + +
+           
+private  voidresetPrepaint() + +
+           
+(package private)  voidsetScale(double scale)
          Sets the new grid scale
+

+ASPECT_RATIO

+
+private static final double ASPECT_RATIO
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEFAULT_WIDTH

+
+private static final double DEFAULT_WIDTH
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TEXT_POS

+
+private static final double TEXT_POS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FACE_WIDTH

+
+private static final double FACE_WIDTH
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CIRCLE_POS

+
+private static final double CIRCLE_POS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CIRCLE_WIDTH

+
+private static final double CIRCLE_WIDTH
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BACKGROUND_COLOR

+
+private static final java.awt.Color BACKGROUND_COLOR
+
+
+
+
+
+ +

+BRIGHTER_SCALE

+
+private static final double BRIGHTER_SCALE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+HOVER_RATIO

+
+private static final double HOVER_RATIO
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REDDEN_RATIO

+
+private static final double REDDEN_RATIO
+
+
+
See Also:
Constant Field Values
+
+
+ +

+defaultStones

+
+private java.util.Map<StonePainter.StoneState,java.util.Map<StoneColor,java.util.Map<java.lang.Integer,java.awt.image.BufferedImage>>> defaultStones
+
+
+
+
+
+ +

+hoveredStones

+
+private java.util.Map<StonePainter.StoneState,java.util.Map<StoneColor,java.util.Map<java.lang.Integer,java.awt.image.BufferedImage>>> hoveredStones
+
+
+
+
+
+

WIDTH_SCALE

-public static final float WIDTH_SCALE
+static final double WIDTH_SCALE
The width of one pixel in the scale of 1.0

@@ -242,13 +602,23 @@ public static final float WIDTH_SCALE

HEIGHT_SCALE

-public static final float HEIGHT_SCALE
+static final double HEIGHT_SCALE
The height of one pixel in the scale of 1.0

See Also:
Constant Field Values
+
+ +

+scale

+
+private double scale
+
+
+
+
@@ -260,10 +630,10 @@ public static final float HEIGHT_SCALE -

+

StonePainter

-StonePainter(float scale)
+StonePainter(double scale)
Parameters:
scale - the scaling factor for the grid coordinates
@@ -279,10 +649,65 @@ StonePainter -

+

+even

+
+private static int even(double f)
+
+
+
+
+
+
+ +

+brighter

+
+private static java.awt.Color brighter(java.awt.Color color)
+
+
+
+
+
+
+ +

+hover

+
+private static java.awt.Color hover(java.awt.Color color)
+
+
+
+
+
+
+ +

+redden

+
+private static java.awt.Color redden(java.awt.Color color)
+
+
+
+
+
+
+ +

+getColor

+
+static java.awt.Color getColor(StoneColor color)
+
+
+
+
+
+
+ +

setScale

-public void setScale(float scale)
+void setScale(double scale)
Sets the new grid scale

@@ -295,8 +720,8 @@ public void setScale(float scale)

calculatePosition

-public Position calculatePosition(int x,
-                                  int y)
+Position calculatePosition(int x, + int y)
Parameters:
x - x position in screen coordinates
y - y position in screen coordinates @@ -308,7 +733,7 @@ public

getStoneWidth

-public int getStoneWidth()
+int getStoneWidth()
@@ -320,7 +745,7 @@ public int getStoneWidth()

getStoneHeight

-public int getStoneHeight()
+int getStoneHeight()
@@ -329,19 +754,123 @@ public int getStoneHeight()

-

+

+prepaintStone

+
+private java.awt.image.BufferedImage prepaintStone(java.awt.Color fg,
+                                                   java.awt.Color bg,
+                                                   int value)
+
+
+
+
+
+
+ +

+getStoneImage

+
+private java.awt.image.BufferedImage getStoneImage(StoneColor color,
+                                                   int value,
+                                                   StonePainter.StoneState state,
+                                                   boolean hovered)
+
+
+
+
+
+
+ +

+resetPrepaint

+
+private void resetPrepaint()
+
+
+
+
+
+
+ +

+paintStoneBackground

+
+private void paintStoneBackground(java.awt.Graphics2D g,
+                                  java.awt.Rectangle r,
+                                  java.awt.Color background)
+
+
+
+
+
+
+ +

+paintJokerFace

+
+private void paintJokerFace(java.awt.Graphics2D g,
+                            java.awt.Rectangle r)
+
+
+
+
+
+
+ +

+paintJoker

+
+private void paintJoker(java.awt.Graphics2D g,
+                        java.awt.Rectangle r,
+                        java.awt.Color color)
+
+
+
+
+
+
+ +

+paintStoneValue

+
+private void paintStoneValue(java.awt.Graphics2D g,
+                             java.awt.Rectangle r,
+                             java.awt.Color color,
+                             int v)
+
+
+
+
+
+
+ +

+paintCircle

+
+private void paintCircle(java.awt.Graphics2D g,
+                         java.awt.Rectangle r,
+                         java.awt.Color background)
+
+
+
+
+
+
+ +

paintStone

-public void paintStone(java.awt.Graphics2D g,
-                       Stone stone,
-                       Position p,
-                       boolean selected,
-                       boolean hovered)
+void paintStone(java.awt.Graphics2D g, + Stone stone, + Position p, + StonePainter.StoneState state, + boolean hovered)
Paints a stone

-
Parameters:
g - the graphics context to paint the stone on
stone - the stone to paint
p - the position of the stone
selected - if selected is true the stone will be painted darker
hovered - if hovered is true the stone will be painted brighter
+
Parameters:
g - the graphics context to paint the stone on
stone - the stone to paint
p - the position of the stone
state - if the stone is selected the stone will be painted darker, if + it is invalid it will be painted in red
hovered - if hovered is true the stone will be painted brighter
@@ -376,7 +905,7 @@ public void paintStone(java.awt.Graphics2D g,  PREV CLASS  - NEXT CLASSNEXT CLASS FRAMES    NO FRAMES   @@ -396,7 +925,7 @@ public void paintStone(java.awt.Graphics2D g, - SUMMARY: NESTED | FIELD | CONSTR | METHOD + SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD -- cgit v1.2.3