org.grinvin.gred.actions
Class SpringEmbedder
public class SpringEmbedder
Action that changes the current embedding by means of a
spring embedder algorithm. For this action to work the following steps
should be followed:
- Create a
JButton
form this action. - Attach the 'repeater' to this button.
For example:
SpringEmbedder se = new SpringEmbedder (...);
...
JButton button = new JButton (se);
...
se.attachRepeaterTo(button);
void | actionPerformed(ActionEvent e) - Consolidates the changes.
|
void | attachRepeaterTo(JButton button) - Attach a repeater to the button associated with this action.
|
SpringEmbedder
public SpringEmbedder(MutableGraphPanel panel)
Construct an action command of this type.
actionPerformed
public void actionPerformed(ActionEvent e)
Consolidates the changes.
attachRepeaterTo
public void attachRepeaterTo(JButton button)
Attach a repeater to the button associated with this action.
Must be called after the button is created from the action for
the spring embedder to work properly.