/*
* $Id: JPlotLayout.java,v 1.53 2003/09/15 22:05:41 dwd Exp $
*
* This software is provided by NOAA for full, free and open release. It is
* understood by the recipient/user that NOAA assumes no liability for any
* errors contained in the code. Although this software is released without
* conditions or restrictions in its use, it is expected that appropriate
* credit be given to its author and to the National Oceanic and Atmospheric
* Administration should the software be included by the recipient as an
* element in other product development.
*/
package gov.noaa.pmel.sgt.swing;
import gov.noaa.pmel.sgt.LineKey;
import gov.noaa.pmel.sgt.PointCollectionKey;
import gov.noaa.pmel.sgt.ColorKey;
import gov.noaa.pmel.sgt.VectorKey;
import gov.noaa.pmel.sgt.Layer;
import gov.noaa.pmel.sgt.CartesianGraph;
import gov.noaa.pmel.sgt.CartesianRenderer;
import gov.noaa.pmel.sgt.LineCartesianRenderer;
import gov.noaa.pmel.sgt.PointCartesianRenderer;
import gov.noaa.pmel.sgt.GridCartesianRenderer;
import gov.noaa.pmel.sgt.VectorCartesianRenderer;
import gov.noaa.pmel.sgt.LinearTransform;
import gov.noaa.pmel.sgt.PlainAxis;
import gov.noaa.pmel.sgt.Axis;
import gov.noaa.pmel.sgt.JPane;
import gov.noaa.pmel.sgt.Logo;
import gov.noaa.pmel.sgt.SGLabel;
import gov.noaa.pmel.sgt.LayerNotFoundException;
import gov.noaa.pmel.sgt.Attribute;
import gov.noaa.pmel.sgt.LineAttribute;
import gov.noaa.pmel.sgt.GridAttribute;
import gov.noaa.pmel.sgt.PointAttribute;
import gov.noaa.pmel.sgt.VectorAttribute;
import gov.noaa.pmel.sgt.Graph;
import gov.noaa.pmel.sgt.AxisNotFoundException;
import gov.noaa.pmel.sgt.CartesianGraph;
import gov.noaa.pmel.sgt.SGException;
import gov.noaa.pmel.sgt.StackedLayout;
import gov.noaa.pmel.sgt.TimeAxis;
import gov.noaa.pmel.sgt.ColorMap;
import gov.noaa.pmel.sgt.IndexedColorMap;
import gov.noaa.pmel.sgt.TransformAccess;
import gov.noaa.pmel.sgt.DataNotFoundException;
import gov.noaa.pmel.sgt.AttributeChangeEvent;
import gov.noaa.pmel.util.Debug;
import gov.noaa.pmel.util.SoTValue;
import gov.noaa.pmel.util.SoTPoint;
import gov.noaa.pmel.util.SoTRange;
import gov.noaa.pmel.util.SoTDomain;
import gov.noaa.pmel.util.GeoDate;
import gov.noaa.pmel.util.Domain;
import gov.noaa.pmel.util.Dimension2D;
import gov.noaa.pmel.util.Rectangle2D;
import gov.noaa.pmel.util.Units;
import gov.noaa.pmel.util.IllegalTimeValue;
import gov.noaa.pmel.util.Point2D;
import gov.noaa.pmel.util.Range2D;
import gov.noaa.pmel.util.TimeRange;
import gov.noaa.pmel.sgt.dm.SGTData;
import gov.noaa.pmel.sgt.dm.SGTLine;
import gov.noaa.pmel.sgt.dm.SGTGrid;
import gov.noaa.pmel.sgt.dm.SimpleLine;
import gov.noaa.pmel.sgt.dm.SGTMetaData;
import gov.noaa.pmel.sgt.dm.Collection;
import gov.noaa.pmel.sgt.dm.PointCollection;
import gov.noaa.pmel.sgt.dm.SGTVector;
import java.util.Enumeration;
import java.util.Vector;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Color;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.Component;
import java.awt.geom.AffineTransform;
import java.awt.Point;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.print.*;
import java.beans.PropertyVetoException;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
/**
* <code>JPlotLayout</code> creates a pre-defined graphics layout for
* <code>SGTLine</code>, <code>SGTGrid</code>,
* <code>Collection</code>, <code>SGTVector</code>,
* and <code>PointCollection</code> data.
*
* @author Donald Denbo
* @version $Revision: 1.53 $, $Date: 2003/09/15 22:05:41 $
* @since 2.0
* @see LineCartesianRenderer
* @see PointCartesianRenderer
* @see GridCartesianRenderer
* @see VectorCartesianRenderer
**/
public class JPlotLayout extends JGraphicLayout
implements PropertyChangeListener {
//
// save handles to unique components
//
/**
* @label coastline
* @link aggregation
* @undirected
*/
CartesianGraph coastLine_ = null;
Layer coastLayer_ = null;
Logo logo_;
/**
* @label lineKey
* @link aggregation
* @undirected
*/
LineKey lineKey_;
/**
* @label colorKey
* @link aggregation
* @undirected
*/
ColorKey colorKey_;
/**
* @label pointKey
* @link aggregation
* @undirected
*/
PointCollectionKey pointKey_;
VectorKey vectorKey_;
private boolean computeScroll_ = false;
int layerCount_;
boolean revXAxis_ = false;
boolean revYAxis_ = false;
Layer firstLayer_;
boolean inZoom_ = false;
GridAttribute gAttr_ = null;
//
private boolean isXTime_ = false;
private boolean isYTime_ = false;
//
// constants
//
double xSize_ = XSIZE_;
double xMin_ = XMIN_;
double xMax_ = XMAX_;
double ySize_ = YSIZE_;
double yMin_ = YMIN_;
double yMax_ = YSIZE_ - 1.0*MAIN_TITLE_HEIGHT_
- 2.0*WARN_HEIGHT_
- 0.5*WARN_HEIGHT_;
//
double mainTitleHeight_ = MAIN_TITLE_HEIGHT_;
double titleHeight_ = TITLE_HEIGHT_;
double labelHeight_ = LABEL_HEIGHT_;
double warnHeight_ = WARN_HEIGHT_;
double keyHeight_ = KEY_HEIGHT_;
//
double xKeySize_ = XKEYSIZE_;
double yKeySize_ = YKEYSIZE_;
//
Color paneColor_ = PANE_COLOR;
Color keyPaneColor_ = KEYPANE_COLOR;
//
boolean autoRangeX_ = false;
boolean autoRangeY_ = false;
int autoXIntervals_ = 10;
int autoYIntervals_ = 10;
//
public static final int POINTS = 0;
public static final int LINE = 1;
public static final int GRID = 2;
public static final int VECTOR = 3;
//
private int plotType_ = -1;
//
private static final Color[] colorList_ =
{ Color.blue, Color.cyan.darker(), Color.green, Color.orange.darker(),
Color.red, Color.magenta, Color.black, Color.gray};
// {Color.red, Color.green, Color.blue, Color.cyan,
// Color.magenta, Color.yellow, Color.orange, Color.pink};
private static final int[] markList_ =
{1, 2, 9, 15, 10, 24, 11, 44};
private static String LEFT_AXIS = "Left Axis";
private static String BOTTOM_AXIS = "Bottom Axis";
// public JPlotLayout(SGTData dataset, String dataKey) {
// this(dataset, "", null, false);
// }
/**
* Default constructor. No Logo image is used and the <code>LineKey</code>
* will be in the same <code>JPane</code>.
*/
public JPlotLayout(SGTData dataset) {
this(dataset, "", null, false);
}
/**
* <code>JPlotLayout</code> constructor. Whether the data is GRID,
* POINTS, LINE, or VECTOR, isXtime, and isYTime is determined from the dataset.
*
* @param dataset the template data
* @param id identifier
* @param img Logo image
* @param is_key_pane if true LineKey is in separate pane
*/
public JPlotLayout(SGTData dataset, String id, Image img,
boolean is_key_pane) {
this(dataset instanceof SGTGrid? GRID:
(dataset instanceof PointCollection? POINTS: (dataset instanceof SGTVector? VECTOR: LINE)),
dataset.isXTime(), dataset.isYTime(), id, img, is_key_pane);
}
/**
* <code>JPlotLayout</code> constructor. This constructor is
* retained for backward compatability.
*
* @param isGrid if true data is grid
* @param isXtime if true x coordinate is time
* @param isYTime if true y coordinate is time
* @param id identifier
* @param img Logo image
* @param is_key_pane if true LineKey is in separate pane
*/
public JPlotLayout(boolean isGrid, boolean isXTime,
boolean isYTime, String id, Image img,
boolean is_key_pane) {
this(isGrid? GRID: LINE,
isXTime, isYTime, id, img, is_key_pane);
}
/**
* <code>JPlotLayout</code> constructor. All other constructors
* call this one. Data is not plotted during construction of the
* <code>JPlotLayout</code> object and the <code>addData</code>
* method must be called to associated data with this object.
*
* @param isGrid if true data is grid
* @param isPoints if true data is points
* @param isXtime if true x coordinate is time
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
sgt.zip_RAB_可视化_数据可视化 (1311个子文件)
java.policy.applet 141B
finerezcoast.bin 759KB
finerezcoast.bin 759KB
coarserezcoast.bin 80KB
coarserezcoast.bin 80KB
JPlotLayout.class 46KB
AddDataFrame.class 29KB
AddDataFrame.class 28KB
GeoDateDialog.class 26KB
ContourLineAttributeDialog.class 26KB
GridAttributeDialog.class 24KB
JGraphicLayout.class 23KB
JLineProfileLayout.class 23KB
TimeAxisDialog.class 23KB
SpaceAxisDialog.class 22KB
PanelModelCustomizer.class 22KB
DataGroupLayer.class 21KB
VectorKey.class 19KB
Contour.class 19KB
AxisHolderPropertyPanel.class 19KB
RulerDialog.class 18KB
DefaultContourLineAttributeDialog.class 18KB
PaneProxy.class 17KB
BorderDialog.class 17KB
TimeAxis.class 17KB
VectorAttributeDialog.class 16KB
Ruler.class 16KB
PropertyPanel.class 16KB
JClassTree.class 16KB
TAOMap.class 16KB
SGLabelDialog.class 15KB
LineAttributeDialog.class 15KB
DesignPanel.class 15KB
AxisHolder.class 15KB
LineKey.class 15KB
GridCartesianRenderer.class 15KB
PointCollectionKey.class 15KB
CartesianGraph.class 15KB
Panel.class 14KB
BeanDemoFrame.class 14KB
LabelDrawer2.class 13KB
Layer.class 13KB
LabelDrawer1.class 13KB
PointAttributeDialog.class 13KB
ColorKey.class 13KB
GeoDate.class 12KB
VectorCartesianRenderer.class 12KB
JLayoutDemo.class 12KB
ContourLevelsDialog.class 12KB
PanelModel.class 12KB
AnnotationCartesianRenderer.class 12KB
BeanTestFrame.class 12KB
JSlider2Double.class 12KB
TestData.class 11KB
LegendPropertyPanel.class 11KB
ThreeDGrid.class 11KB
LogAxis.class 11KB
SGLabel.class 11KB
JPane.class 11KB
Axis.class 11KB
ContourLineAttribute.class 11KB
Legend.class 11KB
Annotation.class 11KB
NewLevelsDialog.class 11KB
LogoDialog.class 11KB
JSlider2.class 11KB
PanelHolder.class 10KB
ValueIcon.class 10KB
ContourLine.class 10KB
ArrayEditDialog.class 10KB
AxisHolderDragBox.class 10KB
Page.class 10KB
PlainAxis.class 10KB
SimpleTuple.class 10KB
SimpleGrid.class 9KB
JGridDemo.class 9KB
UserIcon.class 9KB
LabelPropertyPanel.class 9KB
PanelModelEditor.class 9KB
VectorAttribute.class 9KB
JDesktopDemo.class 9KB
Format.class 9KB
Logo.class 9KB
JRealTimeDemo.class 9KB
PointCartesianRenderer.class 9KB
PlotMark.class 8KB
LineCartesianRenderer.class 8KB
Pane.class 8KB
PanelHolderPropertyPanel.class 8KB
LineAttribute.class 8KB
FontDialog.class 8KB
Label.class 8KB
DataGroup.class 8KB
JSystemPropertiesDialog.class 8KB
SpaceAxis.class 8KB
SimpleLine.class 8KB
PanelHolderDragBox.class 7KB
JPointDemo.class 7KB
PanelModelPropertyPanel.class 7KB
Temperature.class 7KB
共 1311 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论
小贝德罗
- 粉丝: 69
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 部署yolov9模型ncnn模型到树莓派4或5嵌入式C++源码.zip
- 2024年上半年三星评定题库(客运) (1).xlsx
- 大学院校基础信息表(3237所大学)
- docker-compose-linux-x86-64
- 基于深度学习的常用显示接口及触摸屏液晶屏测试方法,适合FPGA初学者
- YOLOv9 QT+NCNN实现安卓端部署源码+部署步骤+演示apk.zip
- 【计算机毕业设计】基于SSM+Vue的网上花店系统【源码+lw+部署文档+讲解】
- 使用NCNN在安卓平台上部署YOLOv8实现实时目标检测分割旋转框源码.zip
- C# 调用ComfyUI 接口小案例,可以生成任务,可以获取图片,可以显示图片
- opencv-基于c++实现的opencv图像处理算法之直方图均衡算法.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功