GrammarScope  4.0.0
Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
grammarscope.jung2.layout.LayoutUtils Class Reference

Static Public Member Functions

static synchronized< V, E > Layout< V, E > scale (final Layout< V, E > layout, final Dimension size0)
 
static synchronized< V, E > Layout< V, E > scale (final Layout< V, E > layout, final double scaleX, final double scaleY)
 
static Point2D getCenter (final Rectangle r)
 
static Point2D getCenter (final Dimension d)
 
static Pair< Rectangle > split (final Dimension size, final boolean vertically, final float ratio)
 
static< V, E > String layoutToString (final Layout< V, E > layout)
 

Private Member Functions

 LayoutUtils ()
 

Static Private Member Functions

static synchronized< V, E > Layout< V, E > scale (final Layout< V, E > layout, final double scaleX, final double scaleY, final Dimension size)
 
static Pair< Rectangle > vSplit (final Dimension size, final float ratio)
 
static Pair< Rectangle > hSplit (final Dimension size, final float ratio)
 

Constructor & Destructor Documentation

◆ LayoutUtils()

grammarscope.jung2.layout.LayoutUtils.LayoutUtils ( )
private

Member Function Documentation

◆ getCenter() [1/2]

static Point2D grammarscope.jung2.layout.LayoutUtils.getCenter ( final Dimension  d)
static

Get center of dimension

Parameters
ddimension
Returns
center point

◆ getCenter() [2/2]

static Point2D grammarscope.jung2.layout.LayoutUtils.getCenter ( final Rectangle  r)
static

Get center of rectangle

Parameters
rrectangle
Returns
center point

◆ hSplit()

static Pair<Rectangle> grammarscope.jung2.layout.LayoutUtils.hSplit ( final Dimension  size,
final float  ratio 
)
staticprivate

Split horizontally

Parameters
sizesize
ratiopartition1/width ratio
Returns
two rectangles

◆ layoutToString()

static <V, E> String grammarscope.jung2.layout.LayoutUtils.layoutToString ( final Layout< V, E >  layout)
static

Dump layout

Parameters
layoutlayout
<V>vertex type
<E>edge type
Returns
layout as string

◆ scale() [1/3]

static synchronized<V, E> Layout<V, E> grammarscope.jung2.layout.LayoutUtils.scale ( final Layout< V, E >  layout,
final Dimension  size0 
)
static

Scale layout

Parameters
layoutlayout
size0new size
<V>vertex type
<E>edge type
Returns
new layout

◆ scale() [2/3]

static synchronized<V, E> Layout<V, E> grammarscope.jung2.layout.LayoutUtils.scale ( final Layout< V, E >  layout,
final double  scaleX,
final double  scaleY 
)
static

Scale layout

Parameters
layoutlayout
scaleXx scale factor
scaleYy scale factor
<V>vertex type
<E>edge type
Returns
new layout

◆ scale() [3/3]

static synchronized<V, E> Layout<V, E> grammarscope.jung2.layout.LayoutUtils.scale ( final Layout< V, E >  layout,
final double  scaleX,
final double  scaleY,
final Dimension  size 
)
staticprivate

Scale layout

Parameters
layoutlayout
scaleXx scale factor
scaleYy scale factor
sizenew size
<V>vertex type
<E>edge type
Returns
new layout

◆ split()

static Pair<Rectangle> grammarscope.jung2.layout.LayoutUtils.split ( final Dimension  size,
final boolean  vertically,
final float  ratio 
)
static

Split

Parameters
sizesize
verticallywhether to spit vertically
ratiopartition1/total ratio
Returns
two rectangles

◆ vSplit()

static Pair<Rectangle> grammarscope.jung2.layout.LayoutUtils.vSplit ( final Dimension  size,
final float  ratio 
)
staticprivate

Split vertically

Parameters
sizesize
ratiopartition1/height ratio
Returns
two rectangles

The documentation for this class was generated from the following file: