public class TLcdBoxIcon extends Object implements ILcdAnchoredIcon
Modifier and Type | Class and Description |
---|---|
static class |
TLcdBoxIcon.Builder
Builder for creating a box icon.
|
Modifier and Type | Method and Description |
---|---|
void |
anchorPointSFCT(Point aPointSFCT)
Updates the given point to the location of the icon's anchor point, in relative coordinates with respect to the top left.
|
TLcdBoxIcon.Builder |
asBuilder()
Creates a new builder initialized with all the properties of this box icon.
|
Object |
clone()
Makes
Object.clone() public. |
boolean |
equals(Object aO) |
Color |
getFillColor()
Returns the color that fills the background/
|
Color |
getFrameColor()
Returns the color of the frame.
|
int |
getFrameLineWidth()
Returns the line width of box outline.
|
ILcdIcon |
getIcon()
Returns the content icon around which to draw a box.
|
int |
getIconHeight()
Returns the fixed height of the icon.
|
int |
getIconWidth()
Returns the fixed width of the icon.
|
int |
getPadding()
Returns the amount of padding used around the text.
|
int |
hashCode() |
boolean |
isFilled()
Returns whether to paint the content on a filled background.
|
boolean |
isFrame()
Returns whether to surround the content with a frame.
|
static TLcdBoxIcon.Builder |
newBuilder()
Returns a builder for creating a new box icon.
|
void |
paintIcon(Component aComponent,
Graphics aGraphics,
int aX,
int aY)
Draw the
ILcdIcon at the specified location. |
String |
toString() |
public int getFrameLineWidth()
isFrame()
public void paintIcon(Component aComponent, Graphics aGraphics, int aX, int aY)
ILcdIcon
ILcdIcon
at the specified location. ILcdIcon
implementations
may use the Component
argument to get properties useful for
painting, e.g. the foreground or background color.paintIcon
in interface ILcdIcon
aComponent
- a Component to retrieve properties from.aGraphics
- the Graphics on which the icon will be painted.aX
- the x position where the icon will be painted. x is the first coordinate of the top left
corner point of the icon.aY
- the y position where the icon will be painted. y is the second coordinate of the top left
corner point of the icon.public Color getFillColor()
enabled
public boolean isFrame()
getFrameLineWidth()
public boolean isFilled()
true
if the content is painted on a filled backgroundpublic int getPadding()
public Color getFrameColor()
public int getIconWidth()
ILcdIcon
getIconWidth
in interface ILcdIcon
public int getIconHeight()
ILcdIcon
getIconHeight
in interface ILcdIcon
public Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()
public static TLcdBoxIcon.Builder newBuilder()
public TLcdBoxIcon.Builder asBuilder()
public void anchorPointSFCT(Point aPointSFCT)
ILcdAnchoredIcon
anchorPointSFCT
in interface ILcdAnchoredIcon
aPointSFCT
- the point that has to be moved to the location of the anchor point
of this icon.public ILcdIcon getIcon()