samples.preview_new_graphdraw.transform
Class PipelineResizingTransformer

java.lang.Object
  extended by samples.preview_new_graphdraw.transform.PipelineResizingTransformer
All Implemented Interfaces:
LayoutTransformer

public class PipelineResizingTransformer
extends Object
implements LayoutTransformer

Changes an EmittedLayout from a fixed size to a new fixed size. Vertices are scaled directly.

Author:
danyelf

Constructor Summary
PipelineResizingTransformer()
           
 
Method Summary
 void adjustSize(Dimension d)
          Adjusts this transformer to be working in this size a space
 Coordinates invert(Coordinates in)
          This does the *reverse* of the trasformation, for a given point.
 boolean supportsInvert()
          Most functions should support invert.
 EmittedLayout transform(EmittedLayout el)
          Transforms the given layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelineResizingTransformer

public PipelineResizingTransformer()
Method Detail

transform

public EmittedLayout transform(EmittedLayout el)
Description copied from interface: LayoutTransformer
Transforms the given layout. May (but needn't) return the same layout object, albeit somewhat stomped-upon.

Specified by:
transform in interface LayoutTransformer
See Also:
LayoutTransformer.transform(samples.preview_new_graphdraw.EmittedLayout)

adjustSize

public void adjustSize(Dimension d)
Description copied from interface: LayoutTransformer
Adjusts this transformer to be working in this size a space

Specified by:
adjustSize in interface LayoutTransformer
See Also:
LayoutTransformer.adjustSize(java.awt.Dimension)

supportsInvert

public boolean supportsInvert()
Description copied from interface: LayoutTransformer
Most functions should support invert. If your layout transformer can't be inverted, this should return false. Note that having even one layout be un-invertible makes the whole pipeline un-invertble.

Specified by:
supportsInvert in interface LayoutTransformer
Returns:
true if the layout can be inverted.
See Also:
LayoutTransformer.supportsInvert()

invert

public Coordinates invert(Coordinates in)
Description copied from interface: LayoutTransformer
This does the *reverse* of the trasformation, for a given point. This should be quite fast, as it's done in interactive time (e.g. while a user is dragging around a vertex).

Specified by:
invert in interface LayoutTransformer
See Also:
LayoutTransformer.invert(samples.preview_new_graphdraw.Coordinates)