gov.noaa.pmel.sgt.beans
Class DataGroupLayer

java.lang.Object
  extended by java.awt.Component
      extended by gov.noaa.pmel.sgt.Layer
          extended by gov.noaa.pmel.sgt.beans.DataGroupLayer
All Implemented Interfaces:
LayerControl, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Cloneable

public class DataGroupLayer
extends Layer

A holder for DataGroup and Layer associated with axes and Graph. Multiple sets of data can be added to a DataGroupLayer, but each will share the same DataGroup. I.e., the same axes and transforms.

Since:
3.0
Version:
$Revision$, $Date$
Author:
Donald Denbo
See Also:
Page for UML diagram, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class gov.noaa.pmel.sgt.Layer
pane_
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DataGroupLayer()
          Default constructor.
DataGroupLayer(Panel panel, DataGroup dg)
          Construct DataGroupLayer.
 
Method Summary
 void addData(SGTData data, Attribute attr, DataKey key)
          Add data to the DataGroupLayer.
 void draw(java.awt.Graphics g)
          Draw the Layer and its attached classes.
 void drawDraggableItems(java.awt.Graphics g)
          Used internally by sgt.
 DataGroup getDataGroup()
          Get DataGroup
 java.util.Iterator getLayerIterator()
          Get Layer Iterator.
 java.util.List getLayerList()
          Get a List of the Layers.
 Panel getPanel()
          Get the Panel parent.
 void resetZoom()
          Reset the zoom for this DataGroupLayer.
 void setBounds(int x, int y, int w, int h)
          Set the bounds of the Layer in device units.
 void setBounds(java.awt.Rectangle rect)
          Set the bounds of the Layer in device units.
 void setClipping(boolean clip)
          Set clipping for DataGroupLayer
 void setDomain(SoTDomain domain)
          Set DataGroupLayer domain.
 void setLocation(int x, int y)
          Set the location of the Layer in device units.
 void setLocation(java.awt.Point pt)
          Set the location of the Layer in device units.
 void setSize(java.awt.Dimension size)
          Set the size of the Layer in device units.
 void setSize(int w, int h)
          Set the size of the Layer in device units.
 void setSizeP(Dimension2D size)
          Set the size of the Layer in physical coordinates.
 void update()
          Update DataGroupLayer.
 
Methods inherited from class gov.noaa.pmel.sgt.Layer
addChild, childElements, childIterator, copy, findChild, getBoundsP, getChild, getChildren, getGraph, getId, getObjectAt, getObjectAt, getObjectAt, getObjectsAt, getPane, getSizeP, getXDtoP, getXOffset, getXPtoD, getXPtoD2, getXSlope, getYDtoP, getYOffset, getYPtoD, getYPtoD2, getYSlope, isChildAttached, isDataInLayer, modified, removeAllChildren, removeChild, removeChild, setGraph, setId, setPane, toString
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMinimumSize, setName, setPreferredSize, setVisible, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataGroupLayer

public DataGroupLayer()
Default constructor. Panel and DataGroup must be specified.


DataGroupLayer

public DataGroupLayer(Panel panel,
                      DataGroup dg)
Construct DataGroupLayer.

Parameters:
panel - parent
dg - datagroup
Method Detail

getPanel

public Panel getPanel()
Get the Panel parent.

Returns:
panel

getDataGroup

public DataGroup getDataGroup()
Get DataGroup

Returns:
the datagroup

getLayerIterator

public java.util.Iterator getLayerIterator()
Get Layer Iterator.

Returns:
iterator of Layers

getLayerList

public java.util.List getLayerList()
Get a List of the Layers.

Returns:
layer list

addData

public void addData(SGTData data,
                    Attribute attr,
                    DataKey key)
             throws DataTargetMismatchException
Add data to the DataGroupLayer.

Parameters:
data - SGTData
attr - Attribute associated with data
key - DataKey
Throws:
DataTargetMismatchException

update

public void update()
Update DataGroupLayer. Used internally.


draw

public void draw(java.awt.Graphics g)
          throws PaneNotFoundException
Description copied from class: Layer
Draw the Layer and its attached classes.

Specified by:
draw in interface LayerControl
Overrides:
draw in class Layer
Parameters:
g - graphics context
Throws:
PaneNotFoundException - if a pane object is not found

drawDraggableItems

public void drawDraggableItems(java.awt.Graphics g)
                        throws PaneNotFoundException
Description copied from interface: LayerControl
Used internally by sgt.

Specified by:
drawDraggableItems in interface LayerControl
Overrides:
drawDraggableItems in class Layer
Parameters:
g - Graphics object.
Throws:
PaneNotFoundException - Pane not found.

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Description copied from class: Layer
Set the bounds of the Layer in device units.

Overrides:
setBounds in class Layer
Parameters:
x - horizontal location of the Layer
y - vertical location of the Layer
w - width of the Layer
h - height of the Layer

setBounds

public void setBounds(java.awt.Rectangle rect)
Description copied from class: Layer
Set the bounds of the Layer in device units.

Overrides:
setBounds in class Layer
Parameters:
rect - bounds of the Layer

setLocation

public void setLocation(int x,
                        int y)
Description copied from class: Layer
Set the location of the Layer in device units.

Overrides:
setLocation in class Layer
Parameters:
x - horizontal location of the Layer
y - vertical location of the Layer

setLocation

public void setLocation(java.awt.Point pt)
Description copied from class: Layer
Set the location of the Layer in device units.

Overrides:
setLocation in class Layer
Parameters:
pt - location of the Layer

setSize

public void setSize(java.awt.Dimension size)
Description copied from class: Layer
Set the size of the Layer in device units.

Overrides:
setSize in class Layer
Parameters:
size - dimension of the Layer

setSize

public void setSize(int w,
                    int h)
Description copied from class: Layer
Set the size of the Layer in device units.

Overrides:
setSize in class Layer
Parameters:
w - width of the Layer
h - height of the Layer

setSizeP

public void setSizeP(Dimension2D size)
Description copied from class: Layer
Set the size of the Layer in physical coordinates.

Overrides:
setSizeP in class Layer
Parameters:
size - The physical size of the Layer.

setClipping

public void setClipping(boolean clip)
Set clipping for DataGroupLayer

Parameters:
clip - if true clip data to bounds.

resetZoom

public void resetZoom()
Reset the zoom for this DataGroupLayer.


setDomain

public void setDomain(SoTDomain domain)
Set DataGroupLayer domain.

Parameters:
domain - domain