|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface is used to modify the default constraints for an Edge without needing to create an extra subclass. When passed to the appropriate constructor for GraphLayout.Edge an instance of this interface will be used to determine the size constraints and weighting for the associated edge.
Note that any values returned from these methods are not checked for correctness and it is part of the contract of any implementation of this interface to ensure their validity.
| Method Summary | |
int |
getMaxSize()
An implementation of this method must return a non-negative integer representing the minimum size of the associated edge. |
int |
getMinSize()
An implementation of this method must return a non-negative integer representing the minimum size of the associated edge. |
int |
getWeight()
An implementation of this method must return a non-negative integer representing the weight of the associated edge. |
void |
invalidate()
This method is invoked when the GraphLayout is reset prior to a layout. |
| Method Detail |
public int getWeight()
Note that because internally the weights of many edges are summed during a layout process; as well as ensuring that each individual weight is non-negative it is also required that the cumulative sum of all the weights along any path which is to be laid out must not be allowed to overflow. Thus it is recommended that values returned from this method remain in the range (0 <= x < 65536) to minimise any chance of overflow.
public int getMinSize()
Note that because internally the sizes of many edges are summed during a layout process; as well as ensuring that each individual size is non-negative it is also required that the cumulative sum of all the sizes along any path which is to be laid out must not be allowed to overflow. Thus it is recommended that values returned from this method remain in the range (0 <= x < 65536) to minimise any chance of overflow.
public int getMaxSize()
Note that unlike getWeight() and getMinSize() there is no issue in returning a boundary value from this method. By default the implementation of this method in the Edge class returns Integer.MAX_VALUE;
public void invalidate()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||