|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
eu.hansolo.custom.Score
public class Score extends JComponent
| Nested Class Summary | |
|---|---|
enum |
Score.ColorDirection
|
| Field Summary | |
|---|---|
private ComponentListener |
COMPONENT_LISTENER
|
private Rectangle |
INNER_BOUNDS
|
private Score.ColorDirection |
colorDirection
|
private int |
horizontalAlignment
|
private int |
noOfArrows
|
private BufferedImage |
off_Image
|
private BufferedImage |
on_Image
|
private PropertyChangeSupport |
propertySupport
|
private int |
score
|
private Color |
textColor
|
private boolean |
textVisible
|
private int |
verticalAlignment
|
| Fields inherited from class JComponent | |
|---|---|
| WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
| Fields inherited from class Container | |
|---|---|
| TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
| Constructor Summary | |
Score()
|
|
| Method Summary | |
|---|---|
void
|
addInnerShadow(Graphics2D G2, Shape SHAPE, Color SHADOW_COLOR, int DISTANCE, float ALPHA, int SOFTNESS, int ANGLE)
|
void
|
addPropertyChangeListener(PropertyChangeListener LISTENER)
|
private void
|
calcInnerBounds()
Calculates the area that is available for painting the display |
BufferedImage
|
createArrow(int WIDTH, int HEIGHT, Color COLOR, boolean FILLED)
|
private BufferedImage
|
createImage(int WIDTH, int HEIGHT, int TRANSPARENCY)
Returns a compatible image of the given size and transparency |
BufferedImage
|
createOffImage(int WIDTH, int HEIGHT)
|
BufferedImage
|
createOnImage(int WIDTH, int HEIGHT)
|
Score.ColorDirection
|
getColorDirection()
|
int
|
getHorizontalAlignment()
|
Rectangle
|
getInnerBounds()
Returns a rectangle representing the available space for drawing the component taking the insets into account (e.g. given through borders etc.) |
Dimension
|
getMinimumSize()
|
int
|
getNoOfArrows()
|
int
|
getScore()
|
Color
|
getTextColor()
|
int
|
getVerticalAlignment()
|
void
|
init(int WIDTH, int HEIGHT)
|
boolean
|
isTextVisible()
|
protected void
|
paintComponent(Graphics G)
|
void
|
removePropertyChangeListener(PropertyChangeListener LISTENER)
|
void
|
setBounds(Rectangle BOUNDS)
|
void
|
setBounds(int X, int Y, int WIDTH, int HEIGHT)
|
void
|
setColorDirection(Score.ColorDirection COLOR_DIRECTION)
|
void
|
setHorizontalAlignment(int HORIZONTAL_ALIGNMENT)
|
void
|
setNoOfArrows(int NO_OF_ARROWS)
|
void
|
setPreferredSize(Dimension DIM)
|
void
|
setScore(int SCORE)
|
void
|
setSize(int WIDTH, int HEIGHT)
|
void
|
setSize(Dimension DIM)
|
void
|
setTextColor(Color TEXT_COLOR)
|
void
|
setTextVisible(boolean TEXT_VISIBLE)
|
void
|
setVerticalAlignment(int VERTICAL_ALIGNMENT)
|
Score
|
valueOf(String name)
Returns the enum constant of this type with the specified name. |
Score[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Field Detail |
|---|
private final ComponentListener COMPONENT_LISTENER
private final Rectangle INNER_BOUNDS
private Score.ColorDirection colorDirection
private int horizontalAlignment
private int noOfArrows
private BufferedImage off_Image
private BufferedImage on_Image
private PropertyChangeSupport propertySupport
private int score
private Color textColor
private boolean textVisible
private int verticalAlignment
| Constructor Detail |
|---|
public Score()
| Method Detail |
|---|
public void addInnerShadow(Graphics2D G2, Shape SHAPE, Color SHADOW_COLOR, int DISTANCE, float ALPHA, int SOFTNESS, int ANGLE)
@Override public void addPropertyChangeListener(PropertyChangeListener LISTENER)
private void calcInnerBounds()
public BufferedImage createArrow(int WIDTH, int HEIGHT, Color COLOR, boolean FILLED)
private BufferedImage createImage(int WIDTH, int HEIGHT, int TRANSPARENCY)
public BufferedImage createOffImage(int WIDTH, int HEIGHT)
public BufferedImage createOnImage(int WIDTH, int HEIGHT)
public Score.ColorDirection getColorDirection()
public int getHorizontalAlignment()
public Rectangle getInnerBounds()
@Override public Dimension getMinimumSize()
public int getNoOfArrows()
public int getScore()
public Color getTextColor()
public int getVerticalAlignment()
public final void init(int WIDTH, int HEIGHT)
public boolean isTextVisible()
@Override protected void paintComponent(Graphics G)
@Override public void removePropertyChangeListener(PropertyChangeListener LISTENER)
de public public void setBounds(Rectangle BOUNDS)
de public public void setBounds(int X, int Y, int WIDTH, int HEIGHT)
public void setColorDirection(Score.ColorDirection COLOR_DIRECTION)
public void setHorizontalAlignment(int HORIZONTAL_ALIGNMENT)
public void setNoOfArrows(int NO_OF_ARROWS)
de public public void setPreferredSize(Dimension DIM)
public void setScore(int SCORE)
de public public void setSize(int WIDTH, int HEIGHT)
de public public void setSize(Dimension DIM)
public void setTextColor(Color TEXT_COLOR)
public void setTextVisible(boolean TEXT_VISIBLE)
public void setVerticalAlignment(int VERTICAL_ALIGNMENT)
Score valueOf(String name)
Score[] values()
Groovy Documentation