public class KeyTemplate
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
KeyTemplate.Mode
|
Constructor and Description |
---|
KeyTemplate()
Initializes a new instance of the
KeyTemplate class. |
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D graphics,
Key objKey,
KeyTemplate.Mode mode,
java.awt.Font font)
Draws the specified key using this template.
|
java.awt.Color |
getAlterCaseForeground()
Gets the color of alter-case characters.
|
GradientBrush |
getBackground()
Gets the background brush.
|
Pen |
getBorder()
Gets the Pen used to draw key borders.
|
GradientBrush |
getHoverBackground()
Gets the background of hovered keys.
|
java.awt.Color |
getLowerCaseForeground()
Gets the color of lower-case characters.
|
GradientBrush |
getPressedBackground()
Gets the background of pressed keys.
|
java.awt.Color |
getUpperCaseForeground()
Gets the color of upper-case characters.
|
void |
setAlterCaseForeground(java.awt.Color value)
Sets the color of alter-case characters.
|
void |
setBackground(GradientBrush value)
Sets the background brush.
|
void |
setBorder(Pen value)
Sets the Pen used to draw key borders.
|
void |
setHoverBackground(GradientBrush value)
Sets the background of hovered keys.
|
void |
setLowerCaseForeground(java.awt.Color value)
Sets the color of lower-case characters.
|
void |
setPressedBackground(GradientBrush value)
Sets the background of pressed keys.
|
void |
setUpperCaseForeground(java.awt.Color value)
Sets the color of upper-case characters.
|
public KeyTemplate()
KeyTemplate
class.public void setBackground(GradientBrush value)
value
- A GradientBrush instance.public GradientBrush getBackground()
public void setHoverBackground(GradientBrush value)
value
- A GradientBrush instance.public GradientBrush getHoverBackground()
public void setPressedBackground(GradientBrush value)
value
- A GradientBrush instance.public GradientBrush getPressedBackground()
public void setBorder(Pen value)
value
- A Pen instance.public Pen getBorder()
public void setLowerCaseForeground(java.awt.Color value)
value
- A java.awt.Color instance.public java.awt.Color getLowerCaseForeground()
public void setUpperCaseForeground(java.awt.Color value)
value
- A java.awt.Color instance.public java.awt.Color getUpperCaseForeground()
public void setAlterCaseForeground(java.awt.Color value)
value
- A java.awt.Color instance.public java.awt.Color getAlterCaseForeground()
public void draw(java.awt.Graphics2D graphics, Key objKey, KeyTemplate.Mode mode, java.awt.Font font)
graphics
- A target Graphics2D where the key should be drawn.objKey
- A Key
instance.mode
- A Mode member specifying the key state.font
- A java.awt.Font instance.