Class GraphLayouts
java.lang.Object
it.univr.di.cstnu.gui.layout.GraphLayouts
Registry of the graph layouts available to the user interface.
The ordered list returned by available() is the canonical
source of truth for the UI menu: it defines both which layouts exist and
the order in which they are presented to the user. Layout classes must
not be instantiated elsewhere in the UI; use this factory instead so that
adding or removing a layout requires only a change here.
- Author:
- posenato
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<GraphLayout> Returns the list of layouts offered to the user, in UI display order:StoredLayout("Saved") — leaves coordinates as stored;FruchtermanReingoldLayout("Force-directed") — force-directed placement;CircleLayout("Circle") — circular placement.
-
Method Details
-
available
Returns the list of layouts offered to the user, in UI display order:StoredLayout("Saved") — leaves coordinates as stored;FruchtermanReingoldLayout("Force-directed") — force-directed placement;CircleLayout("Circle") — circular placement.
Each call returns a new, independent list with fresh layout instances.
- Returns:
- an unmodifiable list of available layouts, never null, never empty
-