|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LayoutBuilder
A LayoutBuilder
provides a specific Layout
instance. The
Builder pattern is more suitable for the Layout instantiation to allow
simpler reusability of Layout's code.
Only the LayoutBuilder of a given layout algorithm is exposed, this way, one can devise different layout algorithms (represented by their respective LayoutBuilder) that uses a same underlying Layout implementation, but that differs only by an aggregation, composition or a property that is set only during instantiation time.
See ClockwiseRotate
and CounterClockwiseRotate
for
a simple example of this pattern. Both are LayoutBuilders that instanciate
Layouts with a different behaviour (the direction of rotation), but both uses
the RotateLayout class. The only difference is the angle provided by the
LayoutBuilder on the time of instantiation of the RotateLayout object.
Method Summary | |
---|---|
Layout |
buildLayout()
Builds an instance of the Layout. |
java.lang.String |
getName()
The name of the behaviour of the Layout's provided by this Builder. |
LayoutUI |
getUI()
User interface attributes (name, description, icon...) for all Layouts built by this builder. |
Method Detail |
---|
java.lang.String getName()
LayoutUI getUI()
LayoutUI
instanceLayout buildLayout()
Layout
instance
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |