com.metsci.glimpse.axis.factory
Interface AxisFactory1D

All Known Implementing Classes:
DefaultAxisFactory1D, FixedAxisFactory1D

public interface AxisFactory1D

Glimpse axes may be used in many different contexts (defined by a unique GlimpseTargetStack). When an axis is used in a new context, a new copy is created for that context (which might have different bounds, or require different rendering). Instances of AxisFactory, which every GlimpseTarget must provide, define how this new copy is created.

Author:
ulman

Method Summary
 Axis1D newAxis(GlimpseTargetStack stack, Axis1D axis)
          Creates a copy of the provided axis which is valid for the given GlimpseTargetStack.
 

Method Detail

newAxis

Axis1D newAxis(GlimpseTargetStack stack,
               Axis1D axis)
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.

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.