|
SGT Home | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JLayeredPane
|
+--gov.noaa.pmel.sgt.JPane
|
+--gov.noaa.pmel.sgt.swing.JGraphicLayout
|
+--gov.noaa.pmel.sgt.swing.JPlotLayout
JPlotLayout creates a pre-defined graphics layout for
SGTLine, SGTGrid,
Collection, SGTVector,
and PointCollection data.
LineCartesianRenderer,
PointCartesianRenderer,
GridCartesianRenderer,
VectorCartesianRenderer,
Serialized Form| Field Summary | |
static int |
GRID
|
static int |
LINE
|
static int |
POINTS
|
static int |
VECTOR
|
| Fields inherited from class gov.noaa.pmel.sgt.swing.JGraphicLayout |
X_AXIS, Y_AXIS, Z_AXIS |
| 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 |
TOOL_TIP_TEXT_KEY, 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 | |
JPlotLayout(boolean isGrid,
boolean isPoints,
boolean isXTime,
boolean isYTime,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. |
|
JPlotLayout(boolean isGrid,
boolean isXTime,
boolean isYTime,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. |
|
JPlotLayout(int type,
boolean isXTime,
boolean isYTime,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. |
|
JPlotLayout(SGTData dataset)
Default constructor. |
|
JPlotLayout(SGTData dataset,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. |
|
| Method Summary | |
void |
addData(Collection lines)
Add a Collection of lines using the default
attributes and description. |
void |
addData(Collection lines,
Attribute attr)
Add a Collection of lines using the default
description. |
void |
addData(Collection lines,
Attribute attr,
java.lang.String descrip)
Add a Collecdtion of lines. |
void |
addData(Collection lines,
java.lang.String descrip)
Add a Collection of lines using the default
attributes. |
void |
addData(PointCollection points,
java.lang.String descrip)
Add a PointCollection. |
void |
addData(SGTData datum)
Add data to the layout. |
void |
addData(SGTData datum,
Attribute attr)
Add data to the layout. |
void |
addData(SGTData datum,
Attribute attr,
java.lang.String descrip)
Add data to the layout. |
void |
addData(SGTData datum,
java.lang.String descrip)
Add data to the layout. |
void |
clear()
Remove all data from the JPlotLayout |
void |
clear(java.lang.String data_id)
Remove a specific dataset from the JPlotLayout |
SGTData |
getData(CartesianRenderer rend)
Find a dataset from the renderer. |
SGTData |
getData(java.lang.String data_id)
Find a dataset from the data's id. |
Layer |
getFirstLayer()
Get the first Layer associated with the Pane |
SoTDomain |
getGraphDomain()
|
Rectangle2D.Double |
getKeyBoundsP()
Get the key size in physical units |
Point2D.Double |
getKeyPositionP()
Get the key position in physical units |
Dimension2D |
getLayerSizeP()
Get the JPlotLayout layer size in physical
coordinates. |
java.lang.String |
getLocationSummary(SGTData grid)
Construct a string that summarizes the location of the data. |
double |
getMainTitleHeightP()
Get main label height in physical units |
Domain |
getRange()
Get the current Domain |
double |
getSecondaryTitleHeightP()
Get second and third label heights in physical units |
int |
getXAutoIntervals()
Return the number of intervals for the x axis. |
int |
getYAutoIntervals()
Return the number of intervals for the y axis. |
void |
init()
Override JPane init method. |
boolean |
isXAutoRange()
Tests if the auto range feature is enabled for the x axis. |
boolean |
isYAutoRange()
Tests if the auto range feature is enabled for the y axis. |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageIndex)
Implements the print method in
java.awt.print.Printable. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Used by JPlotLayout to listen for changes in line,
grid, vector, and point attributes. |
void |
resetZoom()
Set the axes to the range of the SGTData objects. |
void |
setAutoIntervals(int xint,
int yint)
Set the approximate number of x and y axes intervals for auto range. |
void |
setAutoRange(boolean xauto,
boolean yauto)
Turn on/off the auto range feature for the x and y axes. |
void |
setAxesOriginP(Point2D.Double pt)
Set the axes origin in physical units |
void |
setCoastLine(SGTLine coast)
Set the coastline. |
void |
setKeyAlignment(int vert,
int horz)
Set the key alignment |
void |
setKeyBoundsP(Rectangle2D.Double bounds)
Set the key size in physical units |
void |
setKeyLocationP(Point2D.Double loc)
Set the key position in physical units |
void |
setLayerSizeP(Dimension2D d)
Set the layer size in physical units |
void |
setRange(Domain domain)
Set the x and y range of the domain. |
void |
setRange(SoTDomain std)
Set the x and y range of the domain. |
void |
setRangeNoVeto(Domain domain)
Set the x and y range of the domain. |
void |
setTitleHeightP(double main,
double second)
Set the main and secondary label heights in physical units |
void |
setXAutoIntervals(int xint)
Set the approximate number of x axis intervals for auto range. |
void |
setXAutoRange(boolean xauto)
Turn on/off the auto range feature for the x axis. |
void |
setYAutoIntervals(int yint)
Set the approximate number of y axis intervals for auto range. |
void |
setYAutoRange(boolean yauto)
Turn on/off the auto range feature for the y axis. |
| Methods inherited from class gov.noaa.pmel.sgt.swing.JGraphicLayout |
addAttribute, addPropertyChangeListener, addVetoableChangeListener, findAttribute, findRange, findRange, findSoTRange, findSoTRange, findSoTRange, findTimeRange, findTimeRange, getAttribute, getBaseUnit, getData, getIconImage, getId, getKeyLayerSizeP, getKeyPane, getZoomBoundsU, isClipping, isEditClasses, isKeyPane, isOverlayed, removePropertyChangeListener, removeVetoableChangeListener, setBaseUnit, setClipping, setEditClasses, setId, setKeyLayerSizeP, setOverlayed, setTitles |
| Methods inherited from class javax.swing.JLayeredPane |
getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getPosition, highestLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, remove, setLayer, setLayer, setPosition |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| Methods inherited from class java.awt.Container |
addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.noaa.pmel.sgt.AbstractPane |
getBounds |
| Field Detail |
public static final int POINTS
public static final int LINE
public static final int GRID
public static final int VECTOR
| Constructor Detail |
public JPlotLayout(SGTData dataset)
LineKey
will be in the same JPane.
public JPlotLayout(SGTData dataset,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. Whether the data is GRID,
POINTS, LINE, or VECTOR, isXtime, and isYTime is determined from the dataset.
dataset - the template dataid - identifierimg - Logo imageis_key_pane - if true LineKey is in separate pane
public JPlotLayout(boolean isGrid,
boolean isXTime,
boolean isYTime,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. This constructor is
retained for backward compatability.
isGrid - if true data is gridisYTime - if true y coordinate is timeid - identifierimg - Logo imageis_key_pane - if true LineKey is in separate pane
public JPlotLayout(boolean isGrid,
boolean isPoints,
boolean isXTime,
boolean isYTime,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. All other constructors
call this one. Data is not plotted during construction of the
JPlotLayout object and the addData
method must be called to associated data with this object.
isGrid - if true data is gridisPoints - if true data is pointsisYTime - if true y coordinate is timeid - identifierimg - Logo imageis_key_pane - if true LineKey is in separate pane
public JPlotLayout(int type,
boolean isXTime,
boolean isYTime,
java.lang.String id,
java.awt.Image img,
boolean is_key_pane)
JPlotLayout constructor. All other constructors
call this one. Data is not plotted during construction of the
JPlotLayout object and the addData
method must be called to associated data with this object.
type - type of plot , POINT, GRID, LINE, or VECTORisYTime - if true y coordinate is timeid - identifierimg - Logo imageis_key_pane - if true LineKey is in separate pane| Method Detail |
public java.lang.String getLocationSummary(SGTData grid)
JGraphicLayout
getLocationSummary in class JGraphicLayoutpublic void addData(Collection lines)
Collection of lines using the default
attributes and description. The description will be taken from
the dependent variable name
public void addData(Collection lines,
Attribute attr)
Collection of lines using the default
description. The description will be taken from
the dependent variable name
public void addData(PointCollection points,
java.lang.String descrip)
PointCollection.
public void addData(Collection lines,
java.lang.String descrip)
Collection of lines using the default
attributes.
public void addData(Collection lines,
Attribute attr,
java.lang.String descrip)
Collecdtion of lines.
public void addData(SGTData datum)
addData in class JGraphicLayoutdatum - data to be added
public void addData(SGTData datum,
Attribute attr)
attr - attribute for graphics
public void addData(SGTData datum,
java.lang.String descrip)
JPlotLayout will use a
default attribute.
addData in class JGraphicLayout
public void addData(SGTData datum,
Attribute attr,
java.lang.String descrip)
Z_AXIS will be assigned to Y axis. If this is
not the first invocation of addData a new
Layer will be created. If overlayed, the
Transforms from the first Layer
will be attached and no axes will be created. If not
overlayed, new transforms and axes will be created and
adjusted so that the data is horizontally stacked.
datum - data to be addeddescrip - LineKey description for datumpublic void resetZoom()
JGraphicLayoutSGTData objects.
resetZoom in class JGraphicLayoutpublic Domain getRange()
JGraphicLayoutDomain
getRange in class JGraphicLayout
public void setRange(SoTDomain std)
throws java.beans.PropertyVetoException
java.beans.PropertyVetoException
public void setRange(Domain domain)
throws java.beans.PropertyVetoException
domainRange.
setRange in class JGraphicLayoutjava.beans.PropertyVetoExceptionpublic void setRangeNoVeto(Domain domain)
public SGTData getData(java.lang.String data_id)
data_id - the id
SGTDatapublic SGTData getData(CartesianRenderer rend)
rend - the renderer
SGTDatapublic void clear()
JPlotLayout
public void clear(java.lang.String data_id)
JPlotLayout
data_id - the data idpublic Dimension2D getLayerSizeP()
JPlotLayout layer size in physical
coordinates.
public Layer getFirstLayer()
AbstractPaneLayer associated with the Pane
getFirstLayer in interface AbstractPanegetFirstLayer in class JPaneLayer objectpublic void setAxesOriginP(Point2D.Double pt)
public SoTDomain getGraphDomain()
public void setLayerSizeP(Dimension2D d)
public void setTitleHeightP(double main,
double second)
main - main label heightsecond - second and third label heightpublic double getMainTitleHeightP()
public double getSecondaryTitleHeightP()
public void setKeyBoundsP(Rectangle2D.Double bounds)
setKeyBoundsP in class JGraphicLayoutpublic Rectangle2D.Double getKeyBoundsP()
getKeyBoundsP in class JGraphicLayout
public void setKeyAlignment(int vert,
int horz)
vert - vertical alignmenthorz - horizontal alignmentColorKey,
LineKey,
PointCollectionKeypublic Point2D.Double getKeyPositionP()
public void setKeyLocationP(Point2D.Double loc)
public void propertyChange(java.beans.PropertyChangeEvent evt)
JPlotLayout to listen for changes in line,
grid, vector, and point attributes.
propertyChange in interface java.beans.PropertyChangeListenerpublic void setCoastLine(SGTLine coast)
public int print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageIndex)
print method in
java.awt.print.Printable. Overrides JPane behavior.
print in interface java.awt.print.Printableprint in class JPanepublic void setXAutoRange(boolean xauto)
public void setYAutoRange(boolean yauto)
public void setAutoRange(boolean xauto,
boolean yauto)
public boolean isXAutoRange()
public boolean isYAutoRange()
public void setXAutoIntervals(int xint)
public void setYAutoIntervals(int yint)
public void setAutoIntervals(int xint,
int yint)
public int getXAutoIntervals()
public int getYAutoIntervals()
public void init()
init in interface AbstractPaneinit in class JPane
|
SGT Home | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||