public class IconElement extends PictureElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DOC
A predefined US DOC logo icon.
|
static java.lang.String |
DOC3D
A predefined US DOC 3D logo icon.
|
static java.lang.String |
NASA
A predefined NASA logo icon.
|
static java.lang.String |
NASA3D
A predefined NASA 3D logo icon.
|
static java.lang.String |
NOAA
A predefined NOAA logo icon.
|
static java.lang.String |
NOAA3D
A predefined NOAA 3D logo icon.
|
static java.lang.String |
NWS
A predefined NWS logo icon.
|
static java.lang.String |
NWS3D
A predefined NWS 3D logo icon.
|
position, preferred
Constructor and Description |
---|
IconElement(java.io.File file)
Creates a new icon element from the specified properties.
|
IconElement(java.io.InputStream stream)
Creates a new icon element from the specified properties.
|
IconElement(java.awt.geom.Point2D position,
java.awt.Dimension size,
java.io.File file)
Creates a new icon element from the specified properties.
|
IconElement(java.awt.geom.Point2D position,
java.awt.Dimension size,
java.io.InputStream stream)
Creates a new icon element from the specified properties.
|
IconElement(java.awt.geom.Point2D position,
java.awt.Dimension size,
java.lang.String name)
Creates a new icon element from the specified properties.
|
IconElement(java.lang.String name)
Creates a new icon element from the specified properties.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Area |
getArea(java.awt.Graphics2D g)
Gets the element bounding area.
|
void |
render(java.awt.Graphics2D g,
java.awt.Color foreground,
java.awt.Color background)
Renders the element graphics.
|
setPosition, setPreferredSize
getBounds
public static final java.lang.String NOAA
public static final java.lang.String NWS
public static final java.lang.String NASA
public static final java.lang.String DOC
public static final java.lang.String NOAA3D
public static final java.lang.String NWS3D
public static final java.lang.String NASA3D
public static final java.lang.String DOC3D
public IconElement(java.awt.geom.Point2D position, java.awt.Dimension size, java.lang.String name) throws java.io.IOException
position
- the top-left corner position of the picture.size
- the preferred size of the icon (see PictureElement.setPreferredSize(java.awt.Dimension)
).name
- the predefined icon name.java.io.IOException
- if the icon file had input errors.public IconElement(java.lang.String name) throws java.io.IOException
name
- the predefined icon name.java.io.IOException
- if the icon file had input errors.public IconElement(java.awt.geom.Point2D position, java.awt.Dimension size, java.io.File file) throws java.io.IOException
position
- the top-left corner position of the picture.size
- the preferred size of the icon (see PictureElement.setPreferredSize(java.awt.Dimension)
).file
- the icon file.java.io.IOException
- if the icon file had input errors.public IconElement(java.io.File file) throws java.io.IOException
file
- the icon file.java.io.IOException
- if the icon file had input errors.public IconElement(java.awt.geom.Point2D position, java.awt.Dimension size, java.io.InputStream stream) throws java.io.IOException
position
- the top-left corner position of the picture.size
- the preferred size of the icon (see PictureElement.setPreferredSize(java.awt.Dimension)
).stream
- the icon input stream.java.io.IOException
- if the icon file had input errors.public IconElement(java.io.InputStream stream) throws java.io.IOException
stream
- the icon input stream.java.io.IOException
- if the icon file had input errors.public void render(java.awt.Graphics2D g, java.awt.Color foreground, java.awt.Color background)
AnnotationElement
render
in class AnnotationElement
g
- the graphics object for drawing.foreground
- the foreground element color.background
- the background element color or null for no
background.public java.awt.geom.Area getArea(java.awt.Graphics2D g)
AnnotationElement
getArea
in class AnnotationElement
g
- the graphics object for drawing.