|
SGT Home | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.swing.ImageIcon
|
+--gov.noaa.pmel.sgt.swing.ValueIcon
ValueIcon extends ImageIcon to create a
icon than can be dragged on a sgt plot displaying the
local coordinates along with the image. Typically a cross-hairs
image is used, but others can be substituted.
UserIcon,
ValueIconFormat, Serialized Form| Constructor Summary | |
ValueIcon(java.awt.Image image,
java.lang.String description)
Construct a ValueIcon using an Image. |
|
ValueIcon(java.lang.String filename,
java.lang.String description)
Construct a ValueIcon using an image from a
specified file. |
|
ValueIcon(java.net.URL location,
java.lang.String description)
Construct a ValueIcon using an image from a
specified URL. |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener l)
|
LayerChild |
copy()
Create a copy of the LayerChild. |
void |
draw(java.awt.Graphics g)
Draw the LayerChild. |
java.awt.Rectangle |
getBounds()
Gets the bounding rectangle in device coordinates. |
java.awt.Font |
getFont()
Get the value label font |
int |
getIconHeight()
Get the total heigth. |
int |
getIconWidth()
Get the total width, icon + label. |
java.lang.String |
getId()
Get the identifier. |
Layer |
getLayer()
Get the associated Layer. |
Point2D.Double |
getLocationP()
Get the icon location in physical units. |
Point2D.Double |
getLocationU()
Get the icon location in user units. |
AbstractPane |
getPane()
Get AbstractPane of the LayerChild. |
boolean |
isSelectable()
Returns true if the current state is selectable. |
boolean |
isSelected()
Returns true if the object's selected property is set. |
boolean |
isVisible()
Check if LayerChild is visible. |
void |
modified(java.lang.String mess)
Used by sgt internally. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Paint the icon at the specified location. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener l)
|
void |
setBounds(int x,
int y,
int width,
int height)
Set icon bounds. |
void |
setBounds(java.awt.Rectangle bounds)
Set icon bounds. |
void |
setFont(java.awt.Font font)
Set the font for the value label. |
void |
setId(java.lang.String id)
Set the identifier. |
void |
setLayer(Layer l)
Associate a Layer with the LayerChild. |
void |
setLocation(java.awt.Point loc)
Set icon location in device units |
void |
setLocationNoVeto(int x,
int y)
Set icon location in device coordinates. |
void |
setLocationP(Point2D.Double loc)
Set the icon location in physical units. |
void |
setLocationU(Point2D.Double loc)
Set the icon location in user units. |
void |
setLocationUNoVeto(Point2D.Double loc)
Set the icon location in user units. |
void |
setSelectable(boolean select)
Set the Selectable property. |
void |
setSelected(boolean sel)
Sets the selected property. |
void |
setValueFormat(ValueIconFormat vf)
Set format to be used to create the value string. |
void |
setVisible(boolean vis)
Set visibility for a LayerChild. |
java.lang.String |
toString()
Return a string that represents the LayerChild. |
| Methods inherited from class javax.swing.ImageIcon |
getAccessibleContext, getDescription, getImage, getImageLoadStatus, getImageObserver, setDescription, setImage, setImageObserver |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ValueIcon(java.lang.String filename,
java.lang.String description)
ValueIcon using an image from a
specified file.filename - name of image filedescription - brief textual description of the image
public ValueIcon(java.net.URL location,
java.lang.String description)
ValueIcon using an image from a
specified URL.location - URL of image filedescription - brief textual description of the image
public ValueIcon(java.awt.Image image,
java.lang.String description)
ValueIcon using an Image.image - the imagedescription - brief textual description of the image| Method Detail |
public void setValueFormat(ValueIconFormat vf)
new ValueIconFormat("#####.##", "#").the - value format
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in class javax.swing.ImageIconjavax.swing.ImageIconc - the component to be used as the observer
if this icon has no image observerg - the graphics contextx - the X coordinate of the icon's top-left cornery - the Y coordinate of the icon's top-left cornerpublic void setFont(java.awt.Font font)
font - the fontpublic java.awt.Font getFont()
public int getIconWidth()
getIconWidth in class javax.swing.ImageIconjavax.swing.ImageIconpublic int getIconHeight()
getIconHeight in class javax.swing.ImageIconjavax.swing.ImageIconpublic LayerChild copy()
LayerChildLayerChild.copy in interface LayerChildgov.noaa.pmel.sgt.LayerChildLayerChild.public void setVisible(boolean vis)
LayerChildLayerChild.setVisible in interface LayerChildgov.noaa.pmel.sgt.LayerChildvisible - visible if truepublic boolean isVisible()
LayerChildLayerChild is visible.isVisible in interface LayerChildgov.noaa.pmel.sgt.LayerChildpublic void draw(java.awt.Graphics g)
LayerChildLayerChild.draw in interface LayerChildgov.noaa.pmel.sgt.LayerChildg - Graphics contextLayerNotFoundException - No layer is associated with the LayerChild.public java.lang.String getId()
LayerChildgetId in interface LayerChildgov.noaa.pmel.sgt.LayerChildLayerChild identification.public Layer getLayer()
LayerChildLayer.getLayer in interface LayerChildgov.noaa.pmel.sgt.LayerChildpublic AbstractPane getPane()
LayerChildAbstractPane of the LayerChild.getPane in interface LayerChildpublic void modified(java.lang.String mess)
LayerChildmodified in interface LayerChildpublic void setId(java.lang.String id)
LayerChildsetId in interface LayerChildgov.noaa.pmel.sgt.LayerChildid - LayerChild identification.public void setLayer(Layer l)
LayerChildLayer with the LayerChild.setLayer in interface LayerChildgov.noaa.pmel.sgt.LayerChildl - Parent layer.public java.lang.String toString()
LayerChildLayerChild.toString in interface LayerChildtoString in class javax.swing.ImageIcongov.noaa.pmel.sgt.LayerChildLayerChild representation.public java.awt.Rectangle getBounds()
SelectablegetBounds in interface Selectablegov.noaa.pmel.sgt.Selectablepublic boolean isSelected()
SelectableisSelected in interface Selectablegov.noaa.pmel.sgt.Selectablepublic void setSelected(boolean sel)
SelectablesetSelected in interface Selectablegov.noaa.pmel.sgt.Selectablesel - true if selected, false if not.public boolean isSelectable()
SelectableisSelectable in interface Selectablegov.noaa.pmel.sgt.Selectablepublic void setSelectable(boolean select)
SelectablesetSelectable in interface Selectablegov.noaa.pmel.sgt.Selectableselect - if true object is selectablepublic Point2D.Double getLocationP()
public void setLocationP(Point2D.Double loc)
location.public Point2D.Double getLocationU()
public void setLocationUNoVeto(Point2D.Double loc)
public void setLocationU(Point2D.Double loc)
throws java.beans.PropertyVetoException
location.
public void setLocationNoVeto(int x,
int y)
setLocationNoVeto in interface Draggablepublic void setLocation(java.awt.Point loc)
setLocation in interface Draggable
public void setBounds(int x,
int y,
int width,
int height)
location.public void setBounds(java.awt.Rectangle bounds)
public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
SGT Home | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||