Package com.luciad.gui
Class TLcdBoxIcon
java.lang.Object
com.luciad.gui.TLcdBoxIcon
- All Implemented Interfaces:
ILcdAnchoredIcon
,ILcdIcon
,ILcdCloneable
,Serializable
,Cloneable
Draws a box (filled and/or outlined) around a provided icon.
- Since:
- 2018.1
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder for creating a box icon. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Creates a new builder initialized with all the properties of this box icon.clone()
MakesObject.clone()
public.boolean
Returns the color that fills the background/Returns the color of the frame.int
Returns the line width of box outline.getIcon()
Returns the content icon around which to draw a box.int
Returns the fixed height of the icon.int
Returns the fixed width of the icon.int
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
Returns a builder for creating a new box icon.void
Draw theILcdIcon
at the specified location.toString()
-
Method Details
-
getFrameLineWidth
public int getFrameLineWidth()Returns the line width of box outline.- Returns:
- the line width of box outline, in pixels
- See Also:
-
paintIcon
Description copied from interface:ILcdIcon
Draw theILcdIcon
at the specified location.ILcdIcon
implementations may use theComponent
argument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIcon
in interfaceILcdIcon
- Parameters:
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.
-
getFillColor
Returns the color that fills the background/- Returns:
- the color to fill the background, if this behavior is
enabled
-
isFrame
public boolean isFrame()Returns whether to surround the content with a frame.- Returns:
- whether the content will be painted with a frame.
- See Also:
-
isFilled
public boolean isFilled()Returns whether to paint the content on a filled background.- Returns:
true
if the content is painted on a filled background
-
getPadding
public int getPadding()Returns the amount of padding used around the text.- Returns:
- the padding around the text, in pixels
-
getFrameColor
Returns the color of the frame.- Returns:
- the color of the frame
-
getIconWidth
public int getIconWidth()Description copied from interface:ILcdIcon
Returns the fixed width of the icon.- Specified by:
getIconWidth
in interfaceILcdIcon
- Returns:
- the fixed width of the icon.
-
getIconHeight
public int getIconHeight()Description copied from interface:ILcdIcon
Returns the fixed height of the icon.- Specified by:
getIconHeight
in interfaceILcdIcon
- Returns:
- the fixed height of the icon.
-
clone
Description copied from interface:ILcdCloneable
Makes
When for example extending fromObject.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 ); } }
- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classObject
- See Also:
-
equals
-
hashCode
public int hashCode() -
newBuilder
Returns a builder for creating a new box icon.- Returns:
- a new box icon builder
-
asBuilder
Creates a new builder initialized with all the properties of this box icon.- Returns:
- the new builder.
-
anchorPointSFCT
Description copied from interface:ILcdAnchoredIcon
Updates the given point to the location of the icon's anchor point, in relative coordinates with respect to the top left. The x-coordinate of the anchor point typically lies between 0 and getWidth(). The y-coordinate typically lies between 0 and getHeight().- Specified by:
anchorPointSFCT
in interfaceILcdAnchoredIcon
- Parameters:
aPointSFCT
- the point that has to be moved to the location of the anchor point of this icon.
-
getIcon
Returns the content icon around which to draw a box.- Returns:
- the content icon
-
toString
-