|
SGT Home | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | 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. |
SoTPoint |
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 |
setLocation(java.awt.Point loc,
boolean fireEvent)
Set icon location in device units and optionally fire a PropertyChangeEvent. |
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(SoTPoint loc)
Set the icon location in user units. |
void |
setLocationUNoVeto(SoTPoint 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("#####.##", "#").
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.IconpaintIcon in class javax.swing.ImageIconpublic void setFont(java.awt.Font font)
font - the fontpublic java.awt.Font getFont()
public int getIconWidth()
getIconWidth in interface javax.swing.IcongetIconWidth in class javax.swing.ImageIconpublic int getIconHeight()
getIconHeight in interface javax.swing.IcongetIconHeight in class javax.swing.ImageIconpublic LayerChild copy()
LayerChildLayerChild.
copy in interface LayerChildLayerChild.public void setVisible(boolean vis)
LayerChildLayerChild.
setVisible in interface LayerChildvis - visible if truepublic boolean isVisible()
LayerChildLayerChild is visible.
isVisible in interface LayerChildpublic void draw(java.awt.Graphics g)
LayerChildLayerChild.
draw in interface LayerChildg - Graphics contextpublic java.lang.String getId()
LayerChild
getId in interface LayerChildLayerChild identification.public Layer getLayer()
LayerChildLayer.
getLayer in interface LayerChildpublic AbstractPane getPane()
LayerChildAbstractPane of the LayerChild.
getPane in interface LayerChildpublic void modified(java.lang.String mess)
LayerChild
modified in interface LayerChildpublic void setId(java.lang.String id)
LayerChild
setId in interface LayerChildid - LayerChild identification.public void setLayer(Layer l)
LayerChildLayer with the LayerChild.
setLayer in interface LayerChildl - Parent layer.public java.lang.String toString()
LayerChildLayerChild.
toString in interface LayerChildtoString in class javax.swing.ImageIconLayerChild representation.public java.awt.Rectangle getBounds()
Selectable
getBounds in interface Selectablepublic boolean isSelected()
Selectable
isSelected in interface Selectablepublic void setSelected(boolean sel)
Selectable
setSelected in interface Selectablesel - true if selected, false if not.public boolean isSelectable()
Selectable
isSelectable in interface Selectablepublic void setSelectable(boolean select)
Selectable
setSelectable in interface Selectableselect - if true object is selectablepublic Point2D.Double getLocationP()
public void setLocationP(Point2D.Double loc)
location.
public SoTPoint getLocationU()
public void setLocationUNoVeto(SoTPoint loc)
public void setLocationU(SoTPoint loc)
throws java.beans.PropertyVetoException
location.
java.beans.PropertyVetoException
public void setLocationNoVeto(int x,
int y)
setLocationNoVeto in interface Draggablepublic void setLocation(java.awt.Point loc)
setLocation in interface Draggable
public void setLocation(java.awt.Point loc,
boolean fireEvent)
PropertyChangeEvent.
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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||