|
SGT Home | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | 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 FormInner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
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, LEFT, MIDDLE, RIGHT, SPECIFIED_LOCATION, 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 |
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(Domain domain,
boolean testZUp)
Set the x and y range of the domain. |
void |
setRange(SoTDomain std,
boolean testZUp)
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, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, removeAll, removeContainerListener, setLayout, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, 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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, show, show, size, transferFocus |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 panepublic 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 gridisXtime
- if true x coordinate is timeisYTime
- if true y coordinate is timeid
- identifierimg
- Logo imageis_key_pane
- if true LineKey is in separate panepublic 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 pointsisXtime
- if true x coordinate is timeisYTime
- if true y coordinate is timeid
- identifierimg
- Logo imageis_key_pane
- if true LineKey is in separate panepublic 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 VECTORisXtime
- if true x coordinate is timeisYTime
- if true y coordinate is timeid
- identifierimg
- Logo imageis_key_pane
- if true LineKey is in separate paneMethod Detail |
public java.lang.String getLocationSummary(SGTData grid)
JGraphicLayout
getLocationSummary
in class JGraphicLayout
public void addData(Collection lines)
Collection
of lines using the default
attributes and description. The description will be taken from
the dependent variable namepublic void addData(Collection lines, Attribute attr)
Collection
of lines using the default
description. The description will be taken from
the dependent variable namepublic 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 JGraphicLayout
data
- datum data to be addedpublic void addData(SGTData datum, Attribute attr)
data
- datum data to be addedattr
- attribute for graphicspublic 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
Transform
s 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()
JGraphicLayout
SGTData
objects.resetZoom
in class JGraphicLayout
public Domain getRange()
JGraphicLayout
Domain
getRange
in class JGraphicLayout
public void setRange(Domain domain) throws java.beans.PropertyVetoException
setRange
in class JGraphicLayout
range
- new domainpublic void setRange(SoTDomain std, boolean testZUp) throws java.beans.PropertyVetoException
testZUp
- if true, flip the y axis if reversedpublic void setRange(Domain domain, boolean testZUp) throws java.beans.PropertyVetoException
domainRange
.testZUp
- if true, flip the y axis if reversedpublic void setRangeNoVeto(Domain domain)
public SGTData getData(java.lang.String data_id)
data_id
- the idSGTData
public SGTData getData(CartesianRenderer rend)
rend
- the rendererSGTData
public 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()
AbstractPane
Layer
associated with the Pane
getFirstLayer
in class JPane
gov.noaa.pmel.sgt.AbstractPane
Layer
objectpublic void setAxesOriginP(Point2D.Double pt)
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 JGraphicLayout
public Rectangle2D.Double getKeyBoundsP()
getKeyBoundsP
in class JGraphicLayout
public void setKeyAlignment(int vert, int horz)
vert
- vertical alignmenthorz
- horizontal alignmentColorKey
,
LineKey
,
PointCollectionKey
public 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.PropertyChangeListener
java.beans.PropertyChangeListener
evt
- A PropertyChangeEvent object describing the event source
and the property that has changed.public 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
print
in class JPane
java.awt.print.Printable
graphics
- the context into which the page is drawnpageFormat
- the size and orientation of the page being drawnpageIndex
- the zero based index of the page to be drawnpageIndex
specifies a
non-existent page.java.awt.print.PrinterException
- thrown when the print job is terminated.public 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 class JPane
|
SGT Home | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |