org.grinvin.gred.actions

Class SpringEmbedder


public class SpringEmbedder
extends MutableGraphPanelAction

Action that changes the current embedding by means of a spring embedder algorithm. For this action to work the following steps should be followed: For example:
    SpringEmbedder se = new SpringEmbedder (...);
    ...
    JButton button = new JButton (se);
    ...
    se.attachRepeaterTo(button);
 

Field Summary

Fields inherited from class org.grinvin.gred.actions.MutableGraphPanelAction

panel

Constructor Summary

SpringEmbedder(MutableGraphPanel panel)
Construct an action command of this type.

Method Summary

void
actionPerformed(ActionEvent e)
Consolidates the changes.
void
attachRepeaterTo(JButton button)
Attach a repeater to the button associated with this action.

Constructor Details

SpringEmbedder

public SpringEmbedder(MutableGraphPanel panel)
Construct an action command of this type.

Method Details

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.