com.metsci.glimpse.plot
Class StackedPlot2D.PlotInfoImpl

java.lang.Object
  extended by com.metsci.glimpse.plot.StackedPlot2D.PlotInfoImpl
All Implemented Interfaces:
StackedPlot2D.PlotInfo
Enclosing class:
StackedPlot2D

public static class StackedPlot2D.PlotInfoImpl
extends java.lang.Object
implements StackedPlot2D.PlotInfo


Constructor Summary
StackedPlot2D.PlotInfoImpl(StackedPlot2D parent, java.lang.String id, int order, int size, GlimpseAxisLayout2D layout)
           
 
Method Summary
 void addLayout(GlimpseAxisLayout2D childLayout)
          Adds the childLayout to the part of the StackedPlot2D represented by this LayoutInfo.
 Axis1D getCommonAxis()
          Returns the common axis shared by all the plots in a StackedPlot2D.
 Axis1D getCommonAxis(GlimpseTargetStack stack)
          Returns the common axis associated with the given GlimpseTargetStack.
 java.lang.String getId()
          Gets the unique identifier assigned to this plot.
 GlimpseAxisLayout2D getLayout()
          Returns the GlimpseLayout for this plot.
 int getOrder()
           
 Axis1D getOrthogonalAxis()
          Returns the data axis associated with this plot.
 Axis1D getOrthogonalAxis(GlimpseTargetStack stack)
          Returns the data axis associated with the given GlimpseTargetStack.
 int getSize()
           
 StackedPlot2D getStackedPlot()
          Gets a reference to the parent StackedPlot2D which this PlotInfo belongs to.
 void setOrder(int order)
          Sets the ordering of this plot relative to the other plots in the StackedPlot2D.
 void setSize(int size)
          Sets the size in pixels for this plot.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackedPlot2D.PlotInfoImpl

public StackedPlot2D.PlotInfoImpl(StackedPlot2D parent,
                                  java.lang.String id,
                                  int order,
                                  int size,
                                  GlimpseAxisLayout2D layout)
Method Detail

getStackedPlot

public StackedPlot2D getStackedPlot()
Description copied from interface: StackedPlot2D.PlotInfo
Gets a reference to the parent StackedPlot2D which this PlotInfo belongs to.

Specified by:
getStackedPlot in interface StackedPlot2D.PlotInfo
Returns:
the parent StackedPlot2D

getId

public java.lang.String getId()
Description copied from interface: StackedPlot2D.PlotInfo
Gets the unique identifier assigned to this plot. This identifier can be used to retrieve this plot handle from the StackedPlot2D.

Specified by:
getId in interface StackedPlot2D.PlotInfo
Returns:
the plot unique identifier

getOrder

public int getOrder()
Specified by:
getOrder in interface StackedPlot2D.PlotInfo
Returns:
the ordering value for this plot

getSize

public int getSize()
Specified by:
getSize in interface StackedPlot2D.PlotInfo
Returns:
the pixel size of this plot

setOrder

public void setOrder(int order)
Description copied from interface: StackedPlot2D.PlotInfo
Sets the ordering of this plot relative to the other plots in the StackedPlot2D. The particular value does not matter, only the values relative to other plots. All plots start with order 0. Plots with the same order value are arranged in the order they were added to the StackedPlot2D.

Specified by:
setOrder in interface StackedPlot2D.PlotInfo
Parameters:
order - the ordering value for this plot

setSize

public void setSize(int size)
Description copied from interface: StackedPlot2D.PlotInfo
Sets the size in pixels for this plot. If size < 0, then the plot will attempt to fill all available space, sharing space evenly with other plots with negative size.

For a VERTICAL oriented plot, setSize( ) adjusts the plot height, for a HORIZONTAL oriented plot, the width is adjusted.

Specified by:
setSize in interface StackedPlot2D.PlotInfo
Parameters:
size - the size of the plot in pixels.

getLayout

public GlimpseAxisLayout2D getLayout()
Description copied from interface: StackedPlot2D.PlotInfo
Returns the GlimpseLayout for this plot. This can be used to add subplots of painters to the plotting area.

Specified by:
getLayout in interface StackedPlot2D.PlotInfo

getCommonAxis

public Axis1D getCommonAxis(GlimpseTargetStack stack)
Description copied from interface: StackedPlot2D.PlotInfo
Returns the common axis associated with the given GlimpseTargetStack. Users generally should simply call StackedPlot2D.PlotInfo.getCommonAxis().

Specified by:
getCommonAxis in interface StackedPlot2D.PlotInfo

getOrthogonalAxis

public Axis1D getOrthogonalAxis(GlimpseTargetStack stack)
Description copied from interface: StackedPlot2D.PlotInfo
Returns the data axis associated with the given GlimpseTargetStack. Users generally should simply call StackedPlot2D.PlotInfo.getOrthogonalAxis().

Specified by:
getOrthogonalAxis in interface StackedPlot2D.PlotInfo

getCommonAxis

public Axis1D getCommonAxis()
Description copied from interface: StackedPlot2D.PlotInfo
Returns the common axis shared by all the plots in a StackedPlot2D.

Specified by:
getCommonAxis in interface StackedPlot2D.PlotInfo
Returns:
the shared axis for this plot

getOrthogonalAxis

public Axis1D getOrthogonalAxis()
Description copied from interface: StackedPlot2D.PlotInfo
Returns the data axis associated with this plot. The data axes for each GlimpseLayout in a StackedPlot2D are unlinked by default, but they can be linked if desired using Axis1D.setParent( Axis1D ).

Specified by:
getOrthogonalAxis in interface StackedPlot2D.PlotInfo
Returns:
the data axis for this plot

addLayout

public void addLayout(GlimpseAxisLayout2D childLayout)
Description copied from interface: StackedPlot2D.PlotInfo
Adds the childLayout to the part of the StackedPlot2D represented by this LayoutInfo. Also links the common axis of the child to the common axis of the parent layout.

Specified by:
addLayout in interface StackedPlot2D.PlotInfo


Copyright © 2012 Metron, Inc.. All Rights Reserved.