01: package org.enhydra.jawe.components.graph.actions;
02:
03: import java.awt.event.ActionEvent;
04:
05: import org.enhydra.jawe.ActionBase;
06: import org.enhydra.jawe.JaWEComponent;
07: import org.enhydra.jawe.components.graph.GraphController;
08:
09: /**
10: * Removes start and end bubbles into graph.
11: * @author Sasa Bojanic
12: */
13: public class RemoveStartAndEndBubbles extends ActionBase {
14:
15: public RemoveStartAndEndBubbles(JaWEComponent jawecomponent) {
16: super (jawecomponent);
17: }
18:
19: public void enableDisableAction() {
20: GraphController gc = (GraphController) jawecomponent;
21: setEnabled(gc.getSelectedGraph() != null
22: && gc.getGraphSettings().shouldUseBubbles()
23: && !gc.getSelectedGraph().getXPDLObject().isReadOnly());
24: }
25:
26: public void actionPerformed(ActionEvent e) {
27: GraphController gc = (GraphController) jawecomponent;
28: gc.getSelectedGraph().getGraphManager().removeStartEndBubbles();
29: }
30: }
|