|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLayeredPane
gov.noaa.pmel.sgt.JPane
gov.noaa.pmel.sgt.swing.JGraphicLayout
public abstract class JGraphicLayout
JGraphicLayout
is a abstract class that provides
the basis for pre-defined layouts using the
CartesianGraph
class. JGraphicLayout
extends JPane
.
CartesianGraph
,
JPlotLayout
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLayeredPane |
---|
javax.swing.JLayeredPane.AccessibleJLayeredPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected gov.noaa.pmel.sgt.swing.JGraphicLayout.SymMouse |
aSymMouse_
Reference to Mouse event handler |
protected int |
base_units_
Base units of data |
protected java.beans.PropertyChangeSupport |
changes_
Reference to PropertyChangeSupport |
protected boolean |
clipping_
Data is clipped to axes |
protected java.util.Vector |
data_
SGTData storage |
protected java.util.Hashtable |
dataAttrMap_
Mapping of data to attributes |
protected boolean |
editClasses_
Allow editing of sgt object properties |
protected java.awt.Image |
iconImage_
Optional image |
protected java.lang.String |
ident_
Identification of graph |
protected static double |
KEY_HEIGHT_
Height of line or color key labels |
protected JPane |
keyPane_
Key pane reference |
protected static java.awt.Color |
KEYPANE_COLOR
Key pane color |
protected static double |
LABEL_HEIGHT_
Height of axis labels in physical units |
protected LogoDialog |
lo_props_
Reference to LogoDialog |
protected static double |
MAIN_TITLE_HEIGHT_
Height of main title in physical units |
protected SGLabel |
mainTitle_
Titles for graph |
protected boolean |
overlayed_
Layers are overlayed |
protected SpaceAxisDialog |
pa_props_
Reference to SpaceAxisDialog |
protected static java.awt.Color |
PANE_COLOR
Main pane color |
protected SGLabelDialog |
sg_props_
Reference to SGLabelDialog |
protected TimeAxisDialog |
ta_props_
Reference to TimeAxisDialog |
protected static double |
TITLE_HEIGHT_
Height of axis title in physical units |
protected SGLabel |
title2_
Titles for graph |
protected SGLabel |
title3_
Titles for graph |
protected java.beans.VetoableChangeSupport |
vetos_
Reference to VetoableChangeSupport |
protected static double |
WARN_HEIGHT_
Height of 2nd and 3rd main titles |
static int |
X_AXIS
Use X array from SGTData . |
protected static double |
XKEYSIZE_
Width of key if in separate pane |
protected static double |
XMAX_
End of X axis in physical units |
protected static double |
XMIN_
Start of X axis in physical units |
protected static double |
XSIZE_
Width of graph in physical units |
static int |
Y_AXIS
Use Y array from SGTData . |
protected static double |
YKEYSIZE_
Height of key if in separate pane |
protected static double |
YMAX_
End of Y axis in physical units |
protected static double |
YMIN_
Start of Y axis in physical units |
protected static double |
YSIZE_
Height of graph in physical units |
static int |
Z_AXIS
Use Z array from SGTData . |
Fields inherited from class javax.swing.JLayeredPane |
---|
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface gov.noaa.pmel.sgt.AbstractPane |
---|
BOTTOM, CENTER, DEFAULT_SCALE, LEFT, MIDDLE, RIGHT, SHRINK_TO_FIT, SPECIFIED_LOCATION, TO_FIT, TOP |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JGraphicLayout()
Default constructor |
|
JGraphicLayout(java.lang.String id,
java.awt.Image img)
JGraphicLayout constructor. |
|
JGraphicLayout(java.lang.String id,
java.awt.Image img,
java.awt.Dimension size)
JGraphicLayout constructor. |
Method Summary | |
---|---|
void |
addAttribute(SGTData data,
Attribute attr)
Associate SGTData with an
Attribute . |
void |
addData(SGTData data)
Add data to the layout. |
abstract void |
addData(SGTData data,
java.lang.String label)
Add data to the plot |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener to the list. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener l)
|
Attribute |
findAttribute(java.lang.String id)
Find an Attribute given an id. |
Range2D |
findRange(SGTGrid data,
GridAttribute attr,
int dir)
Find the range of the SGTGrid object in the
specified direction. |
Range2D |
findRange(SGTLine data,
int dir)
Find the range of the SGTLine object in the specific
direction. |
SoTRange |
findSoTRange(SGTGrid data,
GridAttribute attr,
int dir)
Find the range of the SGTGrid object in the
specified direction. |
SoTRange |
findSoTRange(SGTLine line,
int dir)
Find the range of the SGTLine object in the specific
direction. |
SoTRange |
findSoTRange(SGTVector data,
int dir)
Find the range of the SGTVector object in the
specified direction. |
TimeRange |
findTimeRange(SGTGrid data,
GridAttribute attr)
Find the TimeRange of the SGTGrid object. |
TimeRange |
findTimeRange(SGTLine data)
Find the time range of the SGTLine object. |
Attribute |
getAttribute(SGTData data)
Find an Attribute given a SGTData
object. |
int |
getBaseUnit()
Get the base units |
Collection |
getData()
Return data associated with the plot. |
java.awt.Image |
getIconImage()
Get icon image |
java.lang.String |
getId()
Get the identifier |
abstract Rectangle2D.Double |
getKeyBoundsP()
Get the bounds for the line or color key. |
Dimension2D |
getKeyLayerSizeP()
Get the size of the key layer in physical coordinates. |
JPane |
getKeyPane()
Get KeyPane object |
protected java.lang.String |
getLatString(double lat)
return a formated string summarizing the latitude |
abstract java.lang.String |
getLocationSummary(SGTData grid)
Construct a string that summarizes the location of the data. |
protected java.lang.String |
getLonString(double lond)
return a formated string summarizing the longitude |
Domain |
getRange()
Get the current Domain |
Domain |
getZoomBoundsU()
Get the zoom bounds in user units |
boolean |
isClipping()
Returns true if clipping is on. |
boolean |
isEditClasses()
Are sgt objects editable? |
boolean |
isKeyPane()
Is there a key pane? |
boolean |
isOverlayed()
Layer overlay flag. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove the PropertyChangeListener from the list. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener l)
|
abstract void |
resetZoom()
Set the axes to the range of the SGTData objects. |
protected void |
setAllClip(double xmin,
double xmax,
double ymin,
double ymax)
Set the clip range for all Layer s. |
protected void |
setAllClip(GeoDate tmin,
GeoDate tmax,
double min,
double max)
Set the clip range for all Layer s. |
protected void |
setAllClip(long tmin,
long tmax,
double min,
double max)
|
protected void |
setAllClip(SoTRange xr,
SoTRange yr)
Set the clip range for all Layer s. |
protected void |
setAllClipping(boolean clip)
Turn on clipping for all Layer s. |
void |
setBaseUnit(int base)
Set the base units. |
void |
setClipping(boolean clip)
Set clipping on or off. |
void |
setEditClasses(boolean b)
Enable sgt object property editing |
void |
setId(java.lang.String id)
Set the identifier |
abstract void |
setKeyBoundsP(Rectangle2D.Double r)
Set the bounds for the line or color key. |
void |
setKeyLayerSizeP(Dimension2D d)
Set the size of the key layer in physical coordinates. |
void |
setOverlayed(boolean over)
Set flag to overlay the layers. |
abstract void |
setRange(Domain domain)
Set the axes to to range specified by the Domain
object. |
void |
setTitles(java.lang.String title,
java.lang.String title2,
java.lang.String title3)
Set the plot titles. |
Methods inherited from class javax.swing.JLayeredPane |
---|
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gov.noaa.pmel.sgt.AbstractPane |
---|
getBounds |
Field Detail |
---|
public static final int X_AXIS
SGTData
.
public static final int Y_AXIS
SGTData
.
public static final int Z_AXIS
SGTData
.
protected static double XSIZE_
protected static double XMIN_
protected static double XMAX_
protected static double YSIZE_
protected static double YMIN_
protected static double YMAX_
protected static double MAIN_TITLE_HEIGHT_
protected static double TITLE_HEIGHT_
protected static double LABEL_HEIGHT_
protected static double WARN_HEIGHT_
protected static double KEY_HEIGHT_
protected static double XKEYSIZE_
protected static double YKEYSIZE_
protected static java.awt.Color PANE_COLOR
protected static java.awt.Color KEYPANE_COLOR
protected int base_units_
protected JPane keyPane_
protected java.util.Vector data_
SGTData
storage
protected java.util.Hashtable dataAttrMap_
protected java.lang.String ident_
protected boolean overlayed_
protected boolean clipping_
protected java.awt.Image iconImage_
protected SGLabel mainTitle_
protected SGLabel title2_
protected SGLabel title3_
protected gov.noaa.pmel.sgt.swing.JGraphicLayout.SymMouse aSymMouse_
protected boolean editClasses_
sgt
object properties
protected SGLabelDialog sg_props_
SGLabelDialog
protected SpaceAxisDialog pa_props_
SpaceAxisDialog
protected TimeAxisDialog ta_props_
TimeAxisDialog
protected LogoDialog lo_props_
LogoDialog
protected java.beans.PropertyChangeSupport changes_
PropertyChangeSupport
protected java.beans.VetoableChangeSupport vetos_
VetoableChangeSupport
Constructor Detail |
---|
public JGraphicLayout()
public JGraphicLayout(java.lang.String id, java.awt.Image img)
JGraphicLayout
constructor.
id
- identifierimg
- icon imageJPlotLayout
public JGraphicLayout(java.lang.String id, java.awt.Image img, java.awt.Dimension size)
JGraphicLayout
constructor.
id
- identifierimg
- icon imagesize
- graph size in device unitsJPlotLayout
Method Detail |
---|
public void setId(java.lang.String id)
setId
in interface AbstractPane
setId
in class JPane
id
- layout identifierpublic java.lang.String getId()
getId
in interface AbstractPane
getId
in class JPane
public void setTitles(java.lang.String title, java.lang.String title2, java.lang.String title3)
title
- main plot titletitle2
- secondary plot titletitle3
- tertiary plot titlepublic void setBaseUnit(int base)
SGTData
added to the list. Other
SGTData
objects added
thereafter will be converted to the standard display units for each
base unit type. (TEMPERATURE, default units are "degC"; VELOCITY,
default units are "m/s"; DISTANCE, default unis are "m"). NOTE: Presently
the units supported are very limited.
Units.NONE
,
Units.TEMPERATURE
,
Units.VELOCITY
,
Units.DISTANCE
public int getBaseUnit()
public void setOverlayed(boolean over)
over
- if true overlay layers if false stackpublic boolean isOverlayed()
public java.awt.Image getIconImage()
public JPane getKeyPane()
public boolean isKeyPane()
public void addData(SGTData data)
data
- data to be addedpublic void addAttribute(SGTData data, Attribute attr)
SGTData
with an
Attribute
. The associations are managed by a
Hashtable
object.
public Attribute getAttribute(SGTData data) throws DataNotFoundException
Attribute
given a SGTData
object.
DataNotFoundException
public Attribute findAttribute(java.lang.String id)
Attribute
given an id.
public abstract void addData(SGTData data, java.lang.String label)
public abstract java.lang.String getLocationSummary(SGTData grid)
public Range2D findRange(SGTLine data, int dir)
SGTLine
object in the specific
direction.
data
- SGTLine objectdir
- directionCartesianGraph
public SoTRange findSoTRange(SGTLine line, int dir)
SGTLine
object in the specific
direction.
data
- SGTLine objectdir
- direction
SoTRange
objectCartesianGraph
public SoTRange findSoTRange(SGTVector data, int dir)
SGTVector
object in the
specified direction. Uses the U component to find X, Y ranges.
data
- the data vectordir
- the direction
SoTRange
objectpublic SoTRange findSoTRange(SGTGrid data, GridAttribute attr, int dir)
SGTGrid
object in the
specified direction.
data
- the data gridattr
- the grid attributedir
- the direction
SoTRange
objectpublic Range2D findRange(SGTGrid data, GridAttribute attr, int dir)
SGTGrid
object in the
specified direction.
data
- the data gridattr
- the grid attributedir
- the directionpublic TimeRange findTimeRange(SGTLine data)
SGTLine
object.
data
- SGTLine objectCartesianGraph
public TimeRange findTimeRange(SGTGrid data, GridAttribute attr)
TimeRange
of the SGTGrid
object.
data
- the data gridattr
- the grid attributedir
- the directionpublic void setClipping(boolean clip)
clip
- true if clipping is onpublic boolean isClipping()
public abstract void resetZoom()
SGTData
objects.
public abstract void setRange(Domain domain) throws java.beans.PropertyVetoException
Domain
object.
java.beans.PropertyVetoException
public Domain getRange()
Domain
public Domain getZoomBoundsU()
protected java.lang.String getLatString(double lat)
protected java.lang.String getLonString(double lond)
public Collection getData()
Collection
public void setEditClasses(boolean b)
sgt
object property editing
public boolean isEditClasses()
sgt
objects editable?
protected void setAllClip(SoTRange xr, SoTRange yr)
Layer
s.
protected void setAllClip(double xmin, double xmax, double ymin, double ymax)
Layer
s.
protected void setAllClip(GeoDate tmin, GeoDate tmax, double min, double max)
Layer
s.
protected void setAllClip(long tmin, long tmax, double min, double max)
protected void setAllClipping(boolean clip)
Layer
s.
public abstract Rectangle2D.Double getKeyBoundsP()
public abstract void setKeyBoundsP(Rectangle2D.Double r)
public Dimension2D getKeyLayerSizeP()
public void setKeyLayerSizeP(Dimension2D d)
public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
addVetoableChangeListener
in class javax.swing.JComponent
public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
removeVetoableChangeListener
in class javax.swing.JComponent
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
AbstractPane
Pane
and JPane
include
"objectSelected" and "zoomRectangle".
addPropertyChangeListener
in interface AbstractPane
addPropertyChangeListener
in class JPane
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
AbstractPane
removePropertyChangeListener
in interface AbstractPane
removePropertyChangeListener
in class JPane
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |