hudson.matrix
Class Layouter<T>

java.lang.Object
  extended by hudson.matrix.Layouter<T>

public abstract class Layouter<T>
extends Object

Used to assist thegeneration of config table.

Axes are split into four groups. Ones that are displayed as columns, Ones that are displayed as rows, Ones that are listed as bullet items inside table cell, and those which only have one value, and therefore doesn't show up in the table.

Because of object reuse inside Layouter, this class is not thread-safe.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 class Layouter.Column
           
 class Layouter.Row
          Represents a row, which is a collection of Layouter.Columns.
 
Field Summary
 List<Axis> x
           
 List<Axis> y
           
 List<Axis> z
           
 
Constructor Summary
Layouter(AxisList axisList)
          Automatically split axes to x,y, and z.
Layouter(List<Axis> x, List<Axis> y, List<Axis> z)
           
 
Method Summary
 List<Layouter.Row> getRows()
          Gets list of Layouter.Rows to be displayed.
protected abstract  T getT(Combination c)
           
 int height(int n)
          Computes the width of n-th Y-axis.
 int repeatX(int n)
          Computes the repeat count of n-th X-axis.
 int width(int n)
          Computes the width of n-th X-axis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public final List<Axis> x

y

public final List<Axis> y

z

public final List<Axis> z
Constructor Detail

Layouter

public Layouter(List<Axis> x,
                List<Axis> y,
                List<Axis> z)

Layouter

public Layouter(AxisList axisList)
Automatically split axes to x,y, and z.

Method Detail

width

public int width(int n)
Computes the width of n-th X-axis.


repeatX

public int repeatX(int n)
Computes the repeat count of n-th X-axis.


height

public int height(int n)
Computes the width of n-th Y-axis.


getRows

public List<Layouter.Row> getRows()
Gets list of Layouter.Rows to be displayed. The Layouter.Row object is reused, so every value in collection returns the same object (but with different values.)


getT

protected abstract T getT(Combination c)


Copyright © 2004-2013. All Rights Reserved.