com.panayotis.gnuplot.layout
Class AutoGraphLayout

java.lang.Object
  extended by com.panayotis.gnuplot.layout.AutoGraphLayout
All Implemented Interfaces:
GraphLayout, java.io.Serializable
Direct Known Subclasses:
StripeLayout

public class AutoGraphLayout
extends java.lang.Object
implements GraphLayout, java.io.Serializable

Align graphs evenly on the page, in a grid layout, based on

If you manually set metrics and use this, these metrics will be lost

See Also:
Serialized Form

Field Summary
static boolean COLUMNSFIRST
          Draw rows or columns first
static boolean DOWNWARDS
          Orientation of the graph layout
static boolean ROWSFIRST
          Draw rows or columns first
static boolean UPWARDS
          Orientation of the graph layout
 
Constructor Summary
AutoGraphLayout()
          Create a new automatic grid layout.
 
Method Summary
 void setColumns(int cols)
          Manually set the number of columns.
 void setDefinition(Page page, java.lang.StringBuffer buffer)
          Update the capacity of this layout.
 void setDrawFirst(boolean drawfirst)
          Set where the first graph will be put
 void setOrientation(boolean orientation)
          Sey the orientation of the graphs, as being put
 void setRows(int rows)
          Manually set the number of rows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOWNWARDS

public static final boolean DOWNWARDS
Orientation of the graph layout

See Also:
Constant Field Values

UPWARDS

public static final boolean UPWARDS
Orientation of the graph layout

See Also:
Constant Field Values

ROWSFIRST

public static final boolean ROWSFIRST
Draw rows or columns first

See Also:
Constant Field Values

COLUMNSFIRST

public static final boolean COLUMNSFIRST
Draw rows or columns first

See Also:
Constant Field Values
Constructor Detail

AutoGraphLayout

public AutoGraphLayout()
Create a new automatic grid layout. Default values are ROWSFIRST, DOWNWARDS, automatic layout of components

Method Detail

setDrawFirst

public void setDrawFirst(boolean drawfirst)
Set where the first graph will be put

Parameters:
drawfirst - Position of the first graph
See Also:
ROWSFIRST, COLUMNSFIRST

setOrientation

public void setOrientation(boolean orientation)
Sey the orientation of the graphs, as being put

Parameters:
orientation - Selected orientation
See Also:
DOWNWARDS, UPWARDS

setRows

public void setRows(int rows)
Manually set the number of rows. This method overrides the automatic component layout.

Parameters:
rows - Desired number of rows. Set it to -1 to be automatically computed.

setColumns

public void setColumns(int cols)
Manually set the number of columns. This method overrides the automatic component layout.

Parameters:
cols - Desired number of columns. Set it to -1 to be automatically computed.

setDefinition

public void setDefinition(Page page,
                          java.lang.StringBuffer buffer)
Update the capacity of this layout. This manager creates a grid, as much square as possible, if automatic layout is wanted.

Specified by:
setDefinition in interface GraphLayout
Parameters:
page - The page with the elements we would like to position
buffer - Where to send commands, just after the "set multiplot" part.