com.metsci.glimpse.axis.factory
Class DefaultAxisFactory1D

java.lang.Object
  extended by com.metsci.glimpse.axis.factory.DefaultAxisFactory1D
All Implemented Interfaces:
AxisFactory1D

public class DefaultAxisFactory1D
extends java.lang.Object
implements AxisFactory1D

The default AxisFactory1D implementation which GlimpseAxisLayout1D and GlimpseAxisLayout2D use in absence of another explicitly set AxisFactory.

Author:
ulman
See Also:
GlimpseAxisLayout1D, GlimpseAxisLayout2D

Constructor Summary
DefaultAxisFactory1D()
           
 
Method Summary
static Axis1D newAxis(Axis1D axis)
           
 Axis1D newAxis(GlimpseTargetStack stack, Axis1D axis)
          Creates a copy of the provided axis which is valid for the given GlimpseTargetStack.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAxisFactory1D

public DefaultAxisFactory1D()
Method Detail

newAxis

public static Axis1D newAxis(Axis1D axis)

newAxis

public Axis1D newAxis(GlimpseTargetStack stack,
                      Axis1D axis)
Description copied from interface: AxisFactory1D
Creates a copy of the provided axis which is valid for the given GlimpseTargetStack.

Normally, this method simply calls Axis1D.clone( ) which returns a copied axis linked to the original. However, other implementations of AxisFactory may have different behavior (perhaps not linking the original and copy, or setting the copy to a fixed size).

The GlimpseTargetStack argument may be used if the axis which is created should be different depending on where the axis is being used. Most normal implementations can ignore this.

Specified by:
newAxis in interface AxisFactory1D
Parameters:
stack - the context in which the axis is being used
axis - the original/parent axis
Returns:
a new Axis1D which will be used when the original axis is used in the context described by the GlimpseTargetStack argument


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