Merge lp:~yrke/tapaal/fix-940280-stepbackforwardenabled into lp:tapaal

Proposed by Kenneth Yrke Jørgensen
Status: Merged
Approved by: Jiri Srba
Approved revision: 665
Merged at revision: 672
Proposed branch: lp:~yrke/tapaal/fix-940280-stepbackforwardenabled
Merge into: lp:tapaal
Diff against target: 140 lines (+11/-77)
2 files modified
src/pipe/gui/AnimationController.java (+8/-75)
src/pipe/gui/GuiFrame.java (+3/-2)
To merge this branch: bzr merge lp:~yrke/tapaal/fix-940280-stepbackforwardenabled
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Mathias Andersen (community) Approve
Review via email: mp+94539@code.launchpad.net

Commit message

Merged branck with fix for bug #940280

Description of the change

Merged branck with fix for bug #940280

To post a comment you must log in.
Revision history for this message
Jiri Srba (srba) wrote :

Line 145 in file src/pipe/gui/GuiFrame.java

System.out.println("Back!");

Is probably not supposed to stay in the merged branch.

Revision history for this message
Mathias Andersen (mande09) :
review: Approve
Revision history for this message
Jiri Srba (srba) :
review: Needs Fixing
Revision history for this message
Jiri Srba (srba) :
review: Approve
Revision history for this message
TAPAAL Janitor (tapaal) wrote :

Attempt to merge into lp:tapaal failed due to conflicts:

text conflict in src/pipe/gui/AnimationController.java

Revision history for this message
Jiri Srba (srba) wrote :

There is a conflict, Kenneth can you take a look?

Revision history for this message
TAPAAL Janitor (tapaal) wrote :

Attempt to merge into lp:tapaal failed due to conflicts:

text conflict in src/pipe/gui/AnimationController.java

Revision history for this message
Jiri Srba (srba) wrote :

A conflict has to be resolved.

review: Needs Fixing
665. By Kenneth Yrke Jørgensen

Merged with trunk

Revision history for this message
Jiri Srba (srba) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/pipe/gui/AnimationController.java'
2--- src/pipe/gui/AnimationController.java 2012-02-24 11:52:06 +0000
3+++ src/pipe/gui/AnimationController.java 2012-02-29 15:33:22 +0000
4@@ -29,6 +29,7 @@
5 import javax.swing.border.EmptyBorder;
6
7 import pipe.dataLayer.NetType;
8+import pipe.gui.GuiFrame.AnimateAction;
9 import pipe.gui.Pipe.ElementType;
10 import pipe.gui.action.GuiAction;
11 import dk.aau.cs.gui.components.NonsearchableJComboBox;
12@@ -91,13 +92,10 @@
13 randomAction, randomAnimateAction, timeAction;
14
15 public AnimationController() {
16- startAction = new AnimateAction("Simulation mode", ElementType.START,
17- "Toggle simulation mode", "Ctrl A", true);
18+ startAction = CreateGui.appGui.startAction;
19
20- stepbackwardAction = new AnimateAction("Step backward", ElementType.STEPBACKWARD,
21- "Step backward", "typed 4");
22- stepforwardAction = new AnimateAction("Step forward", ElementType.STEPFORWARD,
23- "Step forward", "typed 6");
24+ stepbackwardAction = CreateGui.appGui.stepbackwardAction;
25+ stepforwardAction = CreateGui.appGui.stepforwardAction;
26
27 stepbackwardAction.setEnabled(false);
28 stepforwardAction.setEnabled(false);
29@@ -105,10 +103,10 @@
30 // timeAction = new AnimateAction("Time", Pipe.TIMEPASS,
31 // "Let Time pass", "_");
32
33- randomAction = new AnimateAction("Random", ElementType.RANDOM,
34- "Randomly fire a transition", "typed 5");
35- randomAnimateAction = new AnimateAction("Simulate", ElementType.ANIMATE,
36- "Randomly fire a number of transitions", "typed 7", true);
37+ //randomAction = new AnimateAction("Random", ElementType.RANDOM,
38+ // "Randomly fire a transition", "typed 5");
39+ //randomAnimateAction = new AnimateAction("Simulate", ElementType.ANIMATE,
40+ // "Randomly fire a number of transitions", "typed 7", true);
41
42 setLayout(new GridBagLayout());
43 GridBagConstraints c = new GridBagConstraints();
44@@ -315,71 +313,6 @@
45 return timeDelayToSet;
46 }
47
48- class AnimateAction extends GuiAction {
49-
50- /**
51- *
52- */
53- private static final long serialVersionUID = -4066032248332540289L;
54- private ElementType typeID;
55- private AnimationHistoryComponent animBox;
56-
57- AnimateAction(String name, ElementType typeID, String tooltip, String keystroke) {
58- super(name, tooltip, keystroke);
59- this.typeID = typeID;
60- }
61-
62- AnimateAction(String name, ElementType typeID, String tooltip,
63- String keystroke, boolean toggleable) {
64- super(name, tooltip, keystroke, toggleable);
65- this.typeID = typeID;
66- }
67-
68- public AnimateAction(String name, ElementType typeID, String tooltip,
69- KeyStroke keyStroke) {
70- super(name, tooltip, keyStroke);
71- this.typeID = typeID;
72- }
73-
74- public void actionPerformed(ActionEvent ae) {
75-
76- animBox = CreateGui.getAnimationHistory();
77-
78- switch (typeID) {
79- case TIMEPASS:
80- CreateGui.getAnimator().letTimePass(
81- new BigDecimal(1, new MathContext(Pipe.AGE_PRECISION)));
82-
83- setAnimationButtonsEnabled();
84-
85- break;
86-
87- // case Pipe.RANDOM:
88- // animBox.clearStepsForward();
89- // CreateGui.getAnimator().doRandomFiring();
90- //
91- // setAnimationButtonsEnabled();
92- // break;
93-
94- case STEPFORWARD:
95- animBox.stepForward();
96- CreateGui.getAnimator().stepForward();
97- setAnimationButtonsEnabled();
98- break;
99-
100- case STEPBACKWARD:
101- animBox.stepBackwards();
102- CreateGui.getAnimator().stepBack();
103- setAnimationButtonsEnabled();
104- break;
105-
106- default:
107- break;
108- }
109- }
110-
111- }
112-
113 private void setEnabledStepbackwardAction(boolean b) {
114 stepbackwardAction.setEnabled(b);
115
116
117=== modified file 'src/pipe/gui/GuiFrame.java'
118--- src/pipe/gui/GuiFrame.java 2012-02-27 11:01:43 +0000
119+++ src/pipe/gui/GuiFrame.java 2012-02-29 15:33:22 +0000
120@@ -126,7 +126,7 @@
121 private TypeAction transportArcAction;
122
123
124- private AnimateAction startAction, stepforwardAction, stepbackwardAction,
125+ public AnimateAction startAction, stepforwardAction, stepbackwardAction,
126 randomAction, randomAnimateAction, timeAction;
127
128 public boolean dragging = false;
129@@ -1562,9 +1562,10 @@
130 startAction.setSelected(false);
131 appView.changeAnimationMode(false);
132 }
133+
134 stepforwardAction.setEnabled(false);
135 stepbackwardAction.setEnabled(false);
136-
137+
138 // XXX
139 // This is a fix for bug #812694 where on mac some menues are gray after
140 // changing from simulation mode, when displaying a trace. Showing and

Subscribers

People subscribed via source and target branches