gov.noaa.pmel.sgt
Interface LayerChild

All Superinterfaces:
Selectable
All Known Subinterfaces:
DataKey
All Known Implementing Classes:
ColorKey, LineKey, Logo, PointCollectionKey, Ruler, SGLabel, UserIcon, ValueIcon, VectorKey

public interface LayerChild
extends Selectable

LayerChild defines an interface to allow classes to be associated with a Layer. The interface is sufficient to provide scaling, translation, and mouse selection.

Since:
1.0
Version:
$Revision$, $Date$
Author:
Donald Denbo

Method Summary
 LayerChild copy()
          Create a copy of the LayerChild.
 void draw(java.awt.Graphics g)
          Draw the LayerChild.
 java.lang.String getId()
          Get the identifier.
 Layer getLayer()
          Get the associated Layer.
 AbstractPane getPane()
          Get AbstractPane of the LayerChild.
 boolean isVisible()
          Check if LayerChild is visible.
 void modified(java.lang.String mess)
          Used by sgt internally.
 void setId(java.lang.String id)
          Set the identifier.
 void setLayer(Layer l)
          Associate a Layer with the LayerChild.
 void setVisible(boolean visible)
          Set visibility for a LayerChild.
 java.lang.String toString()
          Return a string that represents the LayerChild.
 
Methods inherited from interface gov.noaa.pmel.sgt.Selectable
getBounds, isSelectable, isSelected, setSelectable, setSelected
 

Method Detail

draw

void draw(java.awt.Graphics g)
          throws LayerNotFoundException
Draw the LayerChild.

Parameters:
g - Graphics context
Throws:
LayerNotFoundException - No layer is associated with the LayerChild.

getLayer

Layer getLayer()
Get the associated Layer.

Returns:
Associated layer

setLayer

void setLayer(Layer l)
Associate a Layer with the LayerChild.

Parameters:
l - Parent layer.

getId

java.lang.String getId()
Get the identifier.

Returns:
LayerChild identification.

setId

void setId(java.lang.String id)
Set the identifier.

Parameters:
id - LayerChild identification.

copy

LayerChild copy()
Create a copy of the LayerChild.

Returns:
A copy of the LayerChild.

toString

java.lang.String toString()
Return a string that represents the LayerChild.

Overrides:
toString in class java.lang.Object
Returns:
Stringified LayerChild representation.

isVisible

boolean isVisible()
Check if LayerChild is visible.

Returns:
true if visible
Since:
2.0

setVisible

void setVisible(boolean visible)
Set visibility for a LayerChild.

Parameters:
visible - visible if true
Since:
2.0

getPane

AbstractPane getPane()
Get AbstractPane of the LayerChild.

Since:
2.0

modified

void modified(java.lang.String mess)
Used by sgt internally.

Since:
2.0