[Home] Restricted access for guests. The link to Java source code is disabled
Java source code of 'jhplot.gui.WPlotFrame'
/**
* Copyright (C) DataMelt project. The jHPLot package by S.Chekanov and Work.ORG
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program;
* if not, see .
*
* Additional permission under GNU GPL version 3 section 7:
* If you have received this program as a library with written permission from the DataMelt team,
* you can link or combine this library with your non-GPL project to convey the resulting work.
* In this case, this library should be considered as released under the terms of
* GNU Lesser public license (see ),
* provided you include this license notice and a URL through which recipients can access the
* Corresponding Source.
**/
package jhplot.gui;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.JTabbedPane;
import javax.swing.WindowConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import kcl.waterloo.swing.*;
import kcl.waterloo.actions.ActionManager;
import kcl.waterloo.export.ExportFactory;
import kcl.waterloo.logging.CommonLogger;
import kcl.waterloo.swing.GCFrameInterface;
import kcl.waterloo.swing.GCGridContainer;
import kcl.waterloo.swing.GCGridContainerInterface;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.awt.Graphics2D;
import kcl.waterloo.deploy.pde.PDEGraphics2D;
import kcl.waterloo.export.*;
import kcl.waterloo.gui.file.FileUtil;
/**
* A frame provides a JFrame subclass that supports graphs and grids
* of graphs.
*
* Management of multiple {@code WPlotFrame}s in a JVM instance is coordinated via
* an instance of the {@code FrameManager} class.
*
* Typically, the graphics container for a GCFrame is either:
*
* - a
GCGridContainer - for single grids
* - a
GCTabbedGridContainer - for multiply tabbed grids
*
*
* By default, a {@code GCGridContainer} is used. Its contents will be
* automatically added to Tab 0 of a {@code GCTabbedGridContainer} when required
* and the {@code GCTabbedGridContainer} will become the content pane.
*
* However, the content pane can be another component parenting the graphics
* container e.g. a JPanel with a border layout and the graphics container in
* its center in custom implementations. Use setGraphicsContainer() to direct a
* GCFrame to the appropriate component.
*
*
* For convenience, this class includes add and makeTabbed methods that forward
* calls to the content pane. For other methods, the content pane needs to be
* accessed explicitly.
*
* @author S.Chekanov