Class Plot3DWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, TopcatListener
Direct Known Subclasses:
Cartesian3DWindow, SphereWindow

public abstract class Plot3DWindow extends GraphicsWindow implements TopcatListener
Graphics window for viewing 3D scatter plots.
Since:
22 Nov 2005
Author:
Mark Taylor
See Also:
  • Constructor Details

    • Plot3DWindow

      public Plot3DWindow(String viewName, String[] axisNames, int naux, Component parent, ErrorModeSelectionModel[] errorModeModels, uk.ac.starlink.ttools.plot.Plot3D plot)
      Constructor.
      Parameters:
      viewName - name of the view window
      axisNames - array of labels by which each axis is known; the length of this array defines the dimensionality of the plot
      naux - number of auxiliary axes
      parent - parent window - may be used for positioning
      errorModeModels - array of selecction models for error modes
      plot - the Plot3D object on which plotting is done
  • Method Details

    • setRotation

      public void setRotation(double[] matrix)
      Sets the viewing angle.
      Parameters:
      matrix - 9-element array giving rotation of data space
    • getPlotPanel

      protected JComponent getPlotPanel()
      Description copied from class: GraphicsWindow
      Returns the component containing the graphics output of this window. This is the component which is exported or printed etc alongside the legend which is managed by GraphicsWindow. It should therefore contain only the output data, not any user interface decoration.
      Specified by:
      getPlotPanel in class GraphicsWindow
      Returns:
      plot container
    • createPlotState

      protected uk.ac.starlink.ttools.plot.PlotState createPlotState()
      Description copied from class: GraphicsWindow
      Constructs a new PlotState. This is called by GraphicsWindow.getPlotState() prior to the PlotState configuration done there. Thus if a subclass wants to provide and configure a particular state (for instance one of a specialised subclass of PlotState) it can override this method to do so. The default implementation just invokes new PlotState().
      Overrides:
      createPlotState in class GraphicsWindow
      Returns:
      returns a new PlotState object ready for generic configuration
    • getPlotState

      public uk.ac.starlink.ttools.plot.PlotState getPlotState()
      Description copied from class: GraphicsWindow
      Returns an object which characterises the choices the user has made in the GUI to indicate the plot that s/he wants to see.

      The GraphicsWindow implementation of this method as well as populating the state with standard information also calls PointSelection.readPoints(javax.swing.BoundedRangeModel) and GraphicsWindow.calculateRanges(uk.ac.starlink.topcat.plot.PointSelection, uk.ac.starlink.topcat.plot.Points, uk.ac.starlink.ttools.plot.PlotState) if necessary.

      Overrides:
      getPlotState in class GraphicsWindow
      Returns:
      snapshot of the currently-selected plot request
    • getDefaultStyles

      public uk.ac.starlink.ttools.plot.StyleSet getDefaultStyles(int npoint)
      Description copied from class: GraphicsWindow
      Returns a StyleSet which can supply markers. The npoint may be used as a hint for how many points are expected to be drawn with it.
      Specified by:
      getDefaultStyles in class GraphicsWindow
      Parameters:
      npoint - approximate number of points - use -1 for unknown
      Returns:
      style factory
    • doReplot

      protected void doReplot(uk.ac.starlink.ttools.plot.PlotState state)
      Description copied from class: GraphicsWindow
      Performs an actual plot.
      Overrides:
      doReplot in class GraphicsWindow
      Parameters:
      state - plot state determining details of plot configuration
    • getNorthModel

      public ToggleButtonModel getNorthModel()
      Returns the model which toggles whether the orientation of the plot always points up on the screen.
      Returns:
      keep north action
    • modelChanged

      public void modelChanged(TopcatEvent evt)
      Description copied from interface: TopcatListener
      Invoked when the model has changed in some way.
      Specified by:
      modelChanged in interface TopcatListener
      Parameters:
      evt - event description