Search this API

y.view
Class SizeConstraintProvider.Default

java.lang.Object
  extended by y.view.SizeConstraintProvider.Default
All Implemented Interfaces:
SizeConstraintProvider
Enclosing interface:
SizeConstraintProvider

public static class SizeConstraintProvider.Default
extends java.lang.Object
implements SizeConstraintProvider

Default implementation of interface SizeConstraintProvider that can be used by NodeRealizers to provide minimum and maximum sizes to layout algorithms.

 

Nested Class Summary
 
Nested classes/interfaces inherited from interface y.view.SizeConstraintProvider
SizeConstraintProvider.Default
 
Constructor Summary
SizeConstraintProvider.Default()
          Creates an instance of Default that will have 0 minimum width and height and Double.MAX_VALUE as maximum width and height.
SizeConstraintProvider.Default(double minWidth, double minHeight, double maxWidth, double maxHeight)
          Creates an instance of Default that will return the given parameters as minimum and maximum sizes.
SizeConstraintProvider.Default(YDimension minSize, YDimension maxSize)
          Creates an instance of Default that will return the given parameters as minimum and maximum sizes.
 
Method Summary
 YDimension getMaximumSize()
          Returns the maximum size that of this SizeConstraintProvider.
 YDimension getMinimumSize()
          Returns the minimum size that of this SizeConstraintProvider.
 void setMaximumSize(YDimension maxSize)
          Sets the maximum size that of this SizeConstraintProvider.
 void setMinimumSize(YDimension minSize)
          Sets the minimum size that of this SizeConstraintProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SizeConstraintProvider.Default

public SizeConstraintProvider.Default()
Creates an instance of Default that will have 0 minimum width and height and Double.MAX_VALUE as maximum width and height.


SizeConstraintProvider.Default

public SizeConstraintProvider.Default(double minWidth,
                                      double minHeight,
                                      double maxWidth,
                                      double maxHeight)
Creates an instance of Default that will return the given parameters as minimum and maximum sizes.

Parameters:
minWidth - the minimum width
minHeight - the minimum height
maxWidth - the maximum width
maxHeight - the maximum height

SizeConstraintProvider.Default

public SizeConstraintProvider.Default(YDimension minSize,
                                      YDimension maxSize)
Creates an instance of Default that will return the given parameters as minimum and maximum sizes.

Parameters:
minSize - the minimum size
maxSize - the maximum size
Method Detail

setMinimumSize

public void setMinimumSize(YDimension minSize)
Sets the minimum size that of this SizeConstraintProvider.

Parameters:
minSize - the minimum size.

getMinimumSize

public YDimension getMinimumSize()
Returns the minimum size that of this SizeConstraintProvider.

Specified by:
getMinimumSize in interface SizeConstraintProvider
Returns:
the minimum size that of this SizeConstraintProvider.

setMaximumSize

public void setMaximumSize(YDimension maxSize)
Sets the maximum size that of this SizeConstraintProvider.

Parameters:
maxSize - the maximum size.

getMaximumSize

public YDimension getMaximumSize()
Returns the maximum size that of this SizeConstraintProvider.

Specified by:
getMaximumSize in interface SizeConstraintProvider
Returns:
the maximum size that of this SizeConstraintProvider.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.