Merge lp:~yrke/tapaal/drawcode-cleanup-extreme into lp:tapaal

Proposed by Kenneth Yrke Jørgensen
Status: Merged
Merged at revision: 618
Proposed branch: lp:~yrke/tapaal/drawcode-cleanup-extreme
Merge into: lp:tapaal
Prerequisite: lp:~yrke/tapaal/drawcode-cleanup
Diff against target: 6956 lines (+902/-1496)
184 files modified
src/dk/aau/cs/TCTL/Parsing/TAPAALQueryParser.java (+21/-21)
src/dk/aau/cs/TCTL/TCTLAFNode.java (+2/-2)
src/dk/aau/cs/TCTL/TCTLAGNode.java (+2/-2)
src/dk/aau/cs/TCTL/TCTLAndListNode.java (+6/-6)
src/dk/aau/cs/TCTL/TCTLAtomicPropositionNode.java (+6/-6)
src/dk/aau/cs/TCTL/TCTLEFNode.java (+2/-2)
src/dk/aau/cs/TCTL/TCTLEGNode.java (+2/-2)
src/dk/aau/cs/TCTL/TCTLFalseNode.java (+1/-1)
src/dk/aau/cs/TCTL/TCTLNotNode.java (+1/-1)
src/dk/aau/cs/TCTL/TCTLOrListNode.java (+6/-6)
src/dk/aau/cs/TCTL/TCTLStatePlaceHolder.java (+1/-1)
src/dk/aau/cs/TCTL/TCTLTrueNode.java (+1/-1)
src/dk/aau/cs/TCTL/visitors/BooleanResult.java (+1/-1)
src/dk/aau/cs/TCTL/visitors/BroadcastTranslationQueryVisitor.java (+3/-3)
src/dk/aau/cs/TCTL/visitors/OptimizedStandardTranslationQueryVisitor.java (+3/-3)
src/dk/aau/cs/TCTL/visitors/QueryVisitor.java (+9/-9)
src/dk/aau/cs/TCTL/visitors/RenamePlaceTCTLVisitor.java (+2/-2)
src/dk/aau/cs/TCTL/visitors/SimplifyPropositionsVisitor.java (+1/-1)
src/dk/aau/cs/TCTL/visitors/StandardSymmetryTranslationQueryVisitor.java (+1/-1)
src/dk/aau/cs/TCTL/visitors/StandardTranslationQueryVisitor.java (+2/-2)
src/dk/aau/cs/TCTL/visitors/VerifyPlaceNamesVisitor.java (+5/-5)
src/dk/aau/cs/gui/BatchProcessingDialog.java (+1/-1)
src/dk/aau/cs/gui/Context.java (+4/-4)
src/dk/aau/cs/gui/SharedPlaceNamePanel.java (+2/-2)
src/dk/aau/cs/gui/SharedPlacesAndTransitionsPanel.java (+9/-10)
src/dk/aau/cs/gui/SharedTransitionNamePanel.java (+2/-2)
src/dk/aau/cs/gui/TabComponent.java (+1/-1)
src/dk/aau/cs/gui/TabContent.java (+2/-2)
src/dk/aau/cs/gui/TemplateExplorer.java (+4/-4)
src/dk/aau/cs/gui/components/BatchProcessingResultsTableModel.java (+1/-1)
src/dk/aau/cs/gui/components/ConstantsListModel.java (+7/-7)
src/dk/aau/cs/gui/components/MultiLineAutoWrappingTooltipUI.java (+1/-1)
src/dk/aau/cs/gui/components/TextLabel.java (+1/-1)
src/dk/aau/cs/gui/components/TimedPlaceControl.java (+1/-1)
src/dk/aau/cs/gui/undo/MakePlaceSharedCommand.java (+3/-3)
src/dk/aau/cs/gui/undo/MakeTransitionSharedCommand.java (+1/-1)
src/dk/aau/cs/gui/undo/TimedPlaceMarkingEdit.java (+2/-2)
src/dk/aau/cs/gui/undo/UnsharePlaceCommand.java (+1/-1)
src/dk/aau/cs/io/TapnLegacyXmlLoader.java (+23/-27)
src/dk/aau/cs/io/TapnXmlLoader.java (+23/-24)
src/dk/aau/cs/io/TimedArcPetriNetNetworkWriter.java (+14/-14)
src/dk/aau/cs/io/batchProcessing/BatchProcessingLegacyLoader.java (+2/-5)
src/dk/aau/cs/io/batchProcessing/BatchProcessingLoader.java (+1/-1)
src/dk/aau/cs/io/batchProcessing/BatchProcessingResultsExporter.java (+10/-10)
src/dk/aau/cs/model/NTA/StandardUPPAALQuery.java (+1/-1)
src/dk/aau/cs/model/NTA/SupQuery.java (+2/-2)
src/dk/aau/cs/model/NTA/trace/SymbolicState.java (+2/-2)
src/dk/aau/cs/model/NTA/trace/TimeDelayFiringAction.java (+1/-1)
src/dk/aau/cs/model/NTA/trace/TransitionFiring.java (+1/-1)
src/dk/aau/cs/model/NTA/trace/UppaalTrace.java (+2/-2)
src/dk/aau/cs/model/tapn/Bound.java (+2/-2)
src/dk/aau/cs/model/tapn/Constant.java (+6/-6)
src/dk/aau/cs/model/tapn/ConstantBound.java (+1/-1)
src/dk/aau/cs/model/tapn/LocalTimedMarking.java (+1/-1)
src/dk/aau/cs/model/tapn/LocalTimedPlace.java (+3/-3)
src/dk/aau/cs/model/tapn/SharedPlace.java (+1/-1)
src/dk/aau/cs/model/tapn/SharedTransition.java (+1/-1)
src/dk/aau/cs/model/tapn/TAPNQuery.java (+1/-1)
src/dk/aau/cs/model/tapn/TimeInterval.java (+9/-9)
src/dk/aau/cs/model/tapn/TimeInvariant.java (+4/-4)
src/dk/aau/cs/model/tapn/TimedArcPetriNet.java (+9/-9)
src/dk/aau/cs/model/tapn/TimedArcPetriNetNetwork.java (+4/-4)
src/dk/aau/cs/model/tapn/TimedInputArc.java (+1/-1)
src/dk/aau/cs/model/tapn/TimedMarking.java (+13/-13)
src/dk/aau/cs/model/tapn/TimedOutputArc.java (+1/-1)
src/dk/aau/cs/model/tapn/TimedPlace.java (+15/-15)
src/dk/aau/cs/model/tapn/TimedToken.java (+1/-1)
src/dk/aau/cs/model/tapn/TimedTransition.java (+2/-2)
src/dk/aau/cs/model/tapn/TransportArc.java (+2/-2)
src/dk/aau/cs/model/tapn/event/ConstantsListener.java (+3/-3)
src/dk/aau/cs/translations/Pairing.java (+1/-1)
src/dk/aau/cs/translations/TranslationNamingScheme.java (+1/-1)
src/dk/aau/cs/translations/tapn/BroadcastTranslation.java (+4/-4)
src/dk/aau/cs/translations/tapn/Degree2BroadcastKBoundOptimizeTranslation.java (+6/-6)
src/dk/aau/cs/translations/tapn/Degree2BroadcastTranslation.java (+1/-1)
src/dk/aau/cs/translations/tapn/OptimizedStandardTranslation.java (+2/-5)
src/dk/aau/cs/translations/tapn/StandardTranslation.java (+3/-9)
src/dk/aau/cs/verification/TAPNComposer.java (+4/-4)
src/dk/aau/cs/verification/UPPAAL/Verifyta.java (+2/-2)
src/dk/aau/cs/verification/UPPAAL/VerifytaOptions.java (+2/-2)
src/dk/aau/cs/verification/UPPAAL/VerifytaTraceInterpreter.java (+1/-1)
src/dk/aau/cs/verification/UPPAAL/VerifytaTraceParser.java (+1/-1)
src/dk/aau/cs/verification/VerificationResult.java (+1/-1)
src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java (+2/-2)
src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNOptions.java (+7/-7)
src/dk/aau/cs/verification/batchProcessing/BatchProcessingVerificationResult.java (+2/-5)
src/dk/aau/cs/verification/batchProcessing/BatchProcessingWorker.java (+3/-6)
src/net/tapaal/TAPAAL.java (+0/-1)
src/pipe/dataLayer/DataLayer.java (+16/-8)
src/pipe/dataLayer/PNMLWriter.java (+1/-1)
src/pipe/dataLayer/TAPNQuery.java (+12/-12)
src/pipe/gui/AnimationController.java (+12/-12)
src/pipe/gui/Animator.java (+3/-3)
src/pipe/gui/CopyPasteable.java (+4/-4)
src/pipe/gui/CreateGui.java (+4/-4)
src/pipe/gui/DrawingSurfaceImpl.java (+23/-29)
src/pipe/gui/Export.java (+2/-2)
src/pipe/gui/GuiFrame.java (+63/-63)
src/pipe/gui/KBoundAnalyzer.java (+1/-1)
src/pipe/gui/Pipe.java (+2/-2)
src/pipe/gui/RunVerification.java (+3/-3)
src/pipe/gui/SelectionManager.java (+13/-16)
src/pipe/gui/StatusBar.java (+1/-1)
src/pipe/gui/TikZExporter.java (+26/-23)
src/pipe/gui/Translatable.java (+1/-1)
src/pipe/gui/VersionChecker.java (+1/-1)
src/pipe/gui/Zoomable.java (+1/-1)
src/pipe/gui/Zoomer.java (+2/-2)
src/pipe/gui/action/DeletePetriNetObjectAction.java (+3/-3)
src/pipe/gui/action/EditAnnotationBackgroundAction.java (+1/-1)
src/pipe/gui/action/EditAnnotationBorderAction.java (+1/-1)
src/pipe/gui/action/EditNoteAction.java (+1/-1)
src/pipe/gui/action/EditWeightAction.java (+0/-62)
src/pipe/gui/action/InsertPointAction.java (+1/-1)
src/pipe/gui/action/ShowHideInfoAction.java (+1/-1)
src/pipe/gui/action/SplitArcAction.java (+1/-1)
src/pipe/gui/action/SplitArcPointAction.java (+1/-1)
src/pipe/gui/action/ToggleArcPointAction.java (+1/-1)
src/pipe/gui/graphicElements/AnnotationNote.java (+13/-30)
src/pipe/gui/graphicElements/Arc.java (+34/-111)
src/pipe/gui/graphicElements/ArcPath.java (+12/-18)
src/pipe/gui/graphicElements/ArcPathPoint.java (+3/-11)
src/pipe/gui/graphicElements/NameLabel.java (+3/-10)
src/pipe/gui/graphicElements/Note.java (+1/-4)
src/pipe/gui/graphicElements/PetriNetObject.java (+8/-41)
src/pipe/gui/graphicElements/Place.java (+24/-77)
src/pipe/gui/graphicElements/PlaceTransitionObject.java (+21/-37)
src/pipe/gui/graphicElements/Transition.java (+16/-161)
src/pipe/gui/graphicElements/tapn/TimedInhibitorArcComponent.java (+9/-7)
src/pipe/gui/graphicElements/tapn/TimedInputArcComponent.java (+18/-16)
src/pipe/gui/graphicElements/tapn/TimedOutputArcComponent.java (+18/-17)
src/pipe/gui/graphicElements/tapn/TimedPlaceComponent.java (+26/-36)
src/pipe/gui/graphicElements/tapn/TimedTransitionComponent.java (+6/-18)
src/pipe/gui/graphicElements/tapn/TimedTransportArcComponent.java (+14/-17)
src/pipe/gui/handler/AnimationHandler.java (+1/-1)
src/pipe/gui/handler/AnnotationNoteHandler.java (+1/-3)
src/pipe/gui/handler/ArcHandler.java (+7/-44)
src/pipe/gui/handler/ArcKeyboardEventHandler.java (+4/-6)
src/pipe/gui/handler/ArcPathPointHandler.java (+1/-5)
src/pipe/gui/handler/LabelHandler.java (+2/-2)
src/pipe/gui/handler/NoteHandler.java (+1/-1)
src/pipe/gui/handler/PetriNetObjectHandler.java (+6/-5)
src/pipe/gui/handler/PlaceHandler.java (+6/-10)
src/pipe/gui/handler/PlaceTransitionObjectHandler.java (+24/-34)
src/pipe/gui/handler/SpecialMacHandler.java (+0/-2)
src/pipe/gui/handler/TAPNTransitionHandler.java (+8/-16)
src/pipe/gui/handler/TimedArcHandler.java (+4/-4)
src/pipe/gui/handler/TransitionHandler.java (+7/-14)
src/pipe/gui/handler/TransportArcHandler.java (+4/-4)
src/pipe/gui/undo/AddArcPathPointEdit.java (+3/-3)
src/pipe/gui/undo/AddPetriNetObjectEdit.java (+1/-1)
src/pipe/gui/undo/AddTimedInhibitorArcCommand.java (+1/-1)
src/pipe/gui/undo/AddTimedInputArcCommand.java (+1/-1)
src/pipe/gui/undo/AddTimedOutputArcCommand.java (+1/-1)
src/pipe/gui/undo/AddTimedPlaceCommand.java (+1/-1)
src/pipe/gui/undo/AddTimedTransitionCommand.java (+1/-1)
src/pipe/gui/undo/AddTransportArcCommand.java (+1/-1)
src/pipe/gui/undo/AnnotationBorderEdit.java (+1/-1)
src/pipe/gui/undo/AnnotationTextEdit.java (+1/-1)
src/pipe/gui/undo/ArcPathPointTypeEdit.java (+1/-1)
src/pipe/gui/undo/ArcTimeIntervalEdit.java (+1/-1)
src/pipe/gui/undo/ArcWeightEdit.java (+0/-45)
src/pipe/gui/undo/DeleteArcPathPointEdit.java (+3/-3)
src/pipe/gui/undo/DeletePetriNetObjectEdit.java (+1/-1)
src/pipe/gui/undo/DeleteTimedInhibitorArcCommand.java (+1/-1)
src/pipe/gui/undo/DeleteTimedInputArcCommand.java (+1/-1)
src/pipe/gui/undo/DeleteTimedOutputArcCommand.java (+1/-1)
src/pipe/gui/undo/DeleteTimedPlaceCommand.java (+3/-3)
src/pipe/gui/undo/DeleteTimedTransitionCommand.java (+2/-2)
src/pipe/gui/undo/DeleteTransportArcCommand.java (+1/-1)
src/pipe/gui/undo/TimedPlaceInvariantEdit.java (+1/-1)
src/pipe/gui/undo/TransitionRotationEdit.java (+1/-1)
src/pipe/gui/undo/TranslatePetriNetObjectEdit.java (+1/-1)
src/pipe/gui/undo/TransportArcGroupEdit.java (+2/-2)
src/pipe/gui/undo/UndoManager.java (+13/-14)
src/pipe/gui/widgets/AnnotationPanel.java (+3/-3)
src/pipe/gui/widgets/ChooseInclusionPlacesDialog.java (+3/-4)
src/pipe/gui/widgets/ConstantsDialogPanel.java (+6/-6)
src/pipe/gui/widgets/ConstantsPane.java (+2/-3)
src/pipe/gui/widgets/GuardDialogue.java (+4/-4)
src/pipe/gui/widgets/PlaceEditorPanel.java (+2/-2)
src/pipe/gui/widgets/QueryDialog.java (+4/-5)
src/pipe/gui/widgets/QueryPane.java (+2/-2)
src/pipe/gui/widgets/TAPNTransitionEditor.java (+1/-1)
To merge this branch: bzr merge lp:~yrke/tapaal/drawcode-cleanup-extreme
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Kenneth Yrke Jørgensen Approve
Review via email: mp+78929@code.launchpad.net

Commit message

Merged branch drawcode-cleanup-extreme

Large changes in the pipe gui, making it more consistent with "the TAPAAL way", and how the new TAPN model layer.
The code has been Audited with state of the art tool fixing found problems and optimizing the code

Description of the change

Large changes in the pipe gui, making it more consistent with "the TAPAAL way", and how the new TAPN model layer.
The code has been Audited with state of the art tool fixing found problems and optimizing the code

To post a comment you must log in.
Revision history for this message
Kenneth Yrke Jørgensen (yrke) :
review: Approve
Revision history for this message
Jiri Srba (srba) :
review: Approve
640. By Kenneth Yrke Jørgensen

Merged dracode-cleanup

641. By Kenneth Yrke Jørgensen

Merged with trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dk/aau/cs/TCTL/Parsing/TAPAALQueryParser.java'
2--- src/dk/aau/cs/TCTL/Parsing/TAPAALQueryParser.java 2011-06-28 16:30:37 +0000
3+++ src/dk/aau/cs/TCTL/Parsing/TAPAALQueryParser.java 2011-10-14 12:17:24 +0000
4@@ -36,26 +36,26 @@
5 private static final String ERROR_PARSING_QUERY_MESSAGE = "TAPAAL countered an error trying to parse the query";
6
7 public interface SymbolConstants {
8- final int SYMBOL_EOF = 0; // (EOF)
9- final int SYMBOL_ERROR = 1; // (Error)
10- final int SYMBOL_WHITESPACE = 2; // (Whitespace)
11- final int SYMBOL_EXCLAM = 3; // '!'
12- final int SYMBOL_AMPAMP = 4; // '&&'
13- final int SYMBOL_LPARAN = 5; // '('
14- final int SYMBOL_RPARAN = 6; // ')'
15- final int SYMBOL_DOT = 7; // '.'
16- final int SYMBOL_PIPEPIPE = 8; // '||'
17- final int SYMBOL_LT = 9; // '<'
18- final int SYMBOL_LTEQ = 10; // '<='
19- final int SYMBOL_EQ = 11; // '='
20- final int SYMBOL_EQEQ = 12; // '=='
21- final int SYMBOL_GT = 13; // '>'
22- final int SYMBOL_GTEQ = 14; // '>='
23- final int SYMBOL_ALBRACKETRBRACKET = 15; // 'A[]'
24- final int SYMBOL_ALTGT = 16; // 'A<>'
25- final int SYMBOL_AF = 17; // AF
26- final int SYMBOL_AG = 18; // AG
27- final int SYMBOL_AND = 19; // and
28+ int SYMBOL_EOF = 0; // (EOF)
29+ int SYMBOL_ERROR = 1; // (Error)
30+ int SYMBOL_WHITESPACE = 2; // (Whitespace)
31+ int SYMBOL_EXCLAM = 3; // '!'
32+ int SYMBOL_AMPAMP = 4; // '&&'
33+ int SYMBOL_LPARAN = 5; // '('
34+ int SYMBOL_RPARAN = 6; // ')'
35+ int SYMBOL_DOT = 7; // '.'
36+ int SYMBOL_PIPEPIPE = 8; // '||'
37+ int SYMBOL_LT = 9; // '<'
38+ int SYMBOL_LTEQ = 10; // '<='
39+ int SYMBOL_EQ = 11; // '='
40+ int SYMBOL_EQEQ = 12; // '=='
41+ int SYMBOL_GT = 13; // '>'
42+ int SYMBOL_GTEQ = 14; // '>='
43+ int SYMBOL_ALBRACKETRBRACKET = 15; // 'A[]'
44+ int SYMBOL_ALTGT = 16; // 'A<>'
45+ int SYMBOL_AF = 17; // AF
46+ int SYMBOL_AG = 18; // AG
47+ int SYMBOL_AND = 19; // and
48 final int SYMBOL_ELBRACKETRBRACKET = 20; // 'E[]'
49 final int SYMBOL_ELTGT = 21; // 'E<>'
50 final int SYMBOL_EF = 22; // EF
51@@ -146,7 +146,7 @@
52 temp.deleteOnExit();
53 PrintStream out = new PrintStream(temp);
54 out.append(textToParse);
55- out.append("\n");
56+ out.append('\n');
57 out.close();
58
59 // open temp file
60
61=== modified file 'src/dk/aau/cs/TCTL/TCTLAFNode.java'
62--- src/dk/aau/cs/TCTL/TCTLAFNode.java 2011-02-11 18:11:16 +0000
63+++ src/dk/aau/cs/TCTL/TCTLAFNode.java 2011-10-14 12:17:24 +0000
64@@ -21,8 +21,8 @@
65 }
66
67 public TCTLAFNode() {
68- this.property = new TCTLStatePlaceHolder();
69- this.property.setParent(this);
70+ property = new TCTLStatePlaceHolder();
71+ property.setParent(this);
72 }
73
74 @Override
75
76=== modified file 'src/dk/aau/cs/TCTL/TCTLAGNode.java'
77--- src/dk/aau/cs/TCTL/TCTLAGNode.java 2011-02-11 18:11:16 +0000
78+++ src/dk/aau/cs/TCTL/TCTLAGNode.java 2011-10-14 12:17:24 +0000
79@@ -21,8 +21,8 @@
80 }
81
82 public TCTLAGNode() {
83- this.property = new TCTLStatePlaceHolder();
84- this.property.setParent(this);
85+ property = new TCTLStatePlaceHolder();
86+ property.setParent(this);
87 }
88
89 @Override
90
91=== modified file 'src/dk/aau/cs/TCTL/TCTLAndListNode.java'
92--- src/dk/aau/cs/TCTL/TCTLAndListNode.java 2011-02-11 18:11:16 +0000
93+++ src/dk/aau/cs/TCTL/TCTLAndListNode.java 2011-10-14 12:17:24 +0000
94@@ -30,14 +30,14 @@
95
96 public TCTLAndListNode(TCTLAbstractStateProperty property1,
97 TCTLAbstractStateProperty property2) {
98- this.properties = new ArrayList<TCTLAbstractStateProperty>();
99+ properties = new ArrayList<TCTLAbstractStateProperty>();
100
101 addConjunct(property1);
102 addConjunct(property2);
103 }
104
105 public TCTLAndListNode(TCTLAndListNode andListNode) {
106- this.properties = new ArrayList<TCTLAbstractStateProperty>();
107+ properties = new ArrayList<TCTLAbstractStateProperty>();
108
109 for (TCTLAbstractStateProperty p : andListNode.properties) {
110 addConjunct(p.copy());
111@@ -45,13 +45,13 @@
112 }
113
114 public TCTLAndListNode() {
115- this.properties = new ArrayList<TCTLAbstractStateProperty>();
116+ properties = new ArrayList<TCTLAbstractStateProperty>();
117 TCTLStatePlaceHolder ph = new TCTLStatePlaceHolder();
118 ph.setParent(this);
119- this.properties.add(ph);
120+ properties.add(ph);
121 ph = new TCTLStatePlaceHolder();
122 ph.setParent(this);
123- this.properties.add(ph);
124+ properties.add(ph);
125 }
126
127 public void addConjunct(TCTLAbstractStateProperty conjunct) {
128@@ -146,7 +146,7 @@
129 TCTLAbstractProperty object2) {
130 if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
131 TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
132- obj2.setParent(this.parent);
133+ obj2.setParent(parent);
134 return obj2;
135 } else {
136 for (int i = 0; i < properties.size(); i++) {
137
138=== modified file 'src/dk/aau/cs/TCTL/TCTLAtomicPropositionNode.java'
139--- src/dk/aau/cs/TCTL/TCTLAtomicPropositionNode.java 2011-02-11 18:11:16 +0000
140+++ src/dk/aau/cs/TCTL/TCTLAtomicPropositionNode.java 2011-10-14 12:17:24 +0000
141@@ -65,9 +65,9 @@
142 TCTLAtomicPropositionNode node = (TCTLAtomicPropositionNode) o;
143 // TODO: Not sure if this is intentional but this is reference
144 // equals and not equality
145- return this.template == node.template
146- && this.place == node.getPlace() && this.op == node.getOp()
147- && this.n == node.getN();
148+ return template.equals(node.template)
149+ && place.equals(node.getPlace()) && op.equals(node.getOp())
150+ && n == node.getN();
151 }
152 return false;
153 }
154@@ -77,7 +77,7 @@
155 TCTLAbstractProperty object2) {
156 if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
157 TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
158- obj2.setParent(this.parent);
159+ obj2.setParent(parent);
160 return obj2;
161 } else {
162 return this;
163@@ -87,7 +87,7 @@
164 @Override
165 public String toString() {
166 String value = place + "" + op + "" + n;
167- return template == null || template.isEmpty() ? value : template + "."
168+ return (template == null || template.isEmpty()) ? value : template + "."
169 + value;
170 }
171
172@@ -113,7 +113,7 @@
173 }
174
175 public void setTemplate(String string) {
176- this.template = string;
177+ template = string;
178 }
179
180 public boolean containsAtomicPropositionWithSpecificPlaceInTemplate(String templateName, String placeName) {
181
182=== modified file 'src/dk/aau/cs/TCTL/TCTLEFNode.java'
183--- src/dk/aau/cs/TCTL/TCTLEFNode.java 2011-02-11 18:11:16 +0000
184+++ src/dk/aau/cs/TCTL/TCTLEFNode.java 2011-10-14 12:17:24 +0000
185@@ -21,8 +21,8 @@
186 }
187
188 public TCTLEFNode() {
189- this.property = new TCTLStatePlaceHolder();
190- this.property.setParent(this);
191+ property = new TCTLStatePlaceHolder();
192+ property.setParent(this);
193 }
194
195 @Override
196
197=== modified file 'src/dk/aau/cs/TCTL/TCTLEGNode.java'
198--- src/dk/aau/cs/TCTL/TCTLEGNode.java 2011-02-11 18:11:16 +0000
199+++ src/dk/aau/cs/TCTL/TCTLEGNode.java 2011-10-14 12:17:24 +0000
200@@ -21,8 +21,8 @@
201 }
202
203 public TCTLEGNode() {
204- this.property = new TCTLStatePlaceHolder();
205- this.property.setParent(this);
206+ property = new TCTLStatePlaceHolder();
207+ property.setParent(this);
208 }
209
210 @Override
211
212=== modified file 'src/dk/aau/cs/TCTL/TCTLFalseNode.java'
213--- src/dk/aau/cs/TCTL/TCTLFalseNode.java 2011-05-14 11:11:41 +0000
214+++ src/dk/aau/cs/TCTL/TCTLFalseNode.java 2011-10-14 12:17:24 +0000
215@@ -11,7 +11,7 @@
216 public TCTLAbstractStateProperty replace(TCTLAbstractProperty object1, TCTLAbstractProperty object2) {
217 if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
218 TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
219- obj2.setParent(this.parent);
220+ obj2.setParent(parent);
221 return obj2;
222 } else {
223 return this;
224
225=== modified file 'src/dk/aau/cs/TCTL/TCTLNotNode.java'
226--- src/dk/aau/cs/TCTL/TCTLNotNode.java 2011-02-11 18:11:16 +0000
227+++ src/dk/aau/cs/TCTL/TCTLNotNode.java 2011-10-14 12:17:24 +0000
228@@ -62,7 +62,7 @@
229 TCTLAbstractProperty object2) {
230 if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
231 TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
232- obj2.setParent(this.parent);
233+ obj2.setParent(parent);
234 return obj2;
235 } else {
236 property = property.replace(object1, object2);
237
238=== modified file 'src/dk/aau/cs/TCTL/TCTLOrListNode.java'
239--- src/dk/aau/cs/TCTL/TCTLOrListNode.java 2011-02-11 18:11:16 +0000
240+++ src/dk/aau/cs/TCTL/TCTLOrListNode.java 2011-10-14 12:17:24 +0000
241@@ -29,7 +29,7 @@
242 }
243
244 public TCTLOrListNode(TCTLOrListNode orListNode) {
245- this.properties = new ArrayList<TCTLAbstractStateProperty>();
246+ properties = new ArrayList<TCTLAbstractStateProperty>();
247
248 for (TCTLAbstractStateProperty p : orListNode.properties) {
249 addDisjunct(p.copy());
250@@ -38,20 +38,20 @@
251
252 public TCTLOrListNode(TCTLAbstractStateProperty property1,
253 TCTLAbstractStateProperty property2) {
254- this.properties = new ArrayList<TCTLAbstractStateProperty>();
255+ properties = new ArrayList<TCTLAbstractStateProperty>();
256
257 addDisjunct(property1);
258 addDisjunct(property2);
259 }
260
261 public TCTLOrListNode() {
262- this.properties = new ArrayList<TCTLAbstractStateProperty>();
263+ properties = new ArrayList<TCTLAbstractStateProperty>();
264 TCTLStatePlaceHolder ph = new TCTLStatePlaceHolder();
265 ph.setParent(this);
266- this.properties.add(ph);
267+ properties.add(ph);
268 ph = new TCTLStatePlaceHolder();
269 ph.setParent(this);
270- this.properties.add(ph);
271+ properties.add(ph);
272 }
273
274 public void addDisjunct(TCTLAbstractStateProperty disjunct) {
275@@ -146,7 +146,7 @@
276 TCTLAbstractProperty object2) {
277 if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
278 TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
279- obj2.setParent(this.parent);
280+ obj2.setParent(parent);
281 return obj2;
282 } else {
283 for (int i = 0; i < properties.size(); i++) {
284
285=== modified file 'src/dk/aau/cs/TCTL/TCTLStatePlaceHolder.java'
286--- src/dk/aau/cs/TCTL/TCTLStatePlaceHolder.java 2011-02-11 18:11:16 +0000
287+++ src/dk/aau/cs/TCTL/TCTLStatePlaceHolder.java 2011-10-14 12:17:24 +0000
288@@ -39,7 +39,7 @@
289 TCTLAbstractProperty object2) {
290 if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
291 TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
292- obj2.setParent(this.parent);
293+ obj2.setParent(parent);
294 return obj2;
295 } else {
296 return this;
297
298=== modified file 'src/dk/aau/cs/TCTL/TCTLTrueNode.java'
299--- src/dk/aau/cs/TCTL/TCTLTrueNode.java 2011-05-12 18:07:24 +0000
300+++ src/dk/aau/cs/TCTL/TCTLTrueNode.java 2011-10-14 12:17:24 +0000
301@@ -11,7 +11,7 @@
302 public TCTLAbstractStateProperty replace(TCTLAbstractProperty object1, TCTLAbstractProperty object2) {
303 if (this == object1 && object2 instanceof TCTLAbstractStateProperty) {
304 TCTLAbstractStateProperty obj2 = (TCTLAbstractStateProperty) object2;
305- obj2.setParent(this.parent);
306+ obj2.setParent(parent);
307 return obj2;
308 } else {
309 return this;
310
311=== modified file 'src/dk/aau/cs/TCTL/visitors/BooleanResult.java'
312--- src/dk/aau/cs/TCTL/visitors/BooleanResult.java 2011-03-27 09:10:43 +0000
313+++ src/dk/aau/cs/TCTL/visitors/BooleanResult.java 2011-10-14 12:17:24 +0000
314@@ -8,7 +8,7 @@
315 }
316
317 public BooleanResult(boolean initialValue){
318- this.result = initialValue;
319+ result = initialValue;
320 }
321
322 public boolean result(){
323
324=== modified file 'src/dk/aau/cs/TCTL/visitors/BroadcastTranslationQueryVisitor.java'
325--- src/dk/aau/cs/TCTL/visitors/BroadcastTranslationQueryVisitor.java 2011-02-03 19:03:15 +0000
326+++ src/dk/aau/cs/TCTL/visitors/BroadcastTranslationQueryVisitor.java 2011-10-14 12:17:24 +0000
327@@ -27,7 +27,7 @@
328 append("(i).");
329 append(atomicPropositionNode.getPlace());
330 append(") ");
331- append(OperatorConversion(atomicPropositionNode.getOp()));
332+ append(operatorConversion(atomicPropositionNode.getOp()));
333 append(" ");
334 append(atomicPropositionNode.getN());
335 } else if (totalTokens == 0) {
336@@ -36,7 +36,7 @@
337 append(".");
338 append(atomicPropositionNode.getPlace());
339 append(") ");
340- append(OperatorConversion(atomicPropositionNode.getOp()));
341+ append(operatorConversion(atomicPropositionNode.getOp()));
342 append(" ");
343 append(atomicPropositionNode.getN());
344 } else {
345@@ -52,7 +52,7 @@
346 append(atomicPropositionNode.getPlace());
347 }
348 append(") ");
349- append(OperatorConversion(atomicPropositionNode.getOp()));
350+ append(operatorConversion(atomicPropositionNode.getOp()));
351 append(" ");
352 append(atomicPropositionNode.getN());
353 }
354
355=== modified file 'src/dk/aau/cs/TCTL/visitors/OptimizedStandardTranslationQueryVisitor.java'
356--- src/dk/aau/cs/TCTL/visitors/OptimizedStandardTranslationQueryVisitor.java 2011-05-22 12:57:23 +0000
357+++ src/dk/aau/cs/TCTL/visitors/OptimizedStandardTranslationQueryVisitor.java 2011-10-14 12:17:24 +0000
358@@ -29,13 +29,13 @@
359 append("(i).");
360 append(atomicPropositionNode.getPlace());
361 append(") ");
362- append(OperatorConversion(atomicPropositionNode.getOp()));
363+ append(operatorConversion(atomicPropositionNode.getOp()));
364 append(" ");
365 append(atomicPropositionNode.getN());
366 } else {
367 append("(");
368 append(createAtomicPropositionSum(atomicPropositionNode.getPlace()));
369- append(OperatorConversion(atomicPropositionNode.getOp()));
370+ append(operatorConversion(atomicPropositionNode.getOp()));
371 append(" ");
372 append(atomicPropositionNode.getN());
373 append(")");
374@@ -64,7 +64,7 @@
375 sum.append(" + ");
376 }
377 }
378- sum.append(")");
379+ sum.append(')');
380 return sum.toString();
381 }
382 }
383
384=== modified file 'src/dk/aau/cs/TCTL/visitors/QueryVisitor.java'
385--- src/dk/aau/cs/TCTL/visitors/QueryVisitor.java 2011-05-12 18:07:24 +0000
386+++ src/dk/aau/cs/TCTL/visitors/QueryVisitor.java 2011-10-14 12:17:24 +0000
387@@ -34,7 +34,7 @@
388 }
389
390 public String getUppaalQueryFor(TAPNQuery tapnQuery) {
391- this.uppaalQuery = new StringBuffer();
392+ uppaalQuery = new StringBuffer();
393 tapnQuery.getProperty().accept(this, null);
394 return uppaalQuery.toString();
395 }
396@@ -64,7 +64,7 @@
397 }
398
399 public void visit(TCTLAndListNode andListNode, Object context) {
400- uppaalQuery.append("(");
401+ uppaalQuery.append('(');
402 boolean firstTime = true;
403
404 for (TCTLAbstractStateProperty p : andListNode.getProperties()) {
405@@ -76,12 +76,12 @@
406 firstTime = false;
407 }
408
409- uppaalQuery.append(")");
410+ uppaalQuery.append(')');
411
412 }
413
414 public void visit(TCTLOrListNode orListNode, Object context) {
415- uppaalQuery.append("(");
416+ uppaalQuery.append('(');
417 boolean firstTime = true;
418
419 for (TCTLAbstractStateProperty p : orListNode.getProperties()) {
420@@ -93,15 +93,15 @@
421 firstTime = false;
422 }
423
424- uppaalQuery.append(")");
425+ uppaalQuery.append(')');
426
427 }
428
429 public void visit(TCTLNotNode notNode, Object context) {
430- uppaalQuery.append("!");
431- uppaalQuery.append("(");
432+ uppaalQuery.append('!');
433+ uppaalQuery.append('(');
434 notNode.getProperty().accept(this, context);
435- uppaalQuery.append(")");
436+ uppaalQuery.append(')');
437 }
438
439 public void visit(TCTLStatePlaceHolder statePlaceHolderNode, Object context) {
440@@ -119,7 +119,7 @@
441 uppaalQuery.append(tctlFalseNode.toString());
442 }
443
444- protected String OperatorConversion(String op) {
445+ protected String operatorConversion(String op) {
446 if (op.equals("="))
447 return "==";
448
449
450=== modified file 'src/dk/aau/cs/TCTL/visitors/RenamePlaceTCTLVisitor.java'
451--- src/dk/aau/cs/TCTL/visitors/RenamePlaceTCTLVisitor.java 2011-05-12 18:07:24 +0000
452+++ src/dk/aau/cs/TCTL/visitors/RenamePlaceTCTLVisitor.java 2011-10-14 12:17:24 +0000
453@@ -20,8 +20,8 @@
454 private String newPlaceName;
455
456 public RenamePlaceTCTLVisitor(String oldName, String newName) {
457- this.oldPlaceName = oldName;
458- this.newPlaceName = newName;
459+ oldPlaceName = oldName;
460+ newPlaceName = newName;
461 }
462
463 public void visit(TCTLAFNode afNode, Object context) {
464
465=== modified file 'src/dk/aau/cs/TCTL/visitors/SimplifyPropositionsVisitor.java'
466--- src/dk/aau/cs/TCTL/visitors/SimplifyPropositionsVisitor.java 2011-05-12 18:07:24 +0000
467+++ src/dk/aau/cs/TCTL/visitors/SimplifyPropositionsVisitor.java 2011-10-14 12:17:24 +0000
468@@ -12,7 +12,7 @@
469 List<TCTLAtomicPropositionNode> truePropositions = new ArrayList<TCTLAtomicPropositionNode>();
470 List<TCTLAtomicPropositionNode> falsePropositions = new ArrayList<TCTLAtomicPropositionNode>();
471
472- public void FindAndReplaceTrueAndFalsePropositions(TCTLAbstractProperty query) {
473+ public void findAndReplaceTrueAndFalsePropositions(TCTLAbstractProperty query) {
474 query.accept(this, null);
475
476 for(TCTLAtomicPropositionNode node : truePropositions)
477
478=== modified file 'src/dk/aau/cs/TCTL/visitors/StandardSymmetryTranslationQueryVisitor.java'
479--- src/dk/aau/cs/TCTL/visitors/StandardSymmetryTranslationQueryVisitor.java 2011-03-27 08:57:51 +0000
480+++ src/dk/aau/cs/TCTL/visitors/StandardSymmetryTranslationQueryVisitor.java 2011-10-14 12:17:24 +0000
481@@ -21,7 +21,7 @@
482 append("(i).");
483 append(atomicPropositionNode.getPlace());
484 append(") ");
485- append(OperatorConversion(atomicPropositionNode.getOp()));
486+ append(operatorConversion(atomicPropositionNode.getOp()));
487 append(" ");
488 append(atomicPropositionNode.getN());
489 }
490
491=== modified file 'src/dk/aau/cs/TCTL/visitors/StandardTranslationQueryVisitor.java'
492--- src/dk/aau/cs/TCTL/visitors/StandardTranslationQueryVisitor.java 2011-05-21 13:32:34 +0000
493+++ src/dk/aau/cs/TCTL/visitors/StandardTranslationQueryVisitor.java 2011-10-14 12:17:24 +0000
494@@ -24,7 +24,7 @@
495
496 append("(");
497 append(createAtomicPropositionSum(atomicPropositionNode.getPlace()));
498- append(OperatorConversion(atomicPropositionNode.getOp()));
499+ append(operatorConversion(atomicPropositionNode.getOp()));
500 append(" ");
501 append(atomicPropositionNode.getN());
502 append(")");
503@@ -49,7 +49,7 @@
504 sum.append(" + ");
505 }
506 }
507- sum.append(")");
508+ sum.append(')');
509 return sum.toString();
510 }
511 }
512
513=== modified file 'src/dk/aau/cs/TCTL/visitors/VerifyPlaceNamesVisitor.java'
514--- src/dk/aau/cs/TCTL/visitors/VerifyPlaceNamesVisitor.java 2011-05-12 18:07:24 +0000
515+++ src/dk/aau/cs/TCTL/visitors/VerifyPlaceNamesVisitor.java 2011-10-14 12:17:24 +0000
516@@ -27,7 +27,7 @@
517 this.templatePlaceNames = templatePlaceNames;
518 }
519
520- public Context VerifyPlaceNames(TCTLAbstractProperty query) {
521+ public Context verifyPlaceNames(TCTLAbstractProperty query) {
522 Context c = new Context();
523
524 query.accept(this, c);
525@@ -54,7 +54,7 @@
526 public void visit(TCTLAtomicPropositionNode atomicPropositionNode, Object context) {
527 Context c = (Context) context;
528 if (!templatePlaceNames.contains(new Tuple<String,String>(atomicPropositionNode.getTemplate(), atomicPropositionNode.getPlace()))) {
529- c.AddIncorrectPlaceName(atomicPropositionNode.getTemplate() + "." + atomicPropositionNode.getPlace());
530+ c.addIncorrectPlaceName(atomicPropositionNode.getTemplate() + "." + atomicPropositionNode.getPlace());
531 c.setResult(false);
532 }
533 }
534@@ -98,13 +98,13 @@
535 return incorrectPlaceNames;
536 }
537
538- public void AddIncorrectPlaceName(String incorrectPlaceName) {
539+ public void addIncorrectPlaceName(String incorrectPlaceName) {
540 incorrectPlaceNames.add(incorrectPlaceName);
541 }
542
543 public Context() {
544- this.result = true;
545- this.incorrectPlaceNames = new HashSet<String>();
546+ result = true;
547+ incorrectPlaceNames = new HashSet<String>();
548 }
549 }
550
551
552=== modified file 'src/dk/aau/cs/gui/BatchProcessingDialog.java'
553--- src/dk/aau/cs/gui/BatchProcessingDialog.java 2011-10-09 20:16:40 +0000
554+++ src/dk/aau/cs/gui/BatchProcessingDialog.java 2011-10-14 12:17:24 +0000
555@@ -188,7 +188,7 @@
556 fileList.addListSelectionListener(new ListSelectionListener() {
557
558 public void valueChanged(ListSelectionEvent e) {
559- if (e.getValueIsAdjusting() == false) {
560+ if (!(e.getValueIsAdjusting())) {
561 if (fileList.getSelectedIndex() == -1) {
562 removeFileButton.setEnabled(false);
563 } else {
564
565=== modified file 'src/dk/aau/cs/gui/Context.java'
566--- src/dk/aau/cs/gui/Context.java 2011-05-05 18:02:09 +0000
567+++ src/dk/aau/cs/gui/Context.java 2011-10-14 12:17:24 +0000
568@@ -16,10 +16,10 @@
569
570 public Context(TabContent tab) {
571 Require.that(tab != null, "tab cannot be null");
572- this.currentTab = tab;
573- this.network = tab.network();
574- this.selectedTemplate = tab.currentTemplate();
575- this.undoManager = tab.drawingSurface().getUndoManager();
576+ currentTab = tab;
577+ network = tab.network();
578+ selectedTemplate = tab.currentTemplate();
579+ undoManager = tab.drawingSurface().getUndoManager();
580 }
581
582 public TimedArcPetriNetNetwork network(){
583
584=== modified file 'src/dk/aau/cs/gui/SharedPlaceNamePanel.java'
585--- src/dk/aau/cs/gui/SharedPlaceNamePanel.java 2011-10-04 18:07:57 +0000
586+++ src/dk/aau/cs/gui/SharedPlaceNamePanel.java 2011-10-14 12:17:24 +0000
587@@ -37,7 +37,7 @@
588
589 public SharedPlaceNamePanel(JRootPane rootPane, SharedPlacesListModel sharedPlacesListModel, Context context, SharedPlace placeToEdit) {
590 this.rootPane = rootPane;
591- this.listModel = sharedPlacesListModel;
592+ listModel = sharedPlacesListModel;
593 this.placeToEdit = placeToEdit;
594 this.context = context;
595 initComponents();
596@@ -60,7 +60,7 @@
597 GridBagConstraints gbc = new GridBagConstraints();
598 namePanel.add(label, gbc);
599
600- String initialText = placeToEdit == null ? "" : placeToEdit.name();
601+ String initialText = (placeToEdit == null) ? "" : placeToEdit.name();
602 nameField = new JTextField(initialText);
603 nameField.setMinimumSize(new Dimension(150,27));
604 nameField.setPreferredSize(new Dimension(200, 27));
605
606=== modified file 'src/dk/aau/cs/gui/SharedPlacesAndTransitionsPanel.java'
607--- src/dk/aau/cs/gui/SharedPlacesAndTransitionsPanel.java 2011-08-30 08:42:12 +0000
608+++ src/dk/aau/cs/gui/SharedPlacesAndTransitionsPanel.java 2011-10-14 12:17:24 +0000
609@@ -30,18 +30,17 @@
610 import javax.swing.event.ListSelectionEvent;
611 import javax.swing.event.ListSelectionListener;
612
613-import pipe.dataLayer.Arc;
614 import pipe.dataLayer.TAPNQuery;
615 import pipe.dataLayer.Template;
616-import pipe.dataLayer.TimedInhibitorArcComponent;
617-import pipe.dataLayer.TimedInputArcComponent;
618-import pipe.dataLayer.TimedOutputArcComponent;
619-import pipe.dataLayer.TimedPlaceComponent;
620-import pipe.dataLayer.TimedTransitionComponent;
621-import pipe.dataLayer.TimedTransportArcComponent;
622 import pipe.gui.CreateGui;
623 import pipe.gui.DrawingSurfaceImpl;
624-import pipe.gui.Pipe;
625+import pipe.gui.graphicElements.Arc;
626+import pipe.gui.graphicElements.tapn.TimedInhibitorArcComponent;
627+import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
628+import pipe.gui.graphicElements.tapn.TimedOutputArcComponent;
629+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
630+import pipe.gui.graphicElements.tapn.TimedTransitionComponent;
631+import pipe.gui.graphicElements.tapn.TimedTransportArcComponent;
632 import pipe.gui.undo.DeleteTimedInhibitorArcCommand;
633 import pipe.gui.undo.DeleteTimedInputArcCommand;
634 import pipe.gui.undo.DeleteTimedOutputArcCommand;
635@@ -92,8 +91,8 @@
636 public SharedPlacesAndTransitionsPanel(TabContent tab){
637 Require.that(tab != null, "tab cannot be null");
638
639- this.undoManager = tab.drawingSurface().getUndoManager();
640- this.nameGenerator = tab.drawingSurface().getNameGenerator();
641+ undoManager = tab.drawingSurface().getUndoManager();
642+ nameGenerator = tab.drawingSurface().getNameGenerator();
643 this.tab = tab;
644
645 sharedPlacesListModel = new SharedPlacesListModel(tab.network());
646
647=== modified file 'src/dk/aau/cs/gui/SharedTransitionNamePanel.java'
648--- src/dk/aau/cs/gui/SharedTransitionNamePanel.java 2011-10-04 18:07:57 +0000
649+++ src/dk/aau/cs/gui/SharedTransitionNamePanel.java 2011-10-14 12:17:24 +0000
650@@ -38,7 +38,7 @@
651
652 public SharedTransitionNamePanel(JRootPane rootPane, SharedTransitionsListModel sharedTransitionsListModel, UndoManager undoManager, NameGenerator nameGenerator, SharedTransition transitionToEdit) {
653 this.rootPane = rootPane;
654- this.listModel = sharedTransitionsListModel;
655+ listModel = sharedTransitionsListModel;
656 this.undoManager = undoManager;
657 this.nameGenerator = nameGenerator;
658 this.transitionToEdit = transitionToEdit;
659@@ -62,7 +62,7 @@
660 GridBagConstraints gbc = new GridBagConstraints();
661 namePanel.add(label, gbc);
662
663- String initialText = transitionToEdit == null ? "" : transitionToEdit.name();
664+ String initialText = (transitionToEdit == null) ? "" : transitionToEdit.name();
665 nameField = new JTextField(initialText);
666 nameField.setMinimumSize(new Dimension(150,27));
667 nameField.setPreferredSize(new Dimension(200, 27));
668
669=== modified file 'src/dk/aau/cs/gui/TabComponent.java'
670--- src/dk/aau/cs/gui/TabComponent.java 2011-08-22 13:31:50 +0000
671+++ src/dk/aau/cs/gui/TabComponent.java 2011-10-14 12:17:24 +0000
672@@ -151,7 +151,7 @@
673
674 }
675
676- private final static MouseListener buttonMouseListener = new MouseAdapter() {
677+ private static final MouseListener buttonMouseListener = new MouseAdapter() {
678 @Override
679 public void mouseEntered(MouseEvent e) {
680 Component component = e.getComponent();
681
682=== modified file 'src/dk/aau/cs/gui/TabContent.java'
683--- src/dk/aau/cs/gui/TabContent.java 2011-10-13 12:32:31 +0000
684+++ src/dk/aau/cs/gui/TabContent.java 2011-10-14 12:17:24 +0000
685@@ -71,7 +71,7 @@
686 zoomLevels.put(net, new Zoomer());
687 }
688
689- this.drawingSurface = new DrawingSurfaceImpl(new DataLayer(), this);
690+ drawingSurface = new DrawingSurfaceImpl(new DataLayer(), this);
691 drawingSurfaceScroller = new JScrollPane(drawingSurface);
692 // make it less bad on XP
693 drawingSurfaceScroller.setBorder(new BevelBorder(BevelBorder.LOWERED));
694@@ -392,7 +392,7 @@
695
696 public void setNetwork(TimedArcPetriNetNetwork network, Collection<Template> templates) {
697 Require.that(network != null, "network cannot be null");
698- this.tapnNetwork = network;
699+ tapnNetwork = network;
700
701 guiModels.clear();
702 for(Template template : templates){
703
704=== modified file 'src/dk/aau/cs/gui/TemplateExplorer.java'
705--- src/dk/aau/cs/gui/TemplateExplorer.java 2011-10-13 13:26:34 +0000
706+++ src/dk/aau/cs/gui/TemplateExplorer.java 2011-10-14 12:17:24 +0000
707@@ -287,7 +287,7 @@
708 s.append("The following queries are associated with the currently selected objects:\n\n");
709 for (TAPNQuery q : queriesToDelete) {
710 s.append(q.getName());
711- s.append("\n");
712+ s.append('\n');
713 }
714 s.append("\nAre you sure you want to remove the current selection and all associated queries?");
715 return s;
716@@ -489,7 +489,7 @@
717
718
719 public TemplateListCellRenderer(ListCellRenderer renderer) {
720- this.cellRenderer = renderer;
721+ cellRenderer = renderer;
722 setLayout(new BorderLayout());
723 setOpaque(false);
724 activeCheckbox.setOpaque(false);
725@@ -521,7 +521,7 @@
726
727 public TemplateListManager(JList list) {
728 this.list = list;
729- this.selectionModel = list.getSelectionModel();
730+ selectionModel = list.getSelectionModel();
731 this.list.registerKeyboardAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), JComponent.WHEN_FOCUSED);
732 }
733
734@@ -597,7 +597,7 @@
735 }
736
737 public void valueChanged(ListSelectionEvent e) {
738- if (e.getValueIsAdjusting() == false) {
739+ if (!(e.getValueIsAdjusting())) {
740 int index = templateList.getSelectedIndex();
741 if (index == -1) {
742 removeTemplateButton.setEnabled(false);
743
744=== modified file 'src/dk/aau/cs/gui/components/BatchProcessingResultsTableModel.java'
745--- src/dk/aau/cs/gui/components/BatchProcessingResultsTableModel.java 2011-08-28 14:43:51 +0000
746+++ src/dk/aau/cs/gui/components/BatchProcessingResultsTableModel.java 2011-10-14 12:17:24 +0000
747@@ -18,7 +18,7 @@
748 results = new ArrayList<BatchProcessingVerificationResult>();
749 }
750
751- public void AddResult(BatchProcessingVerificationResult result){
752+ public void addResult(BatchProcessingVerificationResult result){
753 int lastRow = results.size();
754 results.add(result);
755 fireTableRowsInserted(lastRow, lastRow);
756
757=== modified file 'src/dk/aau/cs/gui/components/ConstantsListModel.java'
758--- src/dk/aau/cs/gui/components/ConstantsListModel.java 2011-07-15 12:40:18 +0000
759+++ src/dk/aau/cs/gui/components/ConstantsListModel.java 2011-10-14 12:17:24 +0000
760@@ -16,15 +16,15 @@
761
762 public ConstantsListModel(TimedArcPetriNetNetwork network){
763 listener = new ConstantsListener() {
764- public void ConstantRemoved(ConstantEvent e) {
765+ public void constantRemoved(ConstantEvent e) {
766 fireIntervalRemoved(this, e.index(), e.index());
767 }
768
769- public void ConstantChanged(ConstantChangedEvent e) {
770+ public void constantChanged(ConstantChangedEvent e) {
771 fireContentsChanged(this, e.index(), e.index());
772 }
773
774- public void ConstantAdded(ConstantEvent e) {
775+ public void constantAdded(ConstantEvent e) {
776 fireIntervalAdded(this, e.index(), e.index());
777 }
778 };
779@@ -34,11 +34,11 @@
780 // TODO: Due to stupid programming, we have to allow it to be set later
781 // since the Network is sometimes set after the TabContent is created.
782 public void setNetwork(TimedArcPetriNetNetwork newNetwork){
783- if(this.network != null){
784- this.network.removeConstantsListener(listener);
785+ if(network != null){
786+ network.removeConstantsListener(listener);
787 }
788- this.network = newNetwork;
789- this.network.addConstantsListener(listener);
790+ network = newNetwork;
791+ network.addConstantsListener(listener);
792 fireContentsChanged(this,0, Integer.MAX_VALUE);
793 }
794
795
796=== modified file 'src/dk/aau/cs/gui/components/MultiLineAutoWrappingTooltipUI.java'
797--- src/dk/aau/cs/gui/components/MultiLineAutoWrappingTooltipUI.java 2011-06-28 16:30:37 +0000
798+++ src/dk/aau/cs/gui/components/MultiLineAutoWrappingTooltipUI.java 2011-10-14 12:17:24 +0000
799@@ -61,7 +61,7 @@
800
801 int width = 400;
802 Dimension dim = textArea.getPreferredSize();
803- dim.width = originalDim.width > width ? width : originalDim.width+10;
804+ dim.width = (originalDim.width > width) ? width : originalDim.width + 10;
805 dim.height++;
806 textArea.setSize(dim);
807
808
809=== modified file 'src/dk/aau/cs/gui/components/TextLabel.java'
810--- src/dk/aau/cs/gui/components/TextLabel.java 2011-06-28 16:30:37 +0000
811+++ src/dk/aau/cs/gui/components/TextLabel.java 2011-10-14 12:17:24 +0000
812@@ -74,7 +74,7 @@
813 private Component targetComponent;
814
815 public MouseWheelAndClickPassThroughHandler(Component target) {
816- this.targetComponent = target;
817+ targetComponent = target;
818 }
819
820 @Override
821
822=== modified file 'src/dk/aau/cs/gui/components/TimedPlaceControl.java'
823--- src/dk/aau/cs/gui/components/TimedPlaceControl.java 2011-03-07 18:53:27 +0000
824+++ src/dk/aau/cs/gui/components/TimedPlaceControl.java 2011-10-14 12:17:24 +0000
825@@ -86,7 +86,7 @@
826
827 public void setAttributesVisible(boolean value) {
828 if (value != attributesVisible) {
829- this.attributesVisible = value;
830+ attributesVisible = value;
831 if (value) {
832 addChildControls();
833 } else {
834
835=== modified file 'src/dk/aau/cs/gui/undo/MakePlaceSharedCommand.java'
836--- src/dk/aau/cs/gui/undo/MakePlaceSharedCommand.java 2011-06-28 16:30:37 +0000
837+++ src/dk/aau/cs/gui/undo/MakePlaceSharedCommand.java 2011-10-14 12:17:24 +0000
838@@ -4,7 +4,7 @@
839 import java.util.List;
840
841 import pipe.dataLayer.TAPNQuery;
842-import pipe.dataLayer.TimedPlaceComponent;
843+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
844 import dk.aau.cs.TCTL.visitors.BooleanResult;
845 import dk.aau.cs.TCTL.visitors.MakePlaceSharedVisitor;
846 import dk.aau.cs.gui.TabContent;
847@@ -39,9 +39,9 @@
848 this.sharedPlace = sharedPlace;
849 this.place = place;
850 this.placeComponent = placeComponent;
851- this.oldTokens = place.tokens();
852+ oldTokens = place.tokens();
853 this.currentTab = currentTab;
854- this.newQueryToOldQueryMapping = new Hashtable<TAPNQuery, TAPNQuery>();
855+ newQueryToOldQueryMapping = new Hashtable<TAPNQuery, TAPNQuery>();
856 }
857
858 @Override
859
860=== modified file 'src/dk/aau/cs/gui/undo/MakeTransitionSharedCommand.java'
861--- src/dk/aau/cs/gui/undo/MakeTransitionSharedCommand.java 2011-02-26 15:56:34 +0000
862+++ src/dk/aau/cs/gui/undo/MakeTransitionSharedCommand.java 2011-10-14 12:17:24 +0000
863@@ -11,7 +11,7 @@
864 public MakeTransitionSharedCommand(SharedTransition sharedTransition, TimedTransition timedTransition){
865 this.sharedTransition = sharedTransition;
866 this.timedTransition = timedTransition;
867- this.oldName = timedTransition.name();
868+ oldName = timedTransition.name();
869 }
870
871 @Override
872
873=== modified file 'src/dk/aau/cs/gui/undo/TimedPlaceMarkingEdit.java'
874--- src/dk/aau/cs/gui/undo/TimedPlaceMarkingEdit.java 2011-02-26 15:56:34 +0000
875+++ src/dk/aau/cs/gui/undo/TimedPlaceMarkingEdit.java 2011-10-14 12:17:24 +0000
876@@ -1,6 +1,6 @@
877 package dk.aau.cs.gui.undo;
878
879-import pipe.dataLayer.TimedPlaceComponent;
880+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
881
882 // TODO: Fix this to work on the model class instead of the GUI class
883 public class TimedPlaceMarkingEdit extends Command {
884@@ -8,7 +8,7 @@
885 private final TimedPlaceComponent timedPlaceComponent;
886
887 public TimedPlaceMarkingEdit(TimedPlaceComponent tpc, int numberOfTokens) {
888- this.timedPlaceComponent = tpc;
889+ timedPlaceComponent = tpc;
890 this.numberOfTokens = numberOfTokens;
891 }
892
893
894=== modified file 'src/dk/aau/cs/gui/undo/UnsharePlaceCommand.java'
895--- src/dk/aau/cs/gui/undo/UnsharePlaceCommand.java 2011-03-10 19:01:57 +0000
896+++ src/dk/aau/cs/gui/undo/UnsharePlaceCommand.java 2011-10-14 12:17:24 +0000
897@@ -1,6 +1,6 @@
898 package dk.aau.cs.gui.undo;
899
900-import pipe.dataLayer.TimedPlaceComponent;
901+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
902 import dk.aau.cs.model.tapn.SharedPlace;
903 import dk.aau.cs.model.tapn.TimedArcPetriNet;
904 import dk.aau.cs.model.tapn.TimedInhibitorArc;
905
906=== modified file 'src/dk/aau/cs/io/TapnLegacyXmlLoader.java'
907--- src/dk/aau/cs/io/TapnLegacyXmlLoader.java 2011-10-14 11:36:08 +0000
908+++ src/dk/aau/cs/io/TapnLegacyXmlLoader.java 2011-10-14 12:17:24 +0000
909@@ -18,32 +18,31 @@
910 import org.w3c.dom.NodeList;
911 import org.xml.sax.SAXException;
912
913-import pipe.dataLayer.AnnotationNote;
914-import pipe.dataLayer.Arc;
915-import pipe.dataLayer.DataLayer;
916-import pipe.dataLayer.Note;
917-import pipe.dataLayer.PetriNetObject;
918-import pipe.dataLayer.Place;
919-import pipe.dataLayer.PlaceTransitionObject;
920 import pipe.dataLayer.TAPNQuery;
921 import pipe.dataLayer.TAPNQuery.ExtrapolationOption;
922 import pipe.dataLayer.TAPNQuery.HashTableSize;
923 import pipe.dataLayer.TAPNQuery.SearchOption;
924 import pipe.dataLayer.TAPNQuery.TraceOption;
925+import pipe.dataLayer.DataLayer;
926 import pipe.dataLayer.Template;
927-import pipe.dataLayer.TimedInhibitorArcComponent;
928-import pipe.dataLayer.TimedInputArcComponent;
929-import pipe.dataLayer.TimedOutputArcComponent;
930-import pipe.dataLayer.TimedPlaceComponent;
931-import pipe.dataLayer.TimedTransitionComponent;
932-import pipe.dataLayer.Transition;
933-import pipe.dataLayer.TimedTransportArcComponent;
934 import pipe.gui.CreateGui;
935 import pipe.gui.DrawingSurfaceImpl;
936 import pipe.gui.Grid;
937 import pipe.gui.Pipe;
938-import pipe.gui.Zoomable;
939 import pipe.gui.Zoomer;
940+import pipe.gui.graphicElements.AnnotationNote;
941+import pipe.gui.graphicElements.Arc;
942+import pipe.gui.graphicElements.Note;
943+import pipe.gui.graphicElements.PetriNetObject;
944+import pipe.gui.graphicElements.Place;
945+import pipe.gui.graphicElements.PlaceTransitionObject;
946+import pipe.gui.graphicElements.Transition;
947+import pipe.gui.graphicElements.tapn.TimedInhibitorArcComponent;
948+import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
949+import pipe.gui.graphicElements.tapn.TimedOutputArcComponent;
950+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
951+import pipe.gui.graphicElements.tapn.TimedTransitionComponent;
952+import pipe.gui.graphicElements.tapn.TimedTransportArcComponent;
953 import pipe.gui.handler.AnimationHandler;
954 import pipe.gui.handler.AnnotationNoteHandler;
955 import pipe.gui.handler.ArcHandler;
956@@ -102,7 +101,7 @@
957 transportArcsTimeIntervals = new HashMap<TimedTransportArcComponent, TimeInterval>();
958 queries = new ArrayList<TAPNQuery>();
959 constants = new ConstantStore();
960- this.drawingSurface = drawingSurfaceImpl;
961+ drawingSurface = drawingSurfaceImpl;
962 }
963
964 public LoadedModel load(InputStream file) throws FormatException {
965@@ -286,7 +285,7 @@
966 TimedPlace sourcePlace = tapn.getPlaceByName(presetTransportArc.getSource().getName());
967 TimedTransition trans = tapn.getTransitionByName(sourceIn.getName());
968 TimedPlace destPlace = tapn.getPlaceByName(targetIn.getName());
969- TimeInterval interval = transportArcsTimeIntervals.get((TimedTransportArcComponent) presetTransportArc);
970+ TimeInterval interval = transportArcsTimeIntervals.get(presetTransportArc);
971
972 assert (sourcePlace != null);
973 assert (trans != null);
974@@ -304,7 +303,7 @@
975 tapn.add(transArc);
976
977 presetArcs.remove((TimedTransitionComponent) sourceIn);
978- transportArcsTimeIntervals.remove((TimedTransportArcComponent) presetTransportArc);
979+ transportArcsTimeIntervals.remove(presetTransportArc);
980 } else {
981 postsetArcs.put((TimedTransitionComponent) sourceIn, (TimedTransportArcComponent) tempArc);
982 }
983@@ -499,7 +498,7 @@
984 private boolean doesPlacesUsedInQueryExist(TAPNQuery query, ArrayList<Tuple<String, String>> templatePlaceNames) {
985 VerifyPlaceNamesVisitor nameChecker = new VerifyPlaceNamesVisitor(templatePlaceNames);
986
987- VerifyPlaceNamesVisitor.Context c = nameChecker.VerifyPlaceNames(query.getProperty());
988+ VerifyPlaceNamesVisitor.Context c = nameChecker.verifyPlaceNames(query.getProperty());
989
990 return c.getResult();
991 }
992@@ -615,7 +614,7 @@
993
994 Place place = null;
995
996- if (invariant == null || invariant == "") {
997+ if (invariant == null || invariant.equals("")) {
998 place = new Place(positionXInput, positionYInput, idInput,
999 nameInput, nameOffsetXInput, nameOffsetYInput,
1000 initialMarkingInput, markingOffsetXInput,
1001@@ -753,10 +752,7 @@
1002 private boolean getSymmetryAsOldFormat(Element queryElement) {
1003 String reductionString = queryElement.getAttribute("reductionOption");
1004
1005- if(reductionString.contains(SYMMETRY))
1006- return true;
1007- else
1008- return false;
1009+ return reductionString.contains(SYMMETRY);
1010 }
1011
1012 private TCTLAbstractProperty parseQueryPropertyAsOldFormat(Element queryElement) throws FormatException {
1013@@ -958,9 +954,9 @@
1014 ((Note) newObject).getNote().addMouseListener(noteHandler);
1015 ((Note) newObject).getNote().addMouseMotionListener(noteHandler);
1016 }
1017- if (newObject instanceof Zoomable) {
1018- newObject.zoomUpdate(drawingSurface.getZoom());
1019- }
1020+
1021+ newObject.zoomUpdate(drawingSurface.getZoom());
1022+
1023 }
1024 newObject.setGuiModel(guiModel);
1025 }
1026
1027=== modified file 'src/dk/aau/cs/io/TapnXmlLoader.java'
1028--- src/dk/aau/cs/io/TapnXmlLoader.java 2011-10-14 11:36:08 +0000
1029+++ src/dk/aau/cs/io/TapnXmlLoader.java 2011-10-14 12:17:24 +0000
1030@@ -19,32 +19,31 @@
1031 import org.w3c.dom.NodeList;
1032 import org.xml.sax.SAXException;
1033
1034-import pipe.dataLayer.AnnotationNote;
1035-import pipe.dataLayer.Arc;
1036-import pipe.dataLayer.DataLayer;
1037-import pipe.dataLayer.Note;
1038-import pipe.dataLayer.PetriNetObject;
1039-import pipe.dataLayer.Place;
1040-import pipe.dataLayer.PlaceTransitionObject;
1041 import pipe.dataLayer.TAPNQuery;
1042 import pipe.dataLayer.TAPNQuery.ExtrapolationOption;
1043 import pipe.dataLayer.TAPNQuery.HashTableSize;
1044 import pipe.dataLayer.TAPNQuery.SearchOption;
1045 import pipe.dataLayer.TAPNQuery.TraceOption;
1046+import pipe.dataLayer.DataLayer;
1047 import pipe.dataLayer.Template;
1048-import pipe.dataLayer.TimedInhibitorArcComponent;
1049-import pipe.dataLayer.TimedInputArcComponent;
1050-import pipe.dataLayer.TimedOutputArcComponent;
1051-import pipe.dataLayer.TimedPlaceComponent;
1052-import pipe.dataLayer.TimedTransitionComponent;
1053-import pipe.dataLayer.Transition;
1054-import pipe.dataLayer.TimedTransportArcComponent;
1055 import pipe.gui.CreateGui;
1056 import pipe.gui.DrawingSurfaceImpl;
1057 import pipe.gui.Grid;
1058 import pipe.gui.Pipe;
1059-import pipe.gui.Zoomable;
1060 import pipe.gui.Zoomer;
1061+import pipe.gui.graphicElements.AnnotationNote;
1062+import pipe.gui.graphicElements.Arc;
1063+import pipe.gui.graphicElements.Note;
1064+import pipe.gui.graphicElements.PetriNetObject;
1065+import pipe.gui.graphicElements.Place;
1066+import pipe.gui.graphicElements.PlaceTransitionObject;
1067+import pipe.gui.graphicElements.Transition;
1068+import pipe.gui.graphicElements.tapn.TimedInhibitorArcComponent;
1069+import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
1070+import pipe.gui.graphicElements.tapn.TimedOutputArcComponent;
1071+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
1072+import pipe.gui.graphicElements.tapn.TimedTransitionComponent;
1073+import pipe.gui.graphicElements.tapn.TimedTransportArcComponent;
1074 import pipe.gui.handler.AnimationHandler;
1075 import pipe.gui.handler.AnnotationNoteHandler;
1076 import pipe.gui.handler.ArcHandler;
1077@@ -248,7 +247,7 @@
1078 private boolean doesPlacesUsedInQueryExist(TAPNQuery query, ArrayList<Tuple<String, String>> templatePlaceNames) {
1079 VerifyPlaceNamesVisitor nameChecker = new VerifyPlaceNamesVisitor(templatePlaceNames);
1080
1081- VerifyPlaceNamesVisitor.Context c = nameChecker.VerifyPlaceNames(query.getProperty());
1082+ VerifyPlaceNamesVisitor.Context c = nameChecker.verifyPlaceNames(query.getProperty());
1083
1084 return c.getResult();
1085
1086@@ -636,8 +635,8 @@
1087
1088 postsetArcs.remove((TimedTransitionComponent) targetIn);
1089 } else {
1090- presetArcs.put((TimedTransitionComponent) targetIn, (TimedTransportArcComponent) tempArc);
1091- transportArcsTimeIntervals.put((TimedTransportArcComponent) tempArc, TimeInterval.parse(inscriptionSplit[0], constants));
1092+ presetArcs.put((TimedTransitionComponent) targetIn, tempArc);
1093+ transportArcsTimeIntervals.put(tempArc, TimeInterval.parse(inscriptionSplit[0], constants));
1094 }
1095 } else {
1096 if (presetArcs.containsKey((TimedTransitionComponent) sourceIn)) {
1097@@ -645,7 +644,7 @@
1098 TimedPlace sourcePlace = template.model().getPlaceByName(presetTransportArc.getSource().getName());
1099 TimedTransition trans = template.model().getTransitionByName(sourceIn.getName());
1100 TimedPlace destPlace = template.model().getPlaceByName(targetIn.getName());
1101- TimeInterval interval = transportArcsTimeIntervals.get((TimedTransportArcComponent) presetTransportArc);
1102+ TimeInterval interval = transportArcsTimeIntervals.get(presetTransportArc);
1103
1104 assert (sourcePlace != null);
1105 assert (trans != null);
1106@@ -662,9 +661,9 @@
1107 template.model().add(transArc);
1108
1109 presetArcs.remove((TimedTransitionComponent) sourceIn);
1110- transportArcsTimeIntervals.remove((TimedTransportArcComponent) presetTransportArc);
1111+ transportArcsTimeIntervals.remove(presetTransportArc);
1112 } else {
1113- postsetArcs.put((TimedTransitionComponent) sourceIn, (TimedTransportArcComponent) tempArc);
1114+ postsetArcs.put((TimedTransitionComponent) sourceIn, tempArc);
1115 }
1116 }
1117 return tempArc;
1118@@ -1004,9 +1003,9 @@
1119 ((Note) newObject).getNote().addMouseListener(noteHandler);
1120 ((Note) newObject).getNote().addMouseMotionListener(noteHandler);
1121 }
1122- if (newObject instanceof Zoomable) {
1123- newObject.zoomUpdate(drawingSurface.getZoom());
1124- }
1125+
1126+ newObject.zoomUpdate(drawingSurface.getZoom());
1127+
1128 }
1129 newObject.setGuiModel(template.guiModel());
1130 }
1131
1132=== modified file 'src/dk/aau/cs/io/TimedArcPetriNetNetworkWriter.java'
1133--- src/dk/aau/cs/io/TimedArcPetriNetNetworkWriter.java 2011-08-30 09:20:01 +0000
1134+++ src/dk/aau/cs/io/TimedArcPetriNetNetworkWriter.java 2011-10-14 12:17:24 +0000
1135@@ -20,20 +20,20 @@
1136 import org.w3c.dom.Element;
1137 import org.w3c.dom.Text;
1138
1139-import pipe.dataLayer.AnnotationNote;
1140-import pipe.dataLayer.Arc;
1141 import pipe.dataLayer.DataLayer;
1142 import pipe.dataLayer.PNMLWriter;
1143-import pipe.dataLayer.Place;
1144 import pipe.dataLayer.TAPNQuery;
1145 import pipe.dataLayer.Template;
1146-import pipe.dataLayer.TimedInhibitorArcComponent;
1147-import pipe.dataLayer.TimedInputArcComponent;
1148-import pipe.dataLayer.TimedOutputArcComponent;
1149-import pipe.dataLayer.TimedPlaceComponent;
1150-import pipe.dataLayer.TimedTransitionComponent;
1151-import pipe.dataLayer.Transition;
1152-import pipe.dataLayer.TimedTransportArcComponent;
1153+import pipe.gui.graphicElements.AnnotationNote;
1154+import pipe.gui.graphicElements.Arc;
1155+import pipe.gui.graphicElements.Place;
1156+import pipe.gui.graphicElements.Transition;
1157+import pipe.gui.graphicElements.tapn.TimedInhibitorArcComponent;
1158+import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
1159+import pipe.gui.graphicElements.tapn.TimedOutputArcComponent;
1160+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
1161+import pipe.gui.graphicElements.tapn.TimedTransitionComponent;
1162+import pipe.gui.graphicElements.tapn.TimedTransportArcComponent;
1163 import pipe.gui.widgets.InclusionPlaces.InclusionPlacesOption;
1164 import dk.aau.cs.model.tapn.Constant;
1165 import dk.aau.cs.model.tapn.SharedPlace;
1166@@ -265,7 +265,7 @@
1167 boolean first = true;
1168 StringBuilder s = new StringBuilder();
1169 for(TimedPlace p : query.inclusionPlaces().inclusionPlaces()) {
1170- if(!first) s.append(",");
1171+ if(!first) s.append(',');
1172
1173 s.append(p.toString());
1174 if(first) first = false;
1175@@ -326,9 +326,9 @@
1176 transitionElement.setAttribute("nameOffsetY", (inputTransition.getNameOffsetYObject() != null ? String.valueOf(inputTransition.getNameOffsetYObject()) : ""));
1177 transitionElement.setAttribute("name", inputTransition.underlyingTransition().name());
1178 transitionElement.setAttribute("id", (inputTransition.getId() != null ? inputTransition.getId() : "error"));
1179- transitionElement.setAttribute("infiniteServer", String.valueOf(inputTransition.isInfiniteServer()));
1180+ transitionElement.setAttribute("infiniteServer", "false");
1181 transitionElement.setAttribute("angle", String.valueOf(inputTransition.getAngle()));
1182- transitionElement.setAttribute("priority", String.valueOf(inputTransition.getPriority()));
1183+ transitionElement.setAttribute("priority", "0");
1184
1185 return transitionElement;
1186 }
1187@@ -350,7 +350,7 @@
1188 arcElement.setAttribute("inscription", getGuardAsString((TimedInputArcComponent)inputArc));
1189 } else {
1190 arcElement.setAttribute("type", "normal");
1191- arcElement.setAttribute("inscription", Integer.toString((inputArc != null ? inputArc.getWeight() : 1)));
1192+ arcElement.setAttribute("inscription", "");
1193 }
1194 }
1195 return arcElement;
1196
1197=== modified file 'src/dk/aau/cs/io/batchProcessing/BatchProcessingLegacyLoader.java'
1198--- src/dk/aau/cs/io/batchProcessing/BatchProcessingLegacyLoader.java 2011-10-02 13:59:04 +0000
1199+++ src/dk/aau/cs/io/batchProcessing/BatchProcessingLegacyLoader.java 2011-10-14 12:17:24 +0000
1200@@ -359,7 +359,7 @@
1201 private boolean doesPlacesUsedInQueryExist(TAPNQuery query, ArrayList<Tuple<String, String>> templatePlaceNames) {
1202 VerifyPlaceNamesVisitor nameChecker = new VerifyPlaceNamesVisitor(templatePlaceNames);
1203
1204- VerifyPlaceNamesVisitor.Context c = nameChecker.VerifyPlaceNames(query.getProperty());
1205+ VerifyPlaceNamesVisitor.Context c = nameChecker.verifyPlaceNames(query.getProperty());
1206
1207 return c.getResult();
1208 }
1209@@ -469,10 +469,7 @@
1210 private boolean getSymmetryAsOldFormat(Element queryElement) {
1211 String reductionString = queryElement.getAttribute("reductionOption");
1212
1213- if(reductionString.contains(SYMMETRY))
1214- return true;
1215- else
1216- return false;
1217+ return reductionString.contains(SYMMETRY);
1218 }
1219
1220 private TCTLAbstractProperty parseQueryPropertyAsOldFormat(Element queryElement) throws FormatException {
1221
1222=== modified file 'src/dk/aau/cs/io/batchProcessing/BatchProcessingLoader.java'
1223--- src/dk/aau/cs/io/batchProcessing/BatchProcessingLoader.java 2011-10-03 15:53:02 +0000
1224+++ src/dk/aau/cs/io/batchProcessing/BatchProcessingLoader.java 2011-10-14 12:17:24 +0000
1225@@ -183,7 +183,7 @@
1226 private boolean doesPlacesUsedInQueryExist(TAPNQuery query, ArrayList<Tuple<String, String>> templatePlaceNames) {
1227 VerifyPlaceNamesVisitor nameChecker = new VerifyPlaceNamesVisitor(templatePlaceNames);
1228
1229- VerifyPlaceNamesVisitor.Context c = nameChecker.VerifyPlaceNames(query.getProperty());
1230+ VerifyPlaceNamesVisitor.Context c = nameChecker.verifyPlaceNames(query.getProperty());
1231
1232 return c.getResult();
1233
1234
1235=== modified file 'src/dk/aau/cs/io/batchProcessing/BatchProcessingResultsExporter.java'
1236--- src/dk/aau/cs/io/batchProcessing/BatchProcessingResultsExporter.java 2011-06-28 16:30:37 +0000
1237+++ src/dk/aau/cs/io/batchProcessing/BatchProcessingResultsExporter.java 2011-10-14 12:17:24 +0000
1238@@ -44,7 +44,7 @@
1239
1240 s.append(result.modelFile());
1241 s.append(DELIMITER);
1242- s.append(query != null ? query.getName() : "");
1243+ s.append((query != null) ? query.getName() : "");
1244 s.append(DELIMITER);
1245 s.append(result.verificationResult());
1246 s.append(DELIMITER);
1247@@ -56,15 +56,15 @@
1248 s.append(DELIMITER);
1249 s.append(result.hasStats() ? result.stats().storedStates() : "");
1250 s.append(DELIMITER);
1251- s.append(query != null ? query.getProperty().toString() : "");
1252- s.append(DELIMITER);
1253- s.append(query != null ? query.getCapacity() : "");
1254- s.append(DELIMITER);
1255- s.append(query != null ? getSearchOrder(query) : "");
1256- s.append(DELIMITER);
1257- s.append(query != null ? (query.useSymmetry() ? "Yes" : "No") : "");
1258- s.append(DELIMITER);
1259- s.append(query != null ? getVerificationMethod(query) : "");
1260+ s.append((query != null) ? query.getProperty().toString() : "");
1261+ s.append(DELIMITER);
1262+ s.append((query != null) ? query.getCapacity() : "");
1263+ s.append(DELIMITER);
1264+ s.append((query != null) ? getSearchOrder(query) : "");
1265+ s.append(DELIMITER);
1266+ s.append((query != null) ? (query.useSymmetry() ? "Yes" : "No") : "");
1267+ s.append(DELIMITER);
1268+ s.append((query != null) ? getVerificationMethod(query) : "");
1269
1270 writer.println(s.toString());
1271 }
1272
1273=== modified file 'src/dk/aau/cs/model/NTA/StandardUPPAALQuery.java'
1274--- src/dk/aau/cs/model/NTA/StandardUPPAALQuery.java 2011-04-02 17:43:38 +0000
1275+++ src/dk/aau/cs/model/NTA/StandardUPPAALQuery.java 2011-10-14 12:17:24 +0000
1276@@ -19,7 +19,7 @@
1277 file.append(pathQuantifier);
1278 file.append(nodeQuantifier);
1279 file.append(query);
1280- file.append("\n");
1281+ file.append('\n');
1282 }
1283
1284 public void setPathQuantifier(String pathQuantifier) {
1285
1286=== modified file 'src/dk/aau/cs/model/NTA/SupQuery.java'
1287--- src/dk/aau/cs/model/NTA/SupQuery.java 2011-04-02 17:43:38 +0000
1288+++ src/dk/aau/cs/model/NTA/SupQuery.java 2011-10-14 12:17:24 +0000
1289@@ -27,11 +27,11 @@
1290 boolean first = true;
1291 for (String elem : elements) {
1292 if (!first) {
1293- file.append(",");
1294+ file.append(',');
1295 }
1296 file.append(elem);
1297 }
1298- file.append("\n");
1299+ file.append('\n');
1300 }
1301
1302 }
1303
1304=== modified file 'src/dk/aau/cs/model/NTA/trace/SymbolicState.java'
1305--- src/dk/aau/cs/model/NTA/trace/SymbolicState.java 2011-04-02 17:43:38 +0000
1306+++ src/dk/aau/cs/model/NTA/trace/SymbolicState.java 2011-10-14 12:17:24 +0000
1307@@ -18,7 +18,7 @@
1308 HashMap<String, String> locations,
1309 HashMap<String, HashMap<String, ValueRange>> localClocksAndVariables,
1310 HashMap<String, ValueRange> globalClocksAndVariables) {
1311- this.automataLocations = locations;
1312+ automataLocations = locations;
1313 this.localClocksAndVariables = localClocksAndVariables;
1314 this.globalClocksAndVariables = globalClocksAndVariables;
1315 }
1316@@ -41,7 +41,7 @@
1317 return automataLocations.get(automata);
1318 }
1319
1320- public boolean IsConcreteState() {
1321+ public boolean isConcreteState() {
1322 for (ValueRange range : globalClocksAndVariables.values()) {
1323 if (!range.hasExactValue())
1324 return false;
1325
1326=== modified file 'src/dk/aau/cs/model/NTA/trace/TimeDelayFiringAction.java'
1327--- src/dk/aau/cs/model/NTA/trace/TimeDelayFiringAction.java 2011-04-02 17:43:38 +0000
1328+++ src/dk/aau/cs/model/NTA/trace/TimeDelayFiringAction.java 2011-10-14 12:17:24 +0000
1329@@ -23,7 +23,7 @@
1330
1331 public TimeDelayFiringAction(SymbolicState state, BigDecimal delay) {
1332 this.state = state;
1333- this.timedelay = delay;
1334+ timedelay = delay;
1335 }
1336
1337 public BigDecimal getDelay() {
1338
1339=== modified file 'src/dk/aau/cs/model/NTA/trace/TransitionFiring.java'
1340--- src/dk/aau/cs/model/NTA/trace/TransitionFiring.java 2011-04-02 17:43:38 +0000
1341+++ src/dk/aau/cs/model/NTA/trace/TransitionFiring.java 2011-10-14 12:17:24 +0000
1342@@ -24,7 +24,7 @@
1343
1344 public TransitionFiring(SymbolicState state, String channel,
1345 Participant... participants) {
1346- this.previousState = state;
1347+ previousState = state;
1348 this.channel = channel;
1349 this.participants = participants;
1350 }
1351
1352=== modified file 'src/dk/aau/cs/model/NTA/trace/UppaalTrace.java'
1353--- src/dk/aau/cs/model/NTA/trace/UppaalTrace.java 2011-04-02 17:43:38 +0000
1354+++ src/dk/aau/cs/model/NTA/trace/UppaalTrace.java 2011-10-14 12:17:24 +0000
1355@@ -52,13 +52,13 @@
1356 return length() == 0 && numberOfStates() == 0;
1357 }
1358
1359- public List<SymbolicState> States() {
1360+ public List<SymbolicState> getStates() {
1361 return states;
1362 }
1363
1364 public boolean isConcreteTrace() {
1365 for (SymbolicState state : states) {
1366- if (!state.IsConcreteState()) {
1367+ if (!state.isConcreteState()) {
1368 return false;
1369 }
1370 }
1371
1372=== modified file 'src/dk/aau/cs/model/tapn/Bound.java'
1373--- src/dk/aau/cs/model/tapn/Bound.java 2011-02-23 19:01:49 +0000
1374+++ src/dk/aau/cs/model/tapn/Bound.java 2011-10-14 12:17:24 +0000
1375@@ -7,9 +7,9 @@
1376 boolean equals(Object other);
1377 int hashCode();
1378
1379- public static Bound Infinity = new InfBound();
1380+ Bound Infinity = new InfBound();
1381
1382- public class InfBound implements Bound {
1383+ class InfBound implements Bound {
1384 public int value() {
1385 return -1;
1386 }
1387
1388=== modified file 'src/dk/aau/cs/model/tapn/Constant.java'
1389--- src/dk/aau/cs/model/tapn/Constant.java 2011-03-19 15:32:14 +0000
1390+++ src/dk/aau/cs/model/tapn/Constant.java 2011-10-14 12:17:24 +0000
1391@@ -23,17 +23,17 @@
1392 public Constant(Constant constant) {
1393 Require.that(constant != null, "Constant cannot be null");
1394
1395- this.name = constant.name;
1396- this.value = constant.value;
1397- this.lowerBound = constant.lowerBound;
1398- this.upperBound = constant.upperBound;
1399- this.isUsed = constant.isUsed;
1400+ name = constant.name;
1401+ value = constant.value;
1402+ lowerBound = constant.lowerBound;
1403+ upperBound = constant.upperBound;
1404+ isUsed = constant.isUsed;
1405 }
1406
1407 public void setName(String newName) {
1408 Require.that(newName != null && !newName.isEmpty(), "A constant must have a name");
1409 Require.that(isValid(newName), "name must match regular expression [a-zA-Z_][a-zA-Z0-9_]*");
1410- this.name = newName;
1411+ name = newName;
1412 }
1413
1414 private boolean isValid(String newName) {
1415
1416=== modified file 'src/dk/aau/cs/model/tapn/ConstantBound.java'
1417--- src/dk/aau/cs/model/tapn/ConstantBound.java 2011-03-12 13:43:46 +0000
1418+++ src/dk/aau/cs/model/tapn/ConstantBound.java 2011-10-14 12:17:24 +0000
1419@@ -30,7 +30,7 @@
1420 public void setConstant(Constant newConstant) {
1421 Require.that(newConstant != null, "Constant cannot be null");
1422
1423- this.constant = newConstant;
1424+ constant = newConstant;
1425 }
1426
1427 public String toString() {
1428
1429=== modified file 'src/dk/aau/cs/model/tapn/LocalTimedMarking.java'
1430--- src/dk/aau/cs/model/tapn/LocalTimedMarking.java 2011-03-27 10:57:57 +0000
1431+++ src/dk/aau/cs/model/tapn/LocalTimedMarking.java 2011-10-14 12:17:24 +0000
1432@@ -19,7 +19,7 @@
1433 }
1434
1435 public void setNetworkMarking(NetworkMarking marking){
1436- this.parent = marking;
1437+ parent = marking;
1438 }
1439
1440 public void add(TimedToken token) {
1441
1442=== modified file 'src/dk/aau/cs/model/tapn/LocalTimedPlace.java'
1443--- src/dk/aau/cs/model/tapn/LocalTimedPlace.java 2011-10-02 13:30:45 +0000
1444+++ src/dk/aau/cs/model/tapn/LocalTimedPlace.java 2011-10-14 12:17:24 +0000
1445@@ -51,7 +51,7 @@
1446
1447 public void setCurrentMarking(TimedMarking marking) {
1448 Require.that(marking != null, "marking cannot be null");
1449- this.currentMarking = marking;
1450+ currentMarking = marking;
1451 fireMarkingChanged();
1452 }
1453
1454@@ -137,9 +137,9 @@
1455 }
1456
1457 public LocalTimedPlace copy() {
1458- LocalTimedPlace p = new LocalTimedPlace(this.name);
1459+ LocalTimedPlace p = new LocalTimedPlace(name);
1460
1461- p.invariant = this.invariant.copy();
1462+ p.invariant = invariant.copy();
1463
1464 return p;
1465 }
1466
1467=== modified file 'src/dk/aau/cs/model/tapn/SharedPlace.java'
1468--- src/dk/aau/cs/model/tapn/SharedPlace.java 2011-10-04 15:24:12 +0000
1469+++ src/dk/aau/cs/model/tapn/SharedPlace.java 2011-10-14 12:17:24 +0000
1470@@ -35,7 +35,7 @@
1471 public void setName(String newName) {
1472 Require.that(newName != null && !newName.isEmpty(), "A timed transition must have a name");
1473 Require.that(isValid(newName) && !newName.toLowerCase().equals("true") && !newName.toLowerCase().equals("false"), "The specified name must conform to the pattern [a-zA-Z_][a-zA-Z0-9_]*");
1474- this.name = newName;
1475+ name = newName;
1476 fireNameChanged();
1477 }
1478
1479
1480=== modified file 'src/dk/aau/cs/model/tapn/SharedTransition.java'
1481--- src/dk/aau/cs/model/tapn/SharedTransition.java 2011-10-08 16:55:12 +0000
1482+++ src/dk/aau/cs/model/tapn/SharedTransition.java 2011-10-14 12:17:24 +0000
1483@@ -30,7 +30,7 @@
1484 public void setName(String newName) {
1485 Require.that(newName != null && !newName.isEmpty(), "A timed transition must have a name");
1486 Require.that(isValid(newName), "The specified name must conform to the pattern [a-zA-Z_][a-zA-Z0-9_]*");
1487- this.name = newName;
1488+ name = newName;
1489 for(TimedTransition transition : transitions){
1490 transition.setName(newName);
1491 }
1492
1493=== modified file 'src/dk/aau/cs/model/tapn/TAPNQuery.java'
1494--- src/dk/aau/cs/model/tapn/TAPNQuery.java 2011-05-21 13:00:05 +0000
1495+++ src/dk/aau/cs/model/tapn/TAPNQuery.java 2011-10-14 12:17:24 +0000
1496@@ -15,7 +15,7 @@
1497 }
1498
1499 public TAPNQuery(TCTLAbstractProperty inputProperty, int extraTokens) {
1500- this.property = inputProperty;
1501+ property = inputProperty;
1502 this.extraTokens = extraTokens;
1503 }
1504
1505
1506=== modified file 'src/dk/aau/cs/model/tapn/TimeInterval.java'
1507--- src/dk/aau/cs/model/tapn/TimeInterval.java 2011-05-20 18:26:51 +0000
1508+++ src/dk/aau/cs/model/tapn/TimeInterval.java 2011-10-14 12:17:24 +0000
1509@@ -31,10 +31,10 @@
1510 public TimeInterval(TimeInterval interval) {
1511 Require.that(interval != null, "Interval cannot be null");
1512
1513- this.isLowerIncluded = interval.isLowerIncluded;
1514- this.isUpperIncluded = interval.isUpperIncluded;
1515- this.lower = interval.lower.copy();
1516- this.upper = interval.upper.copy();
1517+ isLowerIncluded = interval.isLowerIncluded;
1518+ isUpperIncluded = interval.isUpperIncluded;
1519+ lower = interval.lower.copy();
1520+ upper = interval.upper.copy();
1521 }
1522
1523 private boolean isValidInterval() {
1524@@ -55,7 +55,7 @@
1525 StringBuffer buffer = new StringBuffer();
1526 buffer.append(isLowerIncluded ? "[" : "(");
1527 buffer.append(lower);
1528- buffer.append(",");
1529+ buffer.append(',');
1530 buffer.append(upper);
1531 buffer.append(isUpperIncluded ? "]" : ")");
1532 return buffer.toString();
1533@@ -65,7 +65,7 @@
1534 StringBuffer buffer = new StringBuffer();
1535 buffer.append(isLowerIncluded ? "[" : "(");
1536 buffer.append(displayConstantNames ? lower : lower.value());
1537- buffer.append(",");
1538+ buffer.append(',');
1539 buffer.append(displayConstantNames || upper instanceof InfBound ? upper : upper.value());
1540 buffer.append(isUpperIncluded ? "]" : ")");
1541 return buffer.toString();
1542@@ -160,12 +160,12 @@
1543
1544 int invariantUpper = invariant.upperBound().value();
1545
1546- if (invariantUpper < this.lower.value() || (invariantUpper == this.lower.value() && !isLowerIncluded) || (invariantUpper == this.lower.value() && !invariant.isUpperNonstrict())) {
1547+ if (invariantUpper < lower.value() || (invariantUpper == lower.value() && !isLowerIncluded) || (invariantUpper == lower.value() && !invariant.isUpperNonstrict())) {
1548 return new TimeInterval(false, new IntBound(0), new IntBound(0), false); // intersection is empty, so return an empty interval
1549- } else if (invariantUpper > this.upper.value()) {
1550+ } else if (invariantUpper > upper.value()) {
1551 return this.copy();
1552 } else {
1553- return new TimeInterval(this.isLowerIncluded, this.lower.copy(), invariant.upperBound().copy(), invariant.isUpperNonstrict());
1554+ return new TimeInterval(isLowerIncluded, lower.copy(), invariant.upperBound().copy(), invariant.isUpperNonstrict());
1555 }
1556 }
1557
1558
1559=== modified file 'src/dk/aau/cs/model/tapn/TimeInvariant.java'
1560--- src/dk/aau/cs/model/tapn/TimeInvariant.java 2011-05-20 18:26:51 +0000
1561+++ src/dk/aau/cs/model/tapn/TimeInvariant.java 2011-10-14 12:17:24 +0000
1562@@ -70,14 +70,14 @@
1563 }
1564
1565 public TimeInvariant copy() {
1566- return new TimeInvariant(this.isUpperIncluded, upper.copy());
1567+ return new TimeInvariant(isUpperIncluded, upper.copy());
1568 }
1569
1570 @Override
1571 public String toString() {
1572 StringBuffer buffer = new StringBuffer();
1573 buffer.append(isUpperIncluded ? "<=" : "<");
1574- buffer.append(" ");
1575+ buffer.append(' ');
1576 buffer.append(upper);
1577 return buffer.toString();
1578 };
1579@@ -85,8 +85,8 @@
1580 public String toString(boolean displayConstantNames) {
1581 StringBuffer buffer = new StringBuffer();
1582 buffer.append(isUpperIncluded ? "<=" : "<");
1583- buffer.append(" ");
1584- buffer.append(displayConstantNames || upper instanceof InfBound ? upper : upper.value());
1585+ buffer.append(' ');
1586+ buffer.append((displayConstantNames || upper instanceof InfBound) ? upper : upper.value());
1587 return buffer.toString();
1588 }
1589
1590
1591=== modified file 'src/dk/aau/cs/model/tapn/TimedArcPetriNet.java'
1592--- src/dk/aau/cs/model/tapn/TimedArcPetriNet.java 2011-08-23 13:14:47 +0000
1593+++ src/dk/aau/cs/model/tapn/TimedArcPetriNet.java 2011-10-14 12:17:24 +0000
1594@@ -30,7 +30,7 @@
1595 }
1596
1597 public void setParentNetwork(TimedArcPetriNetNetwork network){
1598- this.parentNetwork = network;
1599+ parentNetwork = network;
1600 }
1601
1602 public TimedArcPetriNetNetwork parentNetwork(){
1603@@ -232,7 +232,7 @@
1604
1605 public void setMarking(TimedMarking marking) {
1606 Require.that(marking != null, "marking must not be null");
1607- this.currentMarking = marking;
1608+ currentMarking = marking;
1609
1610 for (TimedPlace p : places) {
1611 p.setCurrentMarking(marking);
1612@@ -264,9 +264,9 @@
1613 }
1614
1615 public TimedArcPetriNet copy() {
1616- TimedArcPetriNet tapn = new TimedArcPetriNet(this.name);
1617+ TimedArcPetriNet tapn = new TimedArcPetriNet(name);
1618
1619- for(TimedPlace p : this.places) {
1620+ for(TimedPlace p : places) {
1621 TimedPlace copy = p.copy();
1622 tapn.add(copy);
1623 if(!p.isShared()){
1624@@ -276,7 +276,7 @@
1625 }
1626 }
1627
1628- for(TimedTransition t : this.transitions){
1629+ for(TimedTransition t : transitions){
1630 TimedTransition copy = t.copy();
1631 tapn.add(copy);
1632 if(t.isShared()){
1633@@ -284,16 +284,16 @@
1634 }
1635 }
1636
1637- for(TimedInputArc inputArc : this.inputArcs)
1638+ for(TimedInputArc inputArc : inputArcs)
1639 tapn.add(inputArc.copy(tapn));
1640
1641- for(TimedOutputArc outputArc : this.outputArcs)
1642+ for(TimedOutputArc outputArc : outputArcs)
1643 tapn.add(outputArc.copy(tapn));
1644
1645- for(TransportArc transArc : this.transportArcs)
1646+ for(TransportArc transArc : transportArcs)
1647 tapn.add(transArc.copy(tapn));
1648
1649- for(TimedInhibitorArc inhibArc : this.inhibitorArcs)
1650+ for(TimedInhibitorArc inhibArc : inhibitorArcs)
1651 tapn.add(inhibArc.copy(tapn));
1652
1653 return tapn;
1654
1655=== modified file 'src/dk/aau/cs/model/tapn/TimedArcPetriNetNetwork.java'
1656--- src/dk/aau/cs/model/tapn/TimedArcPetriNetNetwork.java 2011-08-23 13:14:47 +0000
1657+++ src/dk/aau/cs/model/tapn/TimedArcPetriNetNetwork.java 2011-10-14 12:17:24 +0000
1658@@ -27,7 +27,7 @@
1659
1660 public TimedArcPetriNetNetwork(ConstantStore constants){
1661 this.constants = constants;
1662- this.currentMarking = new NetworkMarking();
1663+ currentMarking = new NetworkMarking();
1664 buildConstraints();
1665 }
1666
1667@@ -166,7 +166,7 @@
1668
1669 private void fireConstantAdded(Constant constant) {
1670 for(ConstantsListener listener : constantsListeners){
1671- listener.ConstantAdded(new ConstantEvent(constant, constants.getIndexOf(constant)));
1672+ listener.constantAdded(new ConstantEvent(constant, constants.getIndexOf(constant)));
1673 }
1674 }
1675
1676@@ -176,7 +176,7 @@
1677 int index = constants.getIndexOf(constant);
1678 Command cmd = constants.removeConstant(name);
1679 for(ConstantsListener listener : constantsListeners){
1680- listener.ConstantRemoved(new ConstantEvent(constant, index));
1681+ listener.constantRemoved(new ConstantEvent(constant, index));
1682 }
1683 return cmd;
1684 }
1685@@ -189,7 +189,7 @@
1686 if (edit != null) {
1687 updateGuardsWithNewConstant(oldName, constant);
1688 for(ConstantsListener listener : constantsListeners){
1689- listener.ConstantChanged(new ConstantChangedEvent(old, constant, index));
1690+ listener.constantChanged(new ConstantChangedEvent(old, constant, index));
1691 }
1692 }
1693
1694
1695=== modified file 'src/dk/aau/cs/model/tapn/TimedInputArc.java'
1696--- src/dk/aau/cs/model/tapn/TimedInputArc.java 2011-03-19 15:09:41 +0000
1697+++ src/dk/aau/cs/model/tapn/TimedInputArc.java 2011-10-14 12:17:24 +0000
1698@@ -69,7 +69,7 @@
1699 // This method should ONLY be called in relation to sharing/unsharing a place
1700 public void setSource(TimedPlace place) {
1701 Require.that(place != null, "place cannot be null");
1702- this.source = place;
1703+ source = place;
1704 }
1705
1706 @Override
1707
1708=== modified file 'src/dk/aau/cs/model/tapn/TimedMarking.java'
1709--- src/dk/aau/cs/model/tapn/TimedMarking.java 2011-03-07 18:53:27 +0000
1710+++ src/dk/aau/cs/model/tapn/TimedMarking.java 2011-10-14 12:17:24 +0000
1711@@ -6,24 +6,24 @@
1712 import dk.aau.cs.model.tapn.simulation.FiringMode;
1713
1714 public interface TimedMarking {
1715- public abstract void add(TimedToken token);
1716- public abstract void remove(TimedToken token);
1717+ void add(TimedToken token);
1718+ void remove(TimedToken token);
1719
1720 // public abstract void removePlaceFromMarking(TimedPlace place);
1721 // public abstract void removePlaceFromMarking(SharedPlace place);
1722- public abstract void removePlaceFromMarking(TimedPlace place);
1723+ void removePlaceFromMarking(TimedPlace place);
1724
1725- public abstract List<TimedToken> getTokensFor(TimedPlace place);
1726+ List<TimedToken> getTokensFor(TimedPlace place);
1727 // public abstract List<TimedToken> getTokensFor(TimedPlace place);
1728 // public abstract List<TimedToken> getTokensFor(SharedPlace place);
1729
1730- public abstract TimedMarking clone();
1731-
1732- public abstract boolean isDelayPossible(BigDecimal delay);
1733- public abstract TimedMarking delay(BigDecimal amount);
1734-
1735- public abstract TimedMarking fireTransition(TimedTransition transition, List<TimedToken> tokensToConsume);
1736- public abstract TimedMarking fireTransition(TimedTransition transition, FiringMode firingMode);
1737-
1738- public abstract int size();
1739+ TimedMarking clone();
1740+
1741+ boolean isDelayPossible(BigDecimal delay);
1742+ TimedMarking delay(BigDecimal amount);
1743+
1744+ TimedMarking fireTransition(TimedTransition transition, List<TimedToken> tokensToConsume);
1745+ TimedMarking fireTransition(TimedTransition transition, FiringMode firingMode);
1746+
1747+ int size();
1748 }
1749\ No newline at end of file
1750
1751=== modified file 'src/dk/aau/cs/model/tapn/TimedOutputArc.java'
1752--- src/dk/aau/cs/model/tapn/TimedOutputArc.java 2011-03-19 15:09:41 +0000
1753+++ src/dk/aau/cs/model/tapn/TimedOutputArc.java 2011-10-14 12:17:24 +0000
1754@@ -33,7 +33,7 @@
1755
1756 public void setDestination(TimedPlace place) {
1757 Require.that(place != null, "place cannot be null");
1758- this.destination = place;
1759+ destination = place;
1760 }
1761
1762 @Override
1763
1764=== modified file 'src/dk/aau/cs/model/tapn/TimedPlace.java'
1765--- src/dk/aau/cs/model/tapn/TimedPlace.java 2011-03-07 18:53:27 +0000
1766+++ src/dk/aau/cs/model/tapn/TimedPlace.java 2011-10-14 12:17:24 +0000
1767@@ -5,21 +5,21 @@
1768 import dk.aau.cs.model.tapn.event.TimedPlaceListener;
1769
1770 public interface TimedPlace {
1771- public abstract void addTimedPlaceListener(TimedPlaceListener listener);
1772- public abstract void removeTimedPlaceListener(TimedPlaceListener listener);
1773-
1774- public abstract boolean isShared();
1775-
1776- public abstract String name();
1777- public abstract void setName(String newName);
1778-
1779- public abstract TimeInvariant invariant();
1780- public abstract void setInvariant(TimeInvariant invariant);
1781-
1782- public abstract List<TimedToken> tokens();
1783- public abstract int numberOfTokens();
1784-
1785- public abstract void setCurrentMarking(TimedMarking marking);
1786+ void addTimedPlaceListener(TimedPlaceListener listener);
1787+ void removeTimedPlaceListener(TimedPlaceListener listener);
1788+
1789+ boolean isShared();
1790+
1791+ String name();
1792+ void setName(String newName);
1793+
1794+ TimeInvariant invariant();
1795+ void setInvariant(TimeInvariant invariant);
1796+
1797+ List<TimedToken> tokens();
1798+ int numberOfTokens();
1799+
1800+ void setCurrentMarking(TimedMarking marking);
1801
1802 public abstract void addToken(TimedToken timedToken);
1803 public abstract void addTokens(Iterable<TimedToken> tokens);
1804
1805=== modified file 'src/dk/aau/cs/model/tapn/TimedToken.java'
1806--- src/dk/aau/cs/model/tapn/TimedToken.java 2011-05-08 15:02:45 +0000
1807+++ src/dk/aau/cs/model/tapn/TimedToken.java 2011-10-14 12:17:24 +0000
1808@@ -44,7 +44,7 @@
1809 buffer.append(place.toString());
1810 buffer.append(", ");
1811 buffer.append(df.format(age));
1812- buffer.append(")");
1813+ buffer.append(')');
1814 return buffer.toString();
1815 }
1816
1817
1818=== modified file 'src/dk/aau/cs/model/tapn/TimedTransition.java'
1819--- src/dk/aau/cs/model/tapn/TimedTransition.java 2011-10-08 16:55:12 +0000
1820+++ src/dk/aau/cs/model/tapn/TimedTransition.java 2011-10-14 12:17:24 +0000
1821@@ -70,7 +70,7 @@
1822 public void setName(String newName) {
1823 Require.that(newName != null && !newName.isEmpty(), "A timed transition must have a name");
1824 Require.that(isValid(newName), "The specified name must conform to the pattern [a-zA-Z_][a-zA-Z0-9_]*");
1825- this.name = newName;
1826+ name = newName;
1827 fireNameChanged();
1828 }
1829
1830@@ -250,7 +250,7 @@
1831 }
1832
1833 public TimedTransition copy() {
1834- return new TimedTransition(this.name);
1835+ return new TimedTransition(name);
1836 }
1837
1838 @Override
1839
1840=== modified file 'src/dk/aau/cs/model/tapn/TransportArc.java'
1841--- src/dk/aau/cs/model/tapn/TransportArc.java 2011-03-19 15:09:41 +0000
1842+++ src/dk/aau/cs/model/tapn/TransportArc.java 2011-10-14 12:17:24 +0000
1843@@ -83,13 +83,13 @@
1844 // Should ONLY be called in relation to sharing/unsharing places
1845 public void setSource(TimedPlace place) {
1846 Require.that(place != null, "place cannot be null");
1847- this.source = place;
1848+ source = place;
1849 }
1850
1851 // Should ONLY be called in relation to sharing/unsharing places
1852 public void setDestination(TimedPlace place) {
1853 Require.that(place != null, "place cannot be null");
1854- this.destination = place;
1855+ destination = place;
1856 }
1857
1858 @Override
1859
1860=== modified file 'src/dk/aau/cs/model/tapn/event/ConstantsListener.java'
1861--- src/dk/aau/cs/model/tapn/event/ConstantsListener.java 2011-07-12 18:10:29 +0000
1862+++ src/dk/aau/cs/model/tapn/event/ConstantsListener.java 2011-10-14 12:17:24 +0000
1863@@ -1,7 +1,7 @@
1864 package dk.aau.cs.model.tapn.event;
1865
1866 public interface ConstantsListener {
1867- void ConstantChanged(ConstantChangedEvent e);
1868- void ConstantAdded(ConstantEvent e);
1869- void ConstantRemoved(ConstantEvent e);
1870+ void constantChanged(ConstantChangedEvent e);
1871+ void constantAdded(ConstantEvent e);
1872+ void constantRemoved(ConstantEvent e);
1873 }
1874
1875=== modified file 'src/dk/aau/cs/translations/Pairing.java'
1876--- src/dk/aau/cs/translations/Pairing.java 2011-06-28 16:30:37 +0000
1877+++ src/dk/aau/cs/translations/Pairing.java 2011-10-14 12:17:24 +0000
1878@@ -15,7 +15,7 @@
1879 protected Hashtable<TimedInputArc,TimedOutputArc> inputArcToOutputArc = new Hashtable<TimedInputArc, TimedOutputArc>();
1880
1881 public Pairing(TimedTransition t) {
1882- this.transition = t;
1883+ transition = t;
1884 generatePairing();
1885 }
1886
1887
1888=== modified file 'src/dk/aau/cs/translations/TranslationNamingScheme.java'
1889--- src/dk/aau/cs/translations/TranslationNamingScheme.java 2011-02-03 19:03:15 +0000
1890+++ src/dk/aau/cs/translations/TranslationNamingScheme.java 2011-10-14 12:17:24 +0000
1891@@ -12,7 +12,7 @@
1892
1893 boolean isIgnoredAutomata(String automata);
1894
1895- public class TransitionTranslation {
1896+ class TransitionTranslation {
1897 private int startsAt;
1898 private String originalTransitionName;
1899 private int endsAt;
1900
1901=== modified file 'src/dk/aau/cs/translations/tapn/BroadcastTranslation.java'
1902--- src/dk/aau/cs/translations/tapn/BroadcastTranslation.java 2011-06-09 17:56:03 +0000
1903+++ src/dk/aau/cs/translations/tapn/BroadcastTranslation.java 2011-10-14 12:17:24 +0000
1904@@ -154,7 +154,7 @@
1905 builder.append(TOKEN_TEMPLATE_NAME);
1906 builder.append(i);
1907 }
1908- builder.append(";");
1909+ builder.append(';');
1910
1911 return builder.toString();
1912 }
1913@@ -185,7 +185,7 @@
1914 } else if (isTransitionDegree1(t) && !t.hasInhibitorArcs()) {
1915 builder.append("broadcast chan ");
1916 builder.append(t.name());
1917- builder.append(";");
1918+ builder.append(';');
1919 } else if (isTransitionDegree2(t) && !t.hasInhibitorArcs()) {
1920 builder.append("chan ");
1921 builder.append(t.name());
1922@@ -193,7 +193,7 @@
1923 } else {
1924 builder.append("broadcast chan ");
1925 builder.append(String.format(TEST_CHANNEL_NAME, t.name(), ""));
1926- builder.append(",");
1927+ builder.append(',');
1928 builder.append(String.format(FIRE_CHANNEL_NAME, t.name(), ""));
1929 builder.append(";\n");
1930 }
1931@@ -364,7 +364,7 @@
1932 String counter = inhibitorArcsToCounters.get(inhib);
1933 builder.append(counter);
1934 builder.append(inhibComparison);
1935- builder.append("0");
1936+ builder.append('0');
1937 }
1938
1939 return builder.toString();
1940
1941=== modified file 'src/dk/aau/cs/translations/tapn/Degree2BroadcastKBoundOptimizeTranslation.java'
1942--- src/dk/aau/cs/translations/tapn/Degree2BroadcastKBoundOptimizeTranslation.java 2011-06-28 16:30:37 +0000
1943+++ src/dk/aau/cs/translations/tapn/Degree2BroadcastKBoundOptimizeTranslation.java 2011-10-14 12:17:24 +0000
1944@@ -15,8 +15,8 @@
1945 public class Degree2BroadcastKBoundOptimizeTranslation extends Degree2BroadcastTranslation {
1946 private final String usedExtraTokens = "usedExtraTokens";
1947 private int tokens = 0;
1948- private final int SUBTRACT = 0;
1949- private final int ADD = 1;
1950+ private final int subtract = 0;
1951+ private final int add = 1;
1952
1953 public Degree2BroadcastKBoundOptimizeTranslation() {
1954 super(true);
1955@@ -42,10 +42,10 @@
1956 for (Edge e : ta.getTransitions()) {
1957 if (e.getSource() == pcapacity && isNotInitializationEdge(e) && isNotTestingEdge(e)) {
1958
1959- String newUpdate = createUpdate(e.getUpdate(), ADD);
1960+ String newUpdate = createUpdate(e.getUpdate(), add);
1961 e.setUpdate(newUpdate);
1962 } else if (e.getDestination() == pcapacity && isNotTestingEdge(e)) {
1963- String newUpdate = createUpdate(e.getUpdate(), SUBTRACT);
1964+ String newUpdate = createUpdate(e.getUpdate(), subtract);
1965 e.setUpdate(newUpdate);
1966 }
1967 }
1968@@ -69,7 +69,7 @@
1969 newUpdate += ",";
1970 }
1971 newUpdate += usedExtraTokens;
1972- if (method == ADD) {
1973+ if (method == add) {
1974 newUpdate += "++";
1975 } else {
1976 newUpdate += "--";
1977@@ -82,7 +82,7 @@
1978 protected String createGlobalDeclarations(TimedArcPetriNet degree2Net,TimedArcPetriNet originalModel) {
1979 StringBuilder builder = new StringBuilder("int[");
1980 builder.append(-(tokens + extraTokens));
1981- builder.append(",");
1982+ builder.append(',');
1983 builder.append(tokens + extraTokens);
1984 builder.append("] ");
1985 builder.append(usedExtraTokens);
1986
1987=== modified file 'src/dk/aau/cs/translations/tapn/Degree2BroadcastTranslation.java'
1988--- src/dk/aau/cs/translations/tapn/Degree2BroadcastTranslation.java 2011-06-09 17:56:03 +0000
1989+++ src/dk/aau/cs/translations/tapn/Degree2BroadcastTranslation.java 2011-10-14 12:17:24 +0000
1990@@ -162,7 +162,7 @@
1991 builder.append(TOKEN_TEMPLATE_NAME);
1992 builder.append(i);
1993 }
1994- builder.append(";");
1995+ builder.append(';');
1996
1997 return builder.toString();
1998 }
1999
2000=== modified file 'src/dk/aau/cs/translations/tapn/OptimizedStandardTranslation.java'
2001--- src/dk/aau/cs/translations/tapn/OptimizedStandardTranslation.java 2011-05-22 12:57:23 +0000
2002+++ src/dk/aau/cs/translations/tapn/OptimizedStandardTranslation.java 2011-10-14 12:17:24 +0000
2003@@ -149,7 +149,7 @@
2004 builder.append(TOKEN_TEMPLATE_NAME);
2005 builder.append(i);
2006 }
2007- builder.append(";");
2008+ builder.append(';');
2009
2010 return builder.toString();
2011 }
2012@@ -478,10 +478,7 @@
2013
2014
2015 public boolean supportsModel(TimedArcPetriNet model) {
2016- if(model.hasInhibitorArcs())
2017- return false;
2018- else
2019- return true;
2020+ return !(model.hasInhibitorArcs());
2021 }
2022
2023
2024
2025=== modified file 'src/dk/aau/cs/translations/tapn/StandardTranslation.java'
2026--- src/dk/aau/cs/translations/tapn/StandardTranslation.java 2011-06-09 17:24:10 +0000
2027+++ src/dk/aau/cs/translations/tapn/StandardTranslation.java 2011-10-14 12:17:24 +0000
2028@@ -147,7 +147,7 @@
2029 builder.append(TOKEN_TEMPLATE_NAME);
2030 builder.append(i);
2031 }
2032- builder.append(";");
2033+ builder.append(';');
2034
2035 return builder.toString();
2036 }
2037@@ -433,17 +433,11 @@
2038
2039
2040 public boolean supportsModel(TimedArcPetriNet model) {
2041- if(model.hasInhibitorArcs())
2042- return false;
2043- else
2044- return true;
2045+ return !(model.hasInhibitorArcs());
2046 }
2047
2048
2049 public boolean supportsQuery(TimedArcPetriNet model, TAPNQuery query) {
2050- if(query.getProperty() instanceof TCTLEGNode || query.getProperty() instanceof TCTLAFNode)
2051- return false;
2052- else
2053- return true;
2054+ return !(query.getProperty() instanceof TCTLEGNode || query.getProperty() instanceof TCTLAFNode);
2055 }
2056 }
2057
2058=== modified file 'src/dk/aau/cs/verification/TAPNComposer.java'
2059--- src/dk/aau/cs/verification/TAPNComposer.java 2011-10-08 17:17:27 +0000
2060+++ src/dk/aau/cs/verification/TAPNComposer.java 2011-10-14 12:17:24 +0000
2061@@ -58,23 +58,23 @@
2062 System.out.println("Composed Model:");
2063 System.out.println("PLACES:");
2064 for(TimedPlace place : tapn.places()){
2065- System.out.print("\t");
2066+ System.out.print('\t');
2067 System.out.print(place.name());
2068 System.out.print(", invariant: ");
2069 System.out.print(place.invariant().toString());
2070 System.out.print(" (Original: ");
2071 System.out.print(mapping.map(place.name()));
2072- System.out.println(")");
2073+ System.out.println(')');
2074 }
2075
2076 System.out.println();
2077 System.out.println("TRANSITIONS:");
2078 for(TimedTransition transition : tapn.transitions()){
2079- System.out.print("\t");
2080+ System.out.print('\t');
2081 System.out.print(transition.name());
2082 System.out.print(" (Original: ");
2083 System.out.print(mapping.map(transition.name()).toString());
2084- System.out.println(")");
2085+ System.out.println(')');
2086 }
2087
2088 System.out.println();
2089
2090=== modified file 'src/dk/aau/cs/verification/UPPAAL/Verifyta.java'
2091--- src/dk/aau/cs/verification/UPPAAL/Verifyta.java 2011-06-29 10:48:23 +0000
2092+++ src/dk/aau/cs/verification/UPPAAL/Verifyta.java 2011-10-14 12:17:24 +0000
2093@@ -184,9 +184,9 @@
2094
2095 private String createArgumentString(String modelFile, String queryFile, VerificationOptions options) {
2096 StringBuffer buffer = new StringBuffer(options.toString());
2097- buffer.append(" ");
2098+ buffer.append(' ');
2099 buffer.append(modelFile);
2100- buffer.append(" ");
2101+ buffer.append(' ');
2102 buffer.append(queryFile);
2103
2104 return buffer.toString();
2105
2106=== modified file 'src/dk/aau/cs/verification/UPPAAL/VerifytaOptions.java'
2107--- src/dk/aau/cs/verification/UPPAAL/VerifytaOptions.java 2011-06-18 14:41:17 +0000
2108+++ src/dk/aau/cs/verification/UPPAAL/VerifytaOptions.java 2011-10-14 12:17:24 +0000
2109@@ -20,8 +20,8 @@
2110
2111 public VerifytaOptions(TraceOption trace, SearchOption search,
2112 boolean untimedTrace, ReductionOption reduction, boolean symmetry) {
2113- this.traceOption = trace;
2114- this.searchOption = search;
2115+ traceOption = trace;
2116+ searchOption = search;
2117 this.untimedTrace = untimedTrace;
2118 this.reduction = reduction;
2119 this.symmetry = symmetry;
2120
2121=== modified file 'src/dk/aau/cs/verification/UPPAAL/VerifytaTraceInterpreter.java'
2122--- src/dk/aau/cs/verification/UPPAAL/VerifytaTraceInterpreter.java 2011-04-02 17:43:38 +0000
2123+++ src/dk/aau/cs/verification/UPPAAL/VerifytaTraceInterpreter.java 2011-10-14 12:17:24 +0000
2124@@ -26,7 +26,7 @@
2125 private final TranslationNamingScheme namingScheme;
2126
2127 public VerifytaTraceInterpreter(TimedArcPetriNet model, TranslationNamingScheme namingScheme) {
2128- this.tapn = model;
2129+ tapn = model;
2130 this.namingScheme = namingScheme;
2131 }
2132
2133
2134=== modified file 'src/dk/aau/cs/verification/UPPAAL/VerifytaTraceParser.java'
2135--- src/dk/aau/cs/verification/UPPAAL/VerifytaTraceParser.java 2011-04-02 17:43:38 +0000
2136+++ src/dk/aau/cs/verification/UPPAAL/VerifytaTraceParser.java 2011-10-14 12:17:24 +0000
2137@@ -20,7 +20,7 @@
2138 StringBuffer buffer = new StringBuffer();
2139 while ((line = reader.readLine()) != null && !line.isEmpty()) {
2140 buffer.append(line);
2141- buffer.append("\n");
2142+ buffer.append('\n');
2143 }
2144
2145 String element = buffer.toString();
2146
2147=== modified file 'src/dk/aau/cs/verification/VerificationResult.java'
2148--- src/dk/aau/cs/verification/VerificationResult.java 2011-06-11 14:41:11 +0000
2149+++ src/dk/aau/cs/verification/VerificationResult.java 2011-10-14 12:17:24 +0000
2150@@ -23,7 +23,7 @@
2151 }
2152
2153 public VerificationResult(String outputMessage, long verificationTime) {
2154- this.errorMessage = outputMessage;
2155+ errorMessage = outputMessage;
2156 this.verificationTime = verificationTime;
2157 }
2158
2159
2160=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java'
2161--- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java 2011-10-09 11:38:38 +0000
2162+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPN.java 2011-10-14 12:17:24 +0000
2163@@ -268,9 +268,9 @@
2164
2165 private String createArgumentString(String modelFile, String queryFile, VerificationOptions options) {
2166 StringBuffer buffer = new StringBuffer(options.toString());
2167- buffer.append(" ");
2168+ buffer.append(' ');
2169 buffer.append(modelFile);
2170- buffer.append(" ");
2171+ buffer.append(' ');
2172 buffer.append(queryFile);
2173
2174 return buffer.toString();
2175
2176=== modified file 'src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNOptions.java'
2177--- src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNOptions.java 2011-06-18 14:51:13 +0000
2178+++ src/dk/aau/cs/verification/VerifyTAPN/VerifyTAPNOptions.java 2011-10-14 12:17:24 +0000
2179@@ -34,7 +34,7 @@
2180 public VerifyTAPNOptions(int extraTokens, TraceOption traceOption, SearchOption search, boolean symmetry, boolean discreteInclusion, InclusionPlaces inclusionPlaces) {
2181 this.extraTokens = extraTokens;
2182 this.traceOption = traceOption;
2183- this.searchOption = search;
2184+ searchOption = search;
2185 this.symmetry = symmetry;
2186 this.discreteInclusion = discreteInclusion;
2187 this.inclusionPlaces = inclusionPlaces;
2188@@ -53,7 +53,7 @@
2189 }
2190
2191 public void setTokensInModel(int tokens){ // TODO: Get rid of this method when verifytapn refactored
2192- this.tokensInModel = tokens;
2193+ tokensInModel = tokens;
2194 }
2195
2196 @Override
2197@@ -62,13 +62,13 @@
2198
2199 result.append("-k ");
2200 result.append(extraTokens+tokensInModel);
2201- result.append(" ");
2202+ result.append(' ');
2203 result.append(traceMap.get(traceOption));
2204- result.append(" ");
2205+ result.append(' ');
2206 result.append(searchMap.get(searchOption));
2207- result.append(" ");
2208+ result.append(' ');
2209 result.append(symmetry ? "" : "-s"); // symmetry is on by default in verifyTAPN so "-s" disables it
2210- result.append(" ");
2211+ result.append(' ');
2212 result.append(discreteInclusion ? " -f 1" : "");
2213 result.append(discreteInclusion ? " -i " + generateDiscretePlacesList() : "");
2214 return result.toString();
2215@@ -81,7 +81,7 @@
2216 StringBuilder s = new StringBuilder();
2217 boolean first = true;
2218 for(TimedPlace p : inclusionPlaces.inclusionPlaces()) {
2219- if(!first) s.append(",");
2220+ if(!first) s.append(',');
2221
2222 s.append(p.name());
2223 if(first) first = false;
2224
2225=== modified file 'src/dk/aau/cs/verification/batchProcessing/BatchProcessingVerificationResult.java'
2226--- src/dk/aau/cs/verification/batchProcessing/BatchProcessingVerificationResult.java 2011-06-28 16:30:37 +0000
2227+++ src/dk/aau/cs/verification/batchProcessing/BatchProcessingVerificationResult.java 2011-10-14 12:17:24 +0000
2228@@ -15,7 +15,7 @@
2229 this.file = file;
2230 this.query = query;
2231 this.verificationResult = verificationResult;
2232- this.verificationTimeInMs = verificationTime;
2233+ verificationTimeInMs = verificationTime;
2234 this.stats = stats;
2235 }
2236
2237@@ -46,10 +46,7 @@
2238
2239
2240 public boolean hasStats() {
2241- if(stats instanceof NullStats)
2242- return false;
2243- else
2244- return true;
2245+ return !(stats instanceof NullStats);
2246 }
2247
2248
2249
2250=== modified file 'src/dk/aau/cs/verification/batchProcessing/BatchProcessingWorker.java'
2251--- src/dk/aau/cs/verification/batchProcessing/BatchProcessingWorker.java 2011-10-10 10:11:23 +0000
2252+++ src/dk/aau/cs/verification/batchProcessing/BatchProcessingWorker.java 2011-10-14 12:17:24 +0000
2253@@ -187,14 +187,11 @@
2254
2255 private void simplifyQuery(pipe.dataLayer.TAPNQuery query) {
2256 SimplifyPropositionsVisitor visitor = new SimplifyPropositionsVisitor();
2257- visitor.FindAndReplaceTrueAndFalsePropositions(query.getProperty());
2258+ visitor.findAndReplaceTrueAndFalsePropositions(query.getProperty());
2259 }
2260
2261 private boolean getSymmetryFromBatchProcessingOptions() {
2262- if(batchProcessingVerificationOptions.symmetry() == SymmetryOption.Yes)
2263- return true;
2264- else
2265- return false;
2266+ return batchProcessingVerificationOptions.symmetry() == SymmetryOption.Yes;
2267 }
2268
2269 private Tuple<TimedArcPetriNet, NameMapping> composeModel(LoadedBatchProcessingModel model) {
2270@@ -320,7 +317,7 @@
2271 @Override
2272 protected void process(List<BatchProcessingVerificationResult> chunks) {
2273 for(BatchProcessingVerificationResult result : chunks){
2274- tableModel.AddResult(result);
2275+ tableModel.addResult(result);
2276 }
2277 }
2278
2279
2280=== modified file 'src/net/tapaal/TAPAAL.java'
2281--- src/net/tapaal/TAPAAL.java 2011-08-29 23:00:27 +0000
2282+++ src/net/tapaal/TAPAAL.java 2011-10-14 12:17:24 +0000
2283@@ -9,7 +9,6 @@
2284 import org.apache.commons.cli.PosixParser;
2285
2286 import pipe.gui.CreateGui;
2287-import pipe.gui.Pipe;
2288 import dk.aau.cs.debug.Logger;
2289
2290 public class TAPAAL {
2291
2292=== modified file 'src/pipe/dataLayer/DataLayer.java'
2293--- src/pipe/dataLayer/DataLayer.java 2011-08-30 09:04:54 +0000
2294+++ src/pipe/dataLayer/DataLayer.java 2011-10-14 12:17:24 +0000
2295@@ -5,6 +5,19 @@
2296 import java.util.Iterator;
2297 import java.util.Observable;
2298
2299+import pipe.gui.graphicElements.AnnotationNote;
2300+import pipe.gui.graphicElements.Arc;
2301+import pipe.gui.graphicElements.PetriNetObject;
2302+import pipe.gui.graphicElements.Place;
2303+import pipe.gui.graphicElements.PlaceTransitionObject;
2304+import pipe.gui.graphicElements.Transition;
2305+import pipe.gui.graphicElements.tapn.TimedInhibitorArcComponent;
2306+import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
2307+import pipe.gui.graphicElements.tapn.TimedOutputArcComponent;
2308+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
2309+import pipe.gui.graphicElements.tapn.TimedTransitionComponent;
2310+import pipe.gui.graphicElements.tapn.TimedTransportArcComponent;
2311+
2312 import dk.aau.cs.model.tapn.TimeInvariant;
2313 import dk.aau.cs.model.tapn.TimedArcPetriNet;
2314 import dk.aau.cs.util.Require;
2315@@ -31,7 +44,7 @@
2316 * An ArrayList used to point to either the Arc, Place or Transition
2317 * ArrayLists when these ArrayLists are being update
2318 */
2319- private ArrayList changeArrayList = null;
2320+ private ArrayList<? extends PetriNetObject> changeArrayList = null;
2321
2322 /** Used to determine whether the matrixes have been modified */
2323 static boolean initialMarkingVectorChanged = true;
2324@@ -391,12 +404,7 @@
2325 addTransition((Transition) pnObject);
2326 } else if (pnObject instanceof AnnotationNote) {
2327 addAnnotation((AnnotationNote)pnObject);
2328- } else { // arrows, other labels.
2329- changeArrayList.add(pnObject);
2330- setChanged();
2331-
2332- notifyObservers(pnObject);
2333- }
2334+ }
2335 }
2336 // we reset to null so that the wrong ArrayList can't get added to
2337 changeArrayList = null;
2338@@ -875,7 +883,7 @@
2339 }
2340
2341 for (Arc arc : arcsArray) {
2342- arc.updateWeightLabel(displayConstantNames);
2343+ arc.updateLabel(displayConstantNames);
2344 arc.repaint();
2345 }
2346
2347
2348=== modified file 'src/pipe/dataLayer/PNMLWriter.java'
2349--- src/pipe/dataLayer/PNMLWriter.java 2011-02-03 19:03:15 +0000
2350+++ src/pipe/dataLayer/PNMLWriter.java 2011-10-14 12:17:24 +0000
2351@@ -10,7 +10,7 @@
2352 import org.w3c.dom.DOMException;
2353
2354 public interface PNMLWriter {
2355- public void savePNML(File file) throws NullPointerException, IOException,
2356+ void savePNML(File file) throws NullPointerException, IOException,
2357 ParserConfigurationException, DOMException,
2358 TransformerConfigurationException, TransformerException;
2359 }
2360
2361=== modified file 'src/pipe/dataLayer/TAPNQuery.java'
2362--- src/pipe/dataLayer/TAPNQuery.java 2011-06-28 16:30:37 +0000
2363+++ src/pipe/dataLayer/TAPNQuery.java 2011-10-14 12:17:24 +0000
2364@@ -52,7 +52,7 @@
2365 }
2366
2367 public void setDiscreteInclusion(boolean value){
2368- this.discreteInclusion = value;
2369+ discreteInclusion = value;
2370 }
2371
2372 public boolean discreteInclusion(){
2373@@ -193,17 +193,17 @@
2374 }
2375
2376 public void set(TAPNQuery newQuery) {
2377- this.name = newQuery.getName();
2378- this.capacity = newQuery.getCapacity();
2379- this.property = newQuery.getProperty();
2380- this.traceOption = newQuery.getTraceOption();
2381- this.searchOption = newQuery.getSearchOption();
2382- this.reductionOption = newQuery.getReductionOption();
2383- this.symmetry = newQuery.useSymmetry();
2384- this.hashTableSize = newQuery.getHashTableSize();
2385- this.extrapolationOption = newQuery.getExtrapolationOption();
2386- this.discreteInclusion = newQuery.discreteInclusion();
2387- this.inclusionPlaces = newQuery.inclusionPlaces();
2388+ name = newQuery.getName();
2389+ capacity = newQuery.getCapacity();
2390+ property = newQuery.getProperty();
2391+ traceOption = newQuery.getTraceOption();
2392+ searchOption = newQuery.getSearchOption();
2393+ reductionOption = newQuery.getReductionOption();
2394+ symmetry = newQuery.useSymmetry();
2395+ hashTableSize = newQuery.getHashTableSize();
2396+ extrapolationOption = newQuery.getExtrapolationOption();
2397+ discreteInclusion = newQuery.discreteInclusion();
2398+ inclusionPlaces = newQuery.inclusionPlaces();
2399 }
2400
2401 public InclusionPlaces inclusionPlaces() {
2402
2403=== modified file 'src/pipe/gui/AnimationController.java'
2404--- src/pipe/gui/AnimationController.java 2011-08-29 22:41:23 +0000
2405+++ src/pipe/gui/AnimationController.java 2011-10-14 12:17:24 +0000
2406@@ -26,7 +26,7 @@
2407 import javax.swing.border.EmptyBorder;
2408
2409 import pipe.dataLayer.NetType;
2410-import pipe.gui.Pipe.elementType;
2411+import pipe.gui.Pipe.ElementType;
2412 import pipe.gui.action.GuiAction;
2413 import dk.aau.cs.model.tapn.simulation.FiringMode;
2414
2415@@ -64,7 +64,7 @@
2416 }
2417
2418 public void propertyChange(PropertyChangeEvent evt) {
2419- if (evt.getPropertyName() == "selected") {
2420+ if (evt.getPropertyName().equals("selected")) {
2421 Boolean b = (Boolean) evt.getNewValue();
2422 if (b != null) {
2423 setSelected(b.booleanValue());
2424@@ -87,12 +87,12 @@
2425 randomAction, randomAnimateAction, timeAction;
2426
2427 public AnimationController() {
2428- startAction = new AnimateAction("Simulation mode", elementType.START,
2429+ startAction = new AnimateAction("Simulation mode", ElementType.START,
2430 "Toggle simulation mode", "Ctrl A", true);
2431
2432- stepbackwardAction = new AnimateAction("Back", elementType.STEPBACKWARD,
2433+ stepbackwardAction = new AnimateAction("Back", ElementType.STEPBACKWARD,
2434 "Step backward a firing", "typed 4");
2435- stepforwardAction = new AnimateAction("Forward", elementType.STEPFORWARD,
2436+ stepforwardAction = new AnimateAction("Forward", ElementType.STEPFORWARD,
2437 "Step forward a firing", "typed 6");
2438
2439 stepbackwardAction.setEnabled(false);
2440@@ -101,9 +101,9 @@
2441 // timeAction = new AnimateAction("Time", Pipe.TIMEPASS,
2442 // "Let Time pass", "_");
2443
2444- randomAction = new AnimateAction("Random", elementType.RANDOM,
2445+ randomAction = new AnimateAction("Random", ElementType.RANDOM,
2446 "Randomly fire a transition", "typed 5");
2447- randomAnimateAction = new AnimateAction("Simulate", elementType.ANIMATE,
2448+ randomAnimateAction = new AnimateAction("Simulate", ElementType.ANIMATE,
2449 "Randomly fire a number of transitions", "typed 7", true);
2450
2451 setLayout(new GridBagLayout());
2452@@ -243,7 +243,7 @@
2453 // BigDecimal timeDelayToSet = new
2454 // BigDecimal(TimeDelayField.getText(), new
2455 // MathContext(Pipe.AGE_PRECISION));
2456- if (timeDelayToSet.compareTo(new BigDecimal(0l)) <= 0) {
2457+ if (timeDelayToSet.compareTo(new BigDecimal(0L)) <= 0) {
2458 // Nothing to do, illegal value
2459 System.err.println("Illegal value");
2460 } else {
2461@@ -265,21 +265,21 @@
2462 *
2463 */
2464 private static final long serialVersionUID = -4066032248332540289L;
2465- private elementType typeID;
2466+ private ElementType typeID;
2467 private AnimationHistoryComponent animBox;
2468
2469- AnimateAction(String name, elementType typeID, String tooltip, String keystroke) {
2470+ AnimateAction(String name, ElementType typeID, String tooltip, String keystroke) {
2471 super(name, tooltip, keystroke);
2472 this.typeID = typeID;
2473 }
2474
2475- AnimateAction(String name, elementType typeID, String tooltip,
2476+ AnimateAction(String name, ElementType typeID, String tooltip,
2477 String keystroke, boolean toggleable) {
2478 super(name, tooltip, keystroke, toggleable);
2479 this.typeID = typeID;
2480 }
2481
2482- public AnimateAction(String name, elementType typeID, String tooltip,
2483+ public AnimateAction(String name, ElementType typeID, String tooltip,
2484 KeyStroke keyStroke) {
2485 super(name, tooltip, keyStroke);
2486 this.typeID = typeID;
2487
2488=== modified file 'src/pipe/gui/Animator.java'
2489--- src/pipe/gui/Animator.java 2011-08-29 23:00:27 +0000
2490+++ src/pipe/gui/Animator.java 2011-10-14 12:17:24 +0000
2491@@ -11,7 +11,7 @@
2492
2493 import pipe.dataLayer.DataLayer;
2494 import pipe.dataLayer.Template;
2495-import pipe.dataLayer.Transition;
2496+import pipe.gui.graphicElements.Transition;
2497 import pipe.gui.widgets.AnimationSelectmodeDialog;
2498 import pipe.gui.widgets.EscapableDialog;
2499 import dk.aau.cs.gui.TabContent;
2500@@ -109,7 +109,7 @@
2501 Iterator<Transition> transitionIterator = current.returnTransitions();
2502 while (transitionIterator.hasNext()) {
2503 Transition tempTransition = transitionIterator.next();
2504- if (tempTransition.isEnabled(true) == true) {
2505+ if (tempTransition.isEnabled(true)) {
2506 current.notifyObservers();
2507 tempTransition.repaint();
2508 }
2509@@ -125,7 +125,7 @@
2510 Iterator<Transition> transitionIterator = current.returnTransitions();
2511 while (transitionIterator.hasNext()) {
2512 Transition tempTransition = transitionIterator.next();
2513- if (tempTransition.isEnabled(true) == false) {
2514+ if (!(tempTransition.isEnabled(true))) {
2515 current.notifyObservers();
2516 tempTransition.repaint();
2517 }
2518
2519=== modified file 'src/pipe/gui/CopyPasteable.java'
2520--- src/pipe/gui/CopyPasteable.java 2011-08-30 09:50:08 +0000
2521+++ src/pipe/gui/CopyPasteable.java 2011-10-14 12:17:24 +0000
2522@@ -1,6 +1,6 @@
2523 package pipe.gui;
2524
2525-import pipe.dataLayer.PetriNetObject;
2526+import pipe.gui.graphicElements.PetriNetObject;
2527
2528 /**
2529 * This is the interface that a component must implement so that it can be
2530@@ -15,7 +15,7 @@
2531 *
2532 * @return a copy of the PetriNetObject
2533 */
2534- public PetriNetObject copy();
2535+ PetriNetObject copy();
2536
2537 /**
2538 * paste()
2539@@ -26,7 +26,7 @@
2540 * @return a copy of the saved PetriNetObject that can be added to a GuiView
2541 * instance
2542 */
2543- public PetriNetObject paste(double despX, double despY,
2544+ PetriNetObject paste(double despX, double despY,
2545 boolean toAnotherView);
2546
2547 /**
2548@@ -34,6 +34,6 @@
2549 *
2550 * @return true if this object can be copied and pasted
2551 */
2552- public boolean isCopyPasteable();
2553+ boolean isCopyPasteable();
2554
2555 }
2556
2557=== modified file 'src/pipe/gui/CreateGui.java'
2558--- src/pipe/gui/CreateGui.java 2011-08-29 23:00:27 +0000
2559+++ src/pipe/gui/CreateGui.java 2011-10-14 12:17:24 +0000
2560@@ -58,11 +58,11 @@
2561 message.append("\nNew version: ");
2562 message.append(versionChecker.getNewVersionNumber());
2563 String changelog = versionChecker.getChangelog();
2564- if (changelog != ""){
2565- message.append("\n");
2566- message.append("\n");
2567+ if (!changelog.equals("")){
2568+ message.append('\n');
2569+ message.append('\n');
2570 message.append("Changelog:");
2571- message.append("\n");
2572+ message.append('\n');
2573 message.append(changelog);
2574 }
2575
2576
2577=== modified file 'src/pipe/gui/DrawingSurfaceImpl.java'
2578--- src/pipe/gui/DrawingSurfaceImpl.java 2011-10-14 11:36:08 +0000
2579+++ src/pipe/gui/DrawingSurfaceImpl.java 2011-10-14 12:17:24 +0000
2580@@ -16,28 +16,25 @@
2581 import java.util.ArrayList;
2582 import java.util.Observable;
2583 import java.util.Observer;
2584-
2585 import javax.swing.JLayeredPane;
2586-import javax.swing.JScrollPane;
2587 import javax.swing.JViewport;
2588 import javax.swing.SwingUtilities;
2589 import javax.swing.event.MouseInputAdapter;
2590-
2591-import pipe.dataLayer.AnnotationNote;
2592-import pipe.dataLayer.Arc;
2593 import pipe.dataLayer.DataLayer;
2594-import pipe.dataLayer.Note;
2595-import pipe.dataLayer.PetriNetObject;
2596-import pipe.dataLayer.Place;
2597-import pipe.dataLayer.PlaceTransitionObject;
2598 import pipe.dataLayer.Template;
2599-import pipe.dataLayer.TimedInputArcComponent;
2600-import pipe.dataLayer.TimedPlaceComponent;
2601-import pipe.dataLayer.TimedTransitionComponent;
2602-import pipe.dataLayer.TimedTransportArcComponent;
2603-import pipe.dataLayer.Transition;
2604 import pipe.gui.GuiFrame.GUIMode;
2605-import pipe.gui.Pipe.elementType;
2606+import pipe.gui.Pipe.ElementType;
2607+import pipe.gui.graphicElements.AnnotationNote;
2608+import pipe.gui.graphicElements.Arc;
2609+import pipe.gui.graphicElements.Note;
2610+import pipe.gui.graphicElements.PetriNetObject;
2611+import pipe.gui.graphicElements.Place;
2612+import pipe.gui.graphicElements.PlaceTransitionObject;
2613+import pipe.gui.graphicElements.Transition;
2614+import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
2615+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
2616+import pipe.gui.graphicElements.tapn.TimedTransitionComponent;
2617+import pipe.gui.graphicElements.tapn.TimedTransportArcComponent;
2618 import pipe.gui.handler.AnimationHandler;
2619 import pipe.gui.handler.AnnotationNoteHandler;
2620 import pipe.gui.handler.ArcHandler;
2621@@ -158,12 +155,10 @@
2622 add(pnObject);
2623 }
2624
2625- if(CreateGui.getApp().getMode() == elementType.SELECT)
2626+ if(CreateGui.getApp().getMode() == ElementType.SELECT)
2627 this.selection.enableSelection();
2628
2629- Component component = getParent().getParent();
2630- JScrollPane pane = (JScrollPane)component;
2631- repaintAll();
2632+
2633 }
2634
2635 public void addNewPetriNetObject(PetriNetObject newObject) {
2636@@ -249,9 +244,8 @@
2637 ((Note) newObject).getNote().addMouseMotionListener(noteHandler);
2638 }
2639
2640- if (newObject instanceof Zoomable) {
2641- newObject.zoomUpdate(getZoom());
2642- }
2643+ newObject.zoomUpdate(getZoom());
2644+
2645 }
2646 newObject.setGuiModel(guiModel);
2647 }
2648@@ -261,7 +255,7 @@
2649
2650 public void update(Observable o, Object diffObj) {
2651 if ((diffObj instanceof PetriNetObject) && (diffObj != null)) {
2652- if (CreateGui.appGui.getMode() == elementType.CREATING) {
2653+ if (CreateGui.appGui.getMode() == ElementType.CREATING) {
2654
2655 addNewPetriNetObject((PetriNetObject) diffObj);
2656 }
2657@@ -631,14 +625,14 @@
2658 Point start = e.getPoint();
2659 Point p;
2660 if (SwingUtilities.isLeftMouseButton(e)) {
2661- Pipe.elementType mode = app.getMode();
2662+ Pipe.ElementType mode = app.getMode();
2663 switch (mode) {
2664 case PLACE:
2665 PlaceTransitionObject pto = newPlace(e.getPoint());
2666 getUndoManager().addNewEdit(
2667 new AddPetriNetObjectEdit(pto, view, guiModel));
2668 if (e.isControlDown()) {
2669- app.setFastMode(elementType.FAST_TRANSITION);
2670+ app.setFastMode(ElementType.FAST_TRANSITION);
2671 pnObject.dispatchEvent(e);
2672 }
2673 break;
2674@@ -650,19 +644,19 @@
2675 (TimedPlaceComponent) pto2, model,
2676 guiModel, view));
2677 if (e.isControlDown()) {
2678- app.setFastMode(elementType.FAST_TRANSITION);
2679+ app.setFastMode(ElementType.FAST_TRANSITION);
2680 pnObject.dispatchEvent(e);
2681 }
2682 break;
2683
2684 case IMMTRANS:
2685 case TIMEDTRANS:
2686- boolean timed = (mode == elementType.TIMEDTRANS ? true : false);
2687+ boolean timed = (mode == ElementType.TIMEDTRANS ? true : false);
2688 pto = newTransition(e.getPoint(), timed);
2689 getUndoManager().addNewEdit(
2690 new AddPetriNetObjectEdit(pto, view, guiModel));
2691 if (e.isControlDown()) {
2692- app.setFastMode(elementType.FAST_PLACE);
2693+ app.setFastMode(ElementType.FAST_PLACE);
2694 pnObject.dispatchEvent(e);
2695 }
2696 break;
2697@@ -673,7 +667,7 @@
2698 (TimedTransitionComponent) pto, model,
2699 guiModel, view));
2700 if (e.isControlDown()) {
2701- app.setFastMode(elementType.FAST_PLACE);
2702+ app.setFastMode(ElementType.FAST_PLACE);
2703 pnObject.dispatchEvent(e);
2704 }
2705 break;
2706
2707=== modified file 'src/pipe/gui/Export.java'
2708--- src/pipe/gui/Export.java 2011-03-30 17:05:37 +0000
2709+++ src/pipe/gui/Export.java 2011-10-14 12:17:24 +0000
2710@@ -31,7 +31,7 @@
2711 import javax.swing.JOptionPane;
2712
2713 import pipe.dataLayer.DataLayer;
2714-import pipe.dataLayer.PetriNetObject;
2715+import pipe.gui.graphicElements.PetriNetObject;
2716 import pipe.gui.widgets.FileBrowser;
2717
2718 /**
2719@@ -85,7 +85,7 @@
2720 // /* The Swing way
2721 PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
2722 DocFlavor flavour = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
2723- PrintService printService[] = PrintServiceLookup.lookupPrintServices(
2724+ PrintService[] printService = PrintServiceLookup.lookupPrintServices(
2725 flavour, pras);
2726
2727 if (printService.length == 0) {
2728
2729=== modified file 'src/pipe/gui/GuiFrame.java'
2730--- src/pipe/gui/GuiFrame.java 2011-10-14 11:36:08 +0000
2731+++ src/pipe/gui/GuiFrame.java 2011-10-14 12:17:24 +0000
2732@@ -60,12 +60,12 @@
2733 import pipe.dataLayer.DataLayer;
2734 import pipe.dataLayer.NetType;
2735 import pipe.dataLayer.PNMLWriter;
2736-import pipe.dataLayer.PetriNetObject;
2737 import pipe.dataLayer.TAPNQuery;
2738 import pipe.dataLayer.Template;
2739-import pipe.dataLayer.TimedPlaceComponent;
2740-import pipe.gui.Pipe.elementType;
2741+import pipe.gui.Pipe.ElementType;
2742 import pipe.gui.action.GuiAction;
2743+import pipe.gui.graphicElements.PetriNetObject;
2744+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
2745 import pipe.gui.handler.SpecialMacHandler;
2746 import pipe.gui.widgets.EscapableDialog;
2747 import pipe.gui.widgets.FileBrowser;
2748@@ -94,7 +94,7 @@
2749 private String frameTitle; // Frame title
2750 private GuiFrame appGui;
2751 private DrawingSurfaceImpl appView;
2752- private Pipe.elementType mode, prev_mode, old_mode; // *** mode WAS STATIC ***
2753+ private Pipe.ElementType mode, prev_mode, old_mode; // *** mode WAS STATIC ***
2754 private int newNameCounter = 1;
2755 private JTabbedPane appTab;
2756 private StatusBar statusBar;
2757@@ -305,7 +305,7 @@
2758
2759 if (dirURL.getProtocol().equals("jar")) {
2760 /* A JAR path */
2761- String jarPath = dirURL.getPath().substring(5, dirURL.getPath().indexOf("!")); //strip out only the JAR file
2762+ String jarPath = dirURL.getPath().substring(5, dirURL.getPath().indexOf('!')); //strip out only the JAR file
2763 JarFile jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8"));
2764 Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar
2765 Set<String> result = new HashSet<String>(); //avoid duplicates in case it is a subdirectory
2766@@ -313,7 +313,7 @@
2767 String name = entries.nextElement().getName();
2768 if (name.startsWith("resources/Example nets/")) { //filter according to the path
2769 String entry = name.substring("resources/Example nets/".length());
2770- int checkSubdir = entry.indexOf("/");
2771+ int checkSubdir = entry.indexOf('/');
2772 if (checkSubdir >= 0) {
2773 // if it is a subdirectory, we just return the directory name
2774 entry = entry.substring(0, checkSubdir);
2775@@ -327,8 +327,7 @@
2776 Arrays.sort(nets, new Comparator<String>() {
2777 public int compare(String one, String two) {
2778
2779- int toReturn = ((String) one).compareTo(
2780- ((String) two));
2781+ int toReturn = one.compareTo(two);
2782 // Special hack to get intro-example first
2783 if (one.equals("intro-example.xml")) {
2784 toReturn = -1;
2785@@ -388,34 +387,35 @@
2786 JMenu drawMenu = new JMenu("Draw");
2787 drawMenu.setMnemonic('D');
2788 addMenuItem(drawMenu, selectAction = new TypeAction("Select",
2789- elementType.SELECT, "Select components (S)", "S", true));
2790+ ElementType.SELECT, "Select components (S)", "S", true));
2791 drawMenu.addSeparator();
2792
2793 addMenuItem(drawMenu, timedPlaceAction = new TypeAction("Place",
2794- elementType.TAPNPLACE, "Add a place (P)", "P", true));
2795+ ElementType.TAPNPLACE, "Add a place (P)", "P", true));
2796
2797 addMenuItem(drawMenu, transAction = new TypeAction("Transition",
2798- elementType.TAPNTRANS, "Add a transition (T)", "T", true));
2799+ ElementType.TAPNTRANS, "Add a transition (T)", "T", true));
2800
2801 addMenuItem(drawMenu, timedArcAction = new TypeAction("Arc",
2802- elementType.TAPNARC, "Add an arc (A)", "A", true));
2803+ ElementType.TAPNARC, "Add an arc (A)", "A", true));
2804
2805 addMenuItem(drawMenu, transportArcAction = new TypeAction(
2806- "Transport Arc", elementType.TRANSPORTARC, "Add a transport arc (R)", "R",
2807+ "Transport Arc", ElementType.TRANSPORTARC, "Add a transport arc (R)", "R",
2808 true));
2809
2810 addMenuItem(drawMenu, inhibarcAction = new TypeAction("Inhibitor Arc",
2811- elementType.TAPNINHIBITOR_ARC, "Add an inhibitor arc (I)", "I", true));
2812+ ElementType.TAPNINHIBITOR_ARC, "Add an inhibitor arc (I)", "I", true));
2813
2814 addMenuItem(drawMenu, annotationAction = new TypeAction("Annotation",
2815- elementType.ANNOTATION, "Add an annotation (N)", "N", true));
2816+ ElementType.ANNOTATION, "Add an annotation (N)", "N", true));
2817
2818 drawMenu.addSeparator();
2819
2820 addMenuItem(drawMenu, tokenAction = new TypeAction("Add token",
2821- elementType.ADDTOKEN, "Add a token (+)", "typed +", true));
2822+ ElementType.ADDTOKEN, "Add a token (+)", "typed +", true));
2823+
2824 addMenuItem(drawMenu, deleteTokenAction = new TypeAction(
2825- "Delete token", elementType.DELTOKEN, "Delete a token (-)", "typed -",
2826+ "Delete token", ElementType.DELTOKEN, "Delete a token (-)", "typed -",
2827 true));
2828
2829 /* ViewMenu */
2830@@ -437,7 +437,7 @@
2831 viewMenu.addSeparator();
2832 addMenuItem(viewMenu, toggleGrid = new GridAction("Cycle grid",
2833 "Change the grid size", "G"));
2834- addMenuItem(viewMenu, dragAction = new TypeAction("Drag", elementType.DRAG,
2835+ addMenuItem(viewMenu, dragAction = new TypeAction("Drag", ElementType.DRAG,
2836 "Drag the drawing", "D", true));
2837
2838 viewMenu.addSeparator();
2839@@ -453,17 +453,17 @@
2840 JMenu animateMenu = new JMenu("Simulator");
2841 animateMenu.setMnemonic('A');
2842 addMenuItem(animateMenu, startAction = new AnimateAction(
2843- "Simulation mode", elementType.START, "Toggle simulation mode (M)",
2844+ "Simulation mode", ElementType.START, "Toggle simulation mode (M)",
2845 "M", true));
2846 animateMenu.addSeparator();
2847 addMenuItem(animateMenu, stepbackwardAction = new AnimateAction("Back",
2848- elementType.STEPBACKWARD, "Step backward a firing", "typed 4"));
2849+ ElementType.STEPBACKWARD, "Step backward a firing", "typed 4"));
2850 addMenuItem(animateMenu,
2851 stepforwardAction = new AnimateAction("Forward",
2852- elementType.STEPFORWARD, "Step forward a firing", "typed 6"));
2853+ ElementType.STEPFORWARD, "Step forward a firing", "typed 6"));
2854
2855 addMenuItem(animateMenu, timeAction = new AnimateAction("Delay 1",
2856- elementType.TIMEPASS, "Let time pass 1 time unit", "typed 1"));
2857+ ElementType.TIMEPASS, "Let time pass 1 time unit", "typed 1"));
2858
2859 /*
2860 * addMenuItem(animateMenu, randomAction = new AnimateAction("Random",
2861@@ -472,9 +472,9 @@
2862 * AnimateAction("Simulate", Pipe.ANIMATE,
2863 * "Randomly fire a number of transitions", "typed 7",true));
2864 */
2865- randomAction = new AnimateAction("Random", elementType.RANDOM,
2866+ randomAction = new AnimateAction("Random", ElementType.RANDOM,
2867 "Randomly fire a transition", "typed 5");
2868- randomAnimateAction = new AnimateAction("Simulate", elementType.ANIMATE,
2869+ randomAnimateAction = new AnimateAction("Simulate", ElementType.ANIMATE,
2870 "Randomly fire a number of transitions", "typed 7", true);
2871
2872
2873@@ -866,7 +866,7 @@
2874 setGUIMode(GUIMode.draw);
2875
2876 // TODO: change this code... it's ugly :)
2877- if (appGui.getMode() == elementType.SELECT) {
2878+ if (appGui.getMode() == ElementType.SELECT) {
2879 appGui.activateSelectAction();
2880 }
2881
2882@@ -886,7 +886,7 @@
2883
2884 // HAK Method called by netModel object when it changes
2885 public void update(Observable o, Object obj) {
2886- if ((mode != elementType.CREATING) && (!appView.isInAnimationMode())) {
2887+ if ((mode != ElementType.CREATING) && (!appView.isInAnimationMode())) {
2888 appView.setNetChanged(true);
2889 }
2890 }
2891@@ -1030,7 +1030,7 @@
2892 int currentlySelected = appTab.getSelectedIndex();
2893
2894
2895- if (namePrefix == null || namePrefix == "") {
2896+ if (namePrefix == null || namePrefix.equals("")) {
2897 name = "New Petri net " + (newNameCounter++) + ".xml";
2898 } else {
2899 name = namePrefix + ".xml";
2900@@ -1046,7 +1046,7 @@
2901 TabContent currentTab = (TabContent) appTab.getSelectedComponent();
2902 if (CreateGui.getApp() != null) {
2903 // Notifies used to indicate new instances.
2904- CreateGui.getApp().setMode(elementType.CREATING);
2905+ CreateGui.getApp().setMode(ElementType.CREATING);
2906 }
2907
2908 ModelLoader loader = new ModelLoader(currentTab.drawingSurface());
2909@@ -1111,7 +1111,7 @@
2910 TabContent currentTab = (TabContent) appTab.getSelectedComponent();
2911 if (CreateGui.getApp() != null) {
2912 // Notifies used to indicate new instances.
2913- CreateGui.getApp().setMode(elementType.CREATING);
2914+ CreateGui.getApp().setMode(ElementType.CREATING);
2915 }
2916
2917 ModelLoader loader = new ModelLoader(currentTab.drawingSurface());
2918@@ -1199,7 +1199,7 @@
2919 // Loop through all tabs and check if they have been saved
2920 for (int counter = 0; counter < appTab.getTabCount(); counter++) {
2921 appTab.setSelectedIndex(counter);
2922- if (checkForSave() == false) {
2923+ if (!(checkForSave())) {
2924 return false;
2925 }
2926 }
2927@@ -1208,7 +1208,7 @@
2928
2929 public void setRandomAnimationMode(boolean on) {
2930
2931- if (on == false) {
2932+ if (!(on)) {
2933 stepforwardAction.setEnabled(CreateGui.getAnimationHistory().isStepForwardAllowed());
2934 stepbackwardAction.setEnabled(CreateGui.getAnimationHistory().isStepBackAllowed());
2935
2936@@ -1314,12 +1314,12 @@
2937 setMode(old_mode);
2938 }
2939
2940- public void setFastMode(Pipe.elementType _mode) {
2941+ public void setFastMode(Pipe.ElementType _mode) {
2942 old_mode = mode;
2943 setMode(_mode);
2944 }
2945
2946- public void setMode(Pipe.elementType _mode) {
2947+ public void setMode(Pipe.ElementType _mode) {
2948 // Don't bother unless new mode is different.
2949 if (mode != _mode) {
2950 prev_mode = mode;
2951@@ -1327,7 +1327,7 @@
2952 }
2953 }
2954
2955- public Pipe.elementType getMode() {
2956+ public Pipe.ElementType getMode() {
2957 return mode;
2958 }
2959
2960@@ -1337,40 +1337,40 @@
2961 mode = prev_mode;
2962
2963 if (placeAction != null) {
2964- placeAction.setSelected(mode == elementType.PLACE);
2965+ placeAction.setSelected(mode == ElementType.PLACE);
2966 }
2967 if (transAction != null) {
2968- transAction.setSelected(mode == elementType.IMMTRANS);
2969+ transAction.setSelected(mode == ElementType.IMMTRANS);
2970 }
2971
2972 if (timedtransAction != null) {
2973- timedtransAction.setSelected(mode == elementType.TIMEDTRANS);
2974+ timedtransAction.setSelected(mode == ElementType.TIMEDTRANS);
2975 }
2976
2977 if (arcAction != null) {
2978- arcAction.setSelected(mode == elementType.ARC);
2979+ arcAction.setSelected(mode == ElementType.ARC);
2980 }
2981
2982 if (timedArcAction != null)
2983- timedArcAction.setSelected(mode == elementType.TAPNARC);
2984+ timedArcAction.setSelected(mode == ElementType.TAPNARC);
2985
2986 if (transportArcAction != null)
2987- transportArcAction.setSelected(mode == elementType.TRANSPORTARC);
2988+ transportArcAction.setSelected(mode == ElementType.TRANSPORTARC);
2989
2990 if (timedPlaceAction != null)
2991- timedPlaceAction.setSelected(mode == elementType.TAPNPLACE);
2992+ timedPlaceAction.setSelected(mode == ElementType.TAPNPLACE);
2993
2994 if (tokenAction != null)
2995- tokenAction.setSelected(mode == elementType.ADDTOKEN);
2996+ tokenAction.setSelected(mode == ElementType.ADDTOKEN);
2997
2998 if (deleteTokenAction != null)
2999- deleteTokenAction.setSelected(mode == elementType.DELTOKEN);
3000+ deleteTokenAction.setSelected(mode == ElementType.DELTOKEN);
3001
3002 if (selectAction != null)
3003- selectAction.setSelected(mode == elementType.SELECT);
3004+ selectAction.setSelected(mode == ElementType.SELECT);
3005
3006 if (annotationAction != null)
3007- annotationAction.setSelected(mode == elementType.ANNOTATION);
3008+ annotationAction.setSelected(mode == ElementType.ANNOTATION);
3009
3010 }
3011
3012@@ -1398,7 +1398,7 @@
3013
3014 public void activateSelectAction() {
3015 // Set selection mode at startup
3016- setMode(elementType.SELECT);
3017+ setMode(ElementType.SELECT);
3018 selectAction.actionPerformed(null);
3019 }
3020
3021@@ -1441,21 +1441,21 @@
3022 *
3023 */
3024 private static final long serialVersionUID = 8582324286370859664L;
3025- private elementType typeID;
3026+ private ElementType typeID;
3027 private AnimationHistoryComponent animBox;
3028
3029- AnimateAction(String name, elementType typeID, String tooltip, String keystroke) {
3030+ AnimateAction(String name, ElementType typeID, String tooltip, String keystroke) {
3031 super(name, tooltip, keystroke);
3032 this.typeID = typeID;
3033 }
3034
3035- AnimateAction(String name, elementType typeID, String tooltip,
3036+ AnimateAction(String name, ElementType typeID, String tooltip,
3037 String keystroke, boolean toggleable) {
3038 super(name, tooltip, keystroke, toggleable);
3039 this.typeID = typeID;
3040 }
3041
3042- public AnimateAction(String name, elementType typeID, String tooltip,
3043+ public AnimateAction(String name, ElementType typeID, String tooltip,
3044 KeyStroke keyStroke) {
3045 super(name, tooltip, keyStroke);
3046 this.typeID = typeID;
3047@@ -1527,7 +1527,7 @@
3048 animBox.stepForward();
3049 CreateGui.getAnimator().stepForward();
3050 // update mouseOverView
3051- for (pipe.dataLayer.Place p : CreateGui.getModel().getPlaces()) {
3052+ for (pipe.gui.graphicElements.Place p : CreateGui.getModel().getPlaces()) {
3053 if (((TimedPlaceComponent) p).isAgeOfTokensShown()) {
3054 ((TimedPlaceComponent) p).showAgeOfTokens(true);
3055 }
3056@@ -1539,7 +1539,7 @@
3057 animBox.stepBackwards();
3058 CreateGui.getAnimator().stepBack();
3059 // update mouseOverView
3060- for (pipe.dataLayer.Place p : CreateGui.getModel().getPlaces()) {
3061+ for (pipe.gui.graphicElements.Place p : CreateGui.getModel().getPlaces()) {
3062 if (((TimedPlaceComponent) p).isAgeOfTokensShown()) {
3063 ((TimedPlaceComponent) p).showAgeOfTokens(true);
3064 }
3065@@ -1608,7 +1608,7 @@
3066 s.append("The following queries are associated with the currently selected objects:\n\n");
3067 for (TAPNQuery q : queriesToDelete) {
3068 s.append(q.getName());
3069- s.append("\n");
3070+ s.append('\n');
3071 }
3072 s.append("\nAre you sure you want to remove the current selection and all associated queries?");
3073
3074@@ -1651,14 +1651,14 @@
3075 *
3076 */
3077 private static final long serialVersionUID = 1333311291148756241L;
3078- private Pipe.elementType typeID;
3079+ private Pipe.ElementType typeID;
3080
3081- TypeAction(String name, Pipe.elementType typeID, String tooltip, String keystroke) {
3082+ TypeAction(String name, Pipe.ElementType typeID, String tooltip, String keystroke) {
3083 super(name, tooltip, keystroke);
3084 this.typeID = typeID;
3085 }
3086
3087- TypeAction(String name, Pipe.elementType typeID, String tooltip, String keystroke,
3088+ TypeAction(String name, Pipe.ElementType typeID, String tooltip, String keystroke,
3089 boolean toggleable) {
3090 super(name, tooltip, keystroke, toggleable);
3091 this.typeID = typeID;
3092@@ -1714,7 +1714,7 @@
3093 setMode(typeID);
3094 statusBar.changeText(typeID);
3095
3096- if ((typeID != elementType.ARC) && (appView.createArc != null)) {
3097+ if ((typeID != ElementType.ARC) && (appView.createArc != null)) {
3098
3099 appView.createArc.delete();
3100 appView.createArc = null;
3101@@ -1722,13 +1722,13 @@
3102
3103 }
3104
3105- if (typeID == elementType.SELECT) {
3106+ if (typeID == ElementType.SELECT) {
3107 // disable drawing to eliminate possiblity of connecting arc to
3108 // old coord of moved component
3109 statusBar.changeText(typeID);
3110 appView.getSelectionObject().enableSelection();
3111 appView.setCursorType("arrow");
3112- } else if (typeID == elementType.DRAG) {
3113+ } else if (typeID == ElementType.DRAG) {
3114 appView.setCursorType("move");
3115 } else {
3116 appView.setCursorType("crosshair");
3117@@ -1810,7 +1810,7 @@
3118 return;
3119 }
3120 }
3121- if (doZoom == true) {
3122+ if (doZoom) {
3123 updateZoomCombo();
3124 appView.zoomTo(new java.awt.Point((int) midpointX,
3125 (int) midpointY));
3126@@ -1924,7 +1924,7 @@
3127 buffer.append("TAPAAL Engine (verifytapn) Information:\n");
3128 buffer.append(" Located: ");
3129 buffer.append(verifytapnPath);
3130- buffer.append("\n");
3131+ buffer.append('\n');
3132 buffer.append(" Version: ");
3133 buffer.append(verifytapnversion);
3134 buffer.append("\n\n");
3135@@ -1932,7 +1932,7 @@
3136 buffer.append("UPPAAL Engine (verifyta) Information:\n");
3137 buffer.append(" Located: ");
3138 buffer.append(verifytaPath);
3139- buffer.append("\n");
3140+ buffer.append('\n');
3141 buffer.append(" Version: ");
3142 buffer.append(verifytaversion);
3143
3144@@ -2159,7 +2159,7 @@
3145 }
3146
3147 public void propertyChange(PropertyChangeEvent evt) {
3148- if (evt.getPropertyName() == "selected") {
3149+ if (evt.getPropertyName().equals("selected")) {
3150 Boolean b = (Boolean) evt.getNewValue();
3151 if (b != null) {
3152 setSelected(b.booleanValue());
3153
3154=== modified file 'src/pipe/gui/KBoundAnalyzer.java'
3155--- src/pipe/gui/KBoundAnalyzer.java 2011-05-21 13:59:16 +0000
3156+++ src/pipe/gui/KBoundAnalyzer.java 2011-10-14 12:17:24 +0000
3157@@ -28,7 +28,7 @@
3158 this.tapnNetwork = tapnNetwork;
3159 this.modelChecker = modelChecker;
3160 this.messenger = messenger;
3161- this.spinner = tokensControl;
3162+ spinner = tokensControl;
3163 }
3164
3165 public void analyze() {
3166
3167=== modified file 'src/pipe/gui/Pipe.java'
3168--- src/pipe/gui/Pipe.java 2011-10-14 11:36:08 +0000
3169+++ src/pipe/gui/Pipe.java 2011-10-14 12:17:24 +0000
3170@@ -11,7 +11,7 @@
3171 public static final String CLASS_FILE_DESC = "Java Class File";
3172
3173 //Enum for all actions and types of elements
3174- public static enum elementType {
3175+ public static enum ElementType {
3176 PLACE, IMMTRANS, TIMEDTRANS, ANNOTATION, ARC, INHIBARC,
3177 //TAPN Elements
3178 TAPNPLACE, TAPNTRANS, TAPNARC, TRANSPORTARC, TAPNINHIBITOR_ARC,
3179@@ -24,7 +24,7 @@
3180
3181 }
3182
3183- public static final elementType DEFAULT_ELEMENT_TYPE = elementType.SELECT;
3184+ public static final ElementType DEFAULT_ELEMENT_TYPE = ElementType.SELECT;
3185
3186 public static final int PLACE_TRANSITION_HEIGHT = 30;
3187 public static final int DASHED_PADDING = 8;
3188
3189=== modified file 'src/pipe/gui/RunVerification.java'
3190--- src/pipe/gui/RunVerification.java 2011-06-18 15:14:39 +0000
3191+++ src/pipe/gui/RunVerification.java 2011-10-14 12:17:24 +0000
3192@@ -25,7 +25,7 @@
3193 private IconSelector iconSelector;
3194 public RunVerification(ModelChecker modelChecker, IconSelector selector, Messenger messenger) {
3195 super(modelChecker, messenger);
3196- this.iconSelector = selector;
3197+ iconSelector = selector;
3198 }
3199
3200 @Override
3201@@ -69,7 +69,7 @@
3202 System.getProperty("line.separator") +
3203 System.getProperty("line.separator");
3204
3205- if (extraInformation != ""){
3206+ if (!extraInformation.equals("")){
3207 message += extraInformation +
3208 System.getProperty("line.separator") +
3209 System.getProperty("line.separator");
3210@@ -100,7 +100,7 @@
3211 gbc.anchor = GridBagConstraints.WEST;
3212 panel.add(new JLabel(toHTML(result.getResultString())), gbc);
3213
3214- if(this.modelChecker.supportsStats()){
3215+ if(modelChecker.supportsStats()){
3216 gbc = new GridBagConstraints();
3217 gbc.gridx = 0;
3218 gbc.gridy = 1;
3219
3220=== modified file 'src/pipe/gui/SelectionManager.java'
3221--- src/pipe/gui/SelectionManager.java 2011-10-09 14:30:45 +0000
3222+++ src/pipe/gui/SelectionManager.java 2011-10-14 12:17:24 +0000
3223@@ -13,11 +13,12 @@
3224 import java.awt.event.MouseWheelEvent;
3225 import java.util.ArrayList;
3226
3227-import pipe.dataLayer.Arc;
3228-import pipe.dataLayer.ArcPath;
3229-import pipe.dataLayer.PetriNetObject;
3230-import pipe.dataLayer.PlaceTransitionObject;
3231 import pipe.gui.GuiFrame.GUIMode;
3232+import pipe.gui.graphicElements.Arc;
3233+import pipe.gui.graphicElements.ArcPath;
3234+import pipe.gui.graphicElements.PetriNetObject;
3235+import pipe.gui.graphicElements.PlaceTransitionObject;
3236+
3237
3238 /**
3239 * @author Peter Kyme, Michael Camacho Class to handle selection rectangle
3240@@ -34,8 +35,8 @@
3241 private Point startPoint;
3242 private Rectangle selectionRectangle = new Rectangle(-1, -1);
3243 private boolean isSelecting;
3244- private static final Color selectionColor = new Color(000, 000, 255, 030);
3245- private static final Color selectionColorOutline = new Color(000, 000, 100);
3246+ private static final Color selectionColor = new Color(0, 0, 255, 30);
3247+ private static final Color selectionColorOutline = new Color(0, 0, 100);
3248 private DrawingSurfaceImpl drawingSurface;
3249 private boolean enabled = true;
3250
3251@@ -43,17 +44,17 @@
3252 addMouseListener(this);
3253 addMouseMotionListener(this);
3254 //addMouseWheelListener(this);
3255- this.drawingSurface = _view;
3256+ drawingSurface = _view;
3257 }
3258
3259 public void updateBounds() {
3260- if (enabled == true) {
3261+ if (enabled) {
3262 setBounds(0, 0, drawingSurface.getWidth(), drawingSurface.getHeight());
3263 }
3264 }
3265
3266 public void enableSelection() {
3267- if (enabled == false) {
3268+ if (!(enabled)) {
3269 drawingSurface.add(this);
3270 enabled = true;
3271 updateBounds();
3272@@ -61,7 +62,7 @@
3273 }
3274
3275 public void disableSelection() {
3276- if (enabled == true) {
3277+ if (enabled) {
3278 this.clearSelection();
3279 drawingSurface.remove(this);
3280 enabled = false;
3281@@ -200,7 +201,7 @@
3282 * java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
3283 */
3284 public void mouseReleased(MouseEvent e) {
3285- if (isSelecting == true) {
3286+ if (isSelecting) {
3287 // Select anything that intersects with the rectangle.
3288 processSelection(e);
3289 isSelecting = false;
3290@@ -245,15 +246,12 @@
3291 }
3292
3293 public void mouseClicked(MouseEvent e) {
3294- ;// Not needed
3295 }
3296
3297 public void mouseEntered(MouseEvent e) {
3298- ; // Not needed
3299 }
3300
3301 public void mouseExited(MouseEvent e) {
3302- ; // Not needed
3303 }
3304
3305 /*
3306@@ -263,11 +261,10 @@
3307 * java.awt.event.MouseMotionListener#mouseMoved(java.awt.event.MouseEvent)
3308 */
3309 public void mouseMoved(MouseEvent e) {
3310- ; // Not needed
3311 }
3312
3313 public int getSelectionCount() {
3314- Component netObj[] = drawingSurface.getComponents();
3315+ Component[] netObj = drawingSurface.getComponents();
3316 int selectionCount = 0;
3317 // Get all the objects in the current window
3318 for (int i = 0; i < netObj.length; i++) {
3319
3320=== modified file 'src/pipe/gui/StatusBar.java'
3321--- src/pipe/gui/StatusBar.java 2011-10-14 11:36:08 +0000
3322+++ src/pipe/gui/StatusBar.java 2011-10-14 12:17:24 +0000
3323@@ -58,7 +58,7 @@
3324 label.setText(newText);
3325 }
3326
3327- public void changeText(Pipe.elementType type) {
3328+ public void changeText(Pipe.ElementType type) {
3329 switch (type) {
3330 case PLACE:
3331 changeText(textforPlace);
3332
3333=== modified file 'src/pipe/gui/TikZExporter.java'
3334--- src/pipe/gui/TikZExporter.java 2011-08-30 08:42:12 +0000
3335+++ src/pipe/gui/TikZExporter.java 2011-10-14 12:17:24 +0000
3336@@ -3,20 +3,21 @@
3337 import java.io.FileWriter;
3338 import java.io.IOException;
3339 import java.io.PrintWriter;
3340-import java.math.BigDecimal;
3341-import java.util.ArrayList;
3342-
3343-import pipe.dataLayer.Arc;
3344-import pipe.dataLayer.ArcPathPoint;
3345+import java.util.List;
3346+
3347+import dk.aau.cs.model.tapn.TimedToken;
3348+
3349 import pipe.dataLayer.DataLayer;
3350 import pipe.dataLayer.NetType;
3351-import pipe.dataLayer.Place;
3352-import pipe.dataLayer.TimedInhibitorArcComponent;
3353-import pipe.dataLayer.TimedInputArcComponent;
3354-import pipe.dataLayer.TimedPlaceComponent;
3355-import pipe.dataLayer.TimedTransitionComponent;
3356-import pipe.dataLayer.Transition;
3357-import pipe.dataLayer.TimedTransportArcComponent;
3358+import pipe.gui.graphicElements.Arc;
3359+import pipe.gui.graphicElements.ArcPathPoint;
3360+import pipe.gui.graphicElements.Place;
3361+import pipe.gui.graphicElements.Transition;
3362+import pipe.gui.graphicElements.tapn.TimedInhibitorArcComponent;
3363+import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
3364+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
3365+import pipe.gui.graphicElements.tapn.TimedTransitionComponent;
3366+import pipe.gui.graphicElements.tapn.TimedTransportArcComponent;
3367
3368 public class TikZExporter {
3369
3370@@ -156,7 +157,7 @@
3371 out.append(exportMathName(trans.getName()));
3372 out.append("] at (");
3373 out.append(trans.getPositionX() * scale);
3374- out.append(",");
3375+ out.append(',');
3376 out.append(trans.getPositionY() * scale * (-1));
3377 out.append(") (");
3378 out.append(trans.getId());
3379@@ -181,12 +182,12 @@
3380
3381 out.append("\\node[place,label=above:");
3382 out.append(exportMathName(place.getName()));
3383- out.append(",");
3384+ out.append(',');
3385 out.append(invariant);
3386 out.append(tokensInPlace);
3387 out.append("] at (");
3388 out.append(place.getPositionX() * scale);
3389- out.append(",");
3390+ out.append(',');
3391 out.append(place.getPositionY() * scale * (-1));
3392 out.append(") (");
3393 out.append(place.getId());
3394@@ -203,11 +204,13 @@
3395 }
3396
3397 protected String getTokenListStringFor(Place place) {
3398- ArrayList<BigDecimal> tokens = ((TimedPlaceComponent) place).getTokens();
3399+
3400+ List<TimedToken> tokens = ((TimedPlaceComponent) place).underlyingPlace().tokens();
3401+
3402 String tokensInPlace = "";
3403 if (tokens.size() > 0) {
3404 if (tokens.size() == 1 && !net.netType().equals(NetType.UNTIMED)) {
3405- tokensInPlace = "structured tokens={" + tokens.get(0).setScale(1) + "},";
3406+ tokensInPlace = "structured tokens={" + tokens.get(0).age().setScale(1) + "},";
3407 } else {
3408 tokensInPlace = exportMultipleTokens(tokens);
3409 }
3410@@ -224,7 +227,7 @@
3411 return invariant;
3412 }
3413
3414- private String exportMultipleTokens(ArrayList<BigDecimal> tokens) {
3415+ private String exportMultipleTokens(List<TimedToken> tokens) {
3416 StringBuffer out = new StringBuffer();
3417
3418 out.append("structured tokens={\\#");
3419@@ -233,10 +236,10 @@
3420 if (!net.netType().equals(NetType.UNTIMED)) {
3421 out.append("pin=above:{\\{");
3422 for (int i = 0; i < tokens.size() - 1; i++) {
3423- out.append(tokens.get(i).setScale(1));
3424- out.append(",");
3425+ out.append(tokens.get(i).age().setScale(1));
3426+ out.append(',');
3427 }
3428- out.append(tokens.get(tokens.size() - 1).setScale(1));
3429+ out.append(tokens.get(tokens.size() - 1).age().setScale(1));
3430 out.append("\\}},");
3431 }
3432 return out.toString();
3433@@ -283,9 +286,9 @@
3434 out.append(last);
3435
3436 for (int i = 0; i < subscripts; i++) {
3437- out.append("}");
3438+ out.append('}');
3439 }
3440- out.append("$");
3441+ out.append('$');
3442 return out.toString();
3443 }
3444
3445
3446=== modified file 'src/pipe/gui/Translatable.java'
3447--- src/pipe/gui/Translatable.java 2011-02-03 19:03:15 +0000
3448+++ src/pipe/gui/Translatable.java 2011-10-14 12:17:24 +0000
3449@@ -10,6 +10,6 @@
3450 */
3451 public interface Translatable {
3452
3453- public void translate(int x, int y);
3454+ void translate(int x, int y);
3455
3456 }
3457
3458=== modified file 'src/pipe/gui/VersionChecker.java'
3459--- src/pipe/gui/VersionChecker.java 2011-08-29 23:00:27 +0000
3460+++ src/pipe/gui/VersionChecker.java 2011-10-14 12:17:24 +0000
3461@@ -11,7 +11,7 @@
3462 import dk.aau.cs.debug.Logger;
3463
3464 public class VersionChecker {
3465- private final static String versionURL = "http://www.tapaal.net/fileadmin/version.txt";
3466+ private static final String versionURL = "http://www.tapaal.net/fileadmin/version.txt";
3467 private static final int timeoutMs = 6000;
3468 private URL url;
3469 private String newestVersion;
3470
3471=== modified file 'src/pipe/gui/Zoomable.java'
3472--- src/pipe/gui/Zoomable.java 2011-02-03 19:03:15 +0000
3473+++ src/pipe/gui/Zoomable.java 2011-10-14 12:17:24 +0000
3474@@ -10,6 +10,6 @@
3475 */
3476 public interface Zoomable {
3477
3478- public void zoomUpdate(int zoom);
3479+ void zoomUpdate(int zoom);
3480
3481 }
3482
3483=== modified file 'src/pipe/gui/Zoomer.java'
3484--- src/pipe/gui/Zoomer.java 2011-07-16 11:42:34 +0000
3485+++ src/pipe/gui/Zoomer.java 2011-10-14 12:17:24 +0000
3486@@ -61,7 +61,7 @@
3487 }
3488
3489 public static double getZoomedValue(double x, int zoom) {
3490- return (x * zoom * 0.01);
3491+ return x * zoom * 0.01;
3492 }
3493
3494 public static AffineTransform getTransform(int zoom) {
3495@@ -77,7 +77,7 @@
3496 }
3497
3498 public static double getUnzoomedValue(double x, int zoom) {
3499- return (x / (zoom * 0.01));
3500+ return x / (zoom * 0.01);
3501 }
3502
3503 }
3504
3505=== modified file 'src/pipe/gui/action/DeletePetriNetObjectAction.java'
3506--- src/pipe/gui/action/DeletePetriNetObjectAction.java 2011-08-30 10:07:54 +0000
3507+++ src/pipe/gui/action/DeletePetriNetObjectAction.java 2011-10-14 12:17:24 +0000
3508@@ -12,10 +12,10 @@
3509 import javax.swing.AbstractAction;
3510 import javax.swing.JOptionPane;
3511
3512-import pipe.dataLayer.PetriNetObject;
3513 import pipe.dataLayer.TAPNQuery;
3514-import pipe.dataLayer.TimedPlaceComponent;
3515 import pipe.gui.CreateGui;
3516+import pipe.gui.graphicElements.PetriNetObject;
3517+import pipe.gui.graphicElements.tapn.TimedPlaceComponent;
3518 import dk.aau.cs.gui.TabContent;
3519 import dk.aau.cs.model.tapn.TimedPlace;
3520
3521@@ -51,7 +51,7 @@
3522 s.append("The following queries are associated with the currently selected objects:\n\n");
3523 for (TAPNQuery q : queriesToDelete) {
3524 s.append(q.getName());
3525- s.append("\n");
3526+ s.append('\n');
3527 }
3528 s.append("\nAre you sure you want to remove the current selection and all associated queries?");
3529
3530
3531=== modified file 'src/pipe/gui/action/EditAnnotationBackgroundAction.java'
3532--- src/pipe/gui/action/EditAnnotationBackgroundAction.java 2011-08-30 10:07:54 +0000
3533+++ src/pipe/gui/action/EditAnnotationBackgroundAction.java 2011-10-14 12:17:24 +0000
3534@@ -4,7 +4,7 @@
3535
3536 import javax.swing.AbstractAction;
3537
3538-import pipe.dataLayer.AnnotationNote;
3539+import pipe.gui.graphicElements.AnnotationNote;
3540
3541 /**
3542 * Action to toggle the background of a note between white and transparent
3543
3544=== modified file 'src/pipe/gui/action/EditAnnotationBorderAction.java'
3545--- src/pipe/gui/action/EditAnnotationBorderAction.java 2011-08-30 10:07:54 +0000
3546+++ src/pipe/gui/action/EditAnnotationBorderAction.java 2011-10-14 12:17:24 +0000
3547@@ -8,8 +8,8 @@
3548
3549 import javax.swing.AbstractAction;
3550
3551-import pipe.dataLayer.AnnotationNote;
3552 import pipe.gui.CreateGui;
3553+import pipe.gui.graphicElements.AnnotationNote;
3554
3555 public class EditAnnotationBorderAction extends AbstractAction {
3556
3557
3558=== modified file 'src/pipe/gui/action/EditNoteAction.java'
3559--- src/pipe/gui/action/EditNoteAction.java 2011-08-30 10:07:54 +0000
3560+++ src/pipe/gui/action/EditNoteAction.java 2011-10-14 12:17:24 +0000
3561@@ -7,7 +7,7 @@
3562
3563 import javax.swing.AbstractAction;
3564
3565-import pipe.dataLayer.Note;
3566+import pipe.gui.graphicElements.Note;
3567
3568 public class EditNoteAction extends AbstractAction {
3569
3570
3571=== removed file 'src/pipe/gui/action/EditWeightAction.java'
3572--- src/pipe/gui/action/EditWeightAction.java 2011-10-04 18:07:57 +0000
3573+++ src/pipe/gui/action/EditWeightAction.java 1970-01-01 00:00:00 +0000
3574@@ -1,62 +0,0 @@
3575-package pipe.gui.action;
3576-
3577-import java.awt.Container;
3578-import java.awt.event.ActionEvent;
3579-
3580-import javax.swing.AbstractAction;
3581-import javax.swing.JOptionPane;
3582-
3583-import pipe.dataLayer.Arc;
3584-import pipe.gui.CreateGui;
3585-
3586-/**
3587- * This class allows the user to change the weight on an arc.
3588- *
3589- * @author unknown
3590- *
3591- * @author Dave Patterson May 4, 2007: Handle cancel choice without an
3592- * exception. Change error messages to ask for a positive integer.
3593- */
3594-public class EditWeightAction extends AbstractAction {
3595-
3596- private static final long serialVersionUID = 2003;
3597- private Container contentPane;
3598- private Arc myArc;
3599-
3600- public EditWeightAction(Container contentPane, Arc a) {
3601- this.contentPane = contentPane;
3602- myArc = a;
3603- }
3604-
3605- public void actionPerformed(ActionEvent e) {
3606- int currentWeighting = myArc.getWeight();
3607-
3608- String input = JOptionPane.showInputDialog("Weighting:", String
3609- .valueOf(currentWeighting));
3610-
3611- if (input == null) {
3612- return; // do nothing if the user clicks "Cancel"
3613- }
3614-
3615- try {
3616- int newWeighting = Integer.parseInt(input);
3617- if (newWeighting < 1) {
3618- JOptionPane.showMessageDialog(contentPane,
3619- "Weighting cannot be less than 1. Please re-enter");
3620- } else if (newWeighting != currentWeighting) {
3621- CreateGui.getView().getUndoManager().addNewEdit(
3622- myArc.setWeight(newWeighting));
3623- }
3624- } catch (NumberFormatException nfe) {
3625- JOptionPane.showMessageDialog(contentPane,
3626- "Enter a positive integer greater than 0.",
3627- "Invalid entry", JOptionPane.ERROR_MESSAGE);
3628- } catch (Exception exc) {
3629- exc.printStackTrace();
3630- JOptionPane.showMessageDialog(contentPane,
3631- "Enter a positive integer greater than 0.",
3632- "Invalid entry", JOptionPane.ERROR_MESSAGE);
3633- }
3634- }
3635-
3636-}
3637
3638=== modified file 'src/pipe/gui/action/InsertPointAction.java'
3639--- src/pipe/gui/action/InsertPointAction.java 2011-08-30 10:07:54 +0000
3640+++ src/pipe/gui/action/InsertPointAction.java 2011-10-14 12:17:24 +0000
3641@@ -7,8 +7,8 @@
3642 import java.awt.event.ActionEvent;
3643 import java.awt.geom.Point2D;
3644
3645-import pipe.dataLayer.Arc;
3646 import pipe.gui.CreateGui;
3647+import pipe.gui.graphicElements.Arc;
3648
3649 /**
3650 * This class is used to split an arc in two at the point the user clicks the
3651
3652=== modified file 'src/pipe/gui/action/ShowHideInfoAction.java'
3653--- src/pipe/gui/action/ShowHideInfoAction.java 2011-08-30 10:07:54 +0000
3654+++ src/pipe/gui/action/ShowHideInfoAction.java 2011-10-14 12:17:24 +0000
3655@@ -2,7 +2,7 @@
3656
3657 import java.awt.event.ActionEvent;
3658
3659-import pipe.dataLayer.PlaceTransitionObject;
3660+import pipe.gui.graphicElements.PlaceTransitionObject;
3661
3662
3663 public class ShowHideInfoAction extends javax.swing.AbstractAction {
3664
3665=== modified file 'src/pipe/gui/action/SplitArcAction.java'
3666--- src/pipe/gui/action/SplitArcAction.java 2011-08-30 10:07:54 +0000
3667+++ src/pipe/gui/action/SplitArcAction.java 2011-10-14 12:17:24 +0000
3668@@ -4,8 +4,8 @@
3669 import java.awt.event.ActionEvent;
3670 import java.awt.geom.Point2D;
3671
3672-import pipe.dataLayer.Arc;
3673 import pipe.gui.CreateGui;
3674+import pipe.gui.graphicElements.Arc;
3675
3676 /**
3677 * This class is used to split an arc in two at the point the user clicks the
3678
3679=== modified file 'src/pipe/gui/action/SplitArcPointAction.java'
3680--- src/pipe/gui/action/SplitArcPointAction.java 2011-02-03 19:03:15 +0000
3681+++ src/pipe/gui/action/SplitArcPointAction.java 2011-10-14 12:17:24 +0000
3682@@ -7,8 +7,8 @@
3683
3684 import java.awt.event.ActionEvent;
3685
3686-import pipe.dataLayer.ArcPathPoint;
3687 import pipe.gui.CreateGui;
3688+import pipe.gui.graphicElements.ArcPathPoint;
3689
3690 /**
3691 * @author Nadeem
3692
3693=== modified file 'src/pipe/gui/action/ToggleArcPointAction.java'
3694--- src/pipe/gui/action/ToggleArcPointAction.java 2011-02-03 19:03:15 +0000
3695+++ src/pipe/gui/action/ToggleArcPointAction.java 2011-10-14 12:17:24 +0000
3696@@ -7,8 +7,8 @@
3697
3698 import java.awt.event.ActionEvent;
3699
3700-import pipe.dataLayer.ArcPathPoint;
3701 import pipe.gui.CreateGui;
3702+import pipe.gui.graphicElements.ArcPathPoint;
3703
3704 public class ToggleArcPointAction extends javax.swing.AbstractAction {
3705
3706
3707=== added directory 'src/pipe/gui/graphicElements'
3708=== renamed file 'src/pipe/dataLayer/AnnotationNote.java' => 'src/pipe/gui/graphicElements/AnnotationNote.java'
3709--- src/pipe/dataLayer/AnnotationNote.java 2011-10-14 11:36:08 +0000
3710+++ src/pipe/gui/graphicElements/AnnotationNote.java 2011-10-14 12:17:24 +0000
3711@@ -1,8 +1,4 @@
3712-/*
3713- * Created on 04-Mar-2004
3714- * Author is Michael Camacho
3715- */
3716-package pipe.dataLayer;
3717+package pipe.gui.graphicElements;
3718
3719 import java.awt.BasicStroke;
3720 import java.awt.Dimension;
3721@@ -29,9 +25,6 @@
3722
3723 public class AnnotationNote extends Note {
3724
3725- /**
3726- *
3727- */
3728 private static final long serialVersionUID = 3503959956765396720L;
3729
3730 private boolean fillNote = true;
3731@@ -65,7 +58,6 @@
3732 dragPoints[3] = new ResizePoint(this, ResizePoint.RIGHT);
3733 dragPoints[4] = new ResizePoint(this, ResizePoint.BOTTOM
3734 | ResizePoint.RIGHT);
3735- ;
3736 dragPoints[5] = new ResizePoint(this, ResizePoint.BOTTOM);
3737 dragPoints[6] = new ResizePoint(this, ResizePoint.BOTTOM
3738 | ResizePoint.LEFT);
3739@@ -162,23 +154,6 @@
3740 }
3741 }
3742
3743- public AnnotationNote paste(double x, double y, boolean toAnotherView) {
3744- return new AnnotationNote(this.note.getText(), Grid.getModifiedX(x
3745- + this.getX()), Grid.getModifiedY(y + this.getY()), this.note
3746- .getWidth(), this.note.getHeight(), this.isShowingBorder());
3747- }
3748-
3749- public AnnotationNote copy() {
3750- AnnotationNote annotation = new AnnotationNote(this.note.getText(), Zoomer.getUnzoomedValue(this.getX(), zoom), Zoomer.getUnzoomedValue(this.getY(), zoom), this.note.getWidth(), this.note.getHeight(), this.isShowingBorder());
3751- AnnotationNoteHandler noteHandler = new AnnotationNoteHandler((DrawingSurfaceImpl)getParent(), annotation);
3752- annotation.addMouseListener(noteHandler);
3753- annotation.addMouseMotionListener(noteHandler);
3754- annotation.getNote().addMouseListener(noteHandler);
3755- annotation.getNote().addMouseMotionListener(noteHandler);
3756-
3757- return annotation;
3758- }
3759-
3760 @Override
3761 public void paintComponent(Graphics g) {
3762 super.paintComponent(g);
3763@@ -274,9 +249,6 @@
3764
3765 public class ResizePoint extends javax.swing.JComponent {
3766
3767- /**
3768- *
3769- */
3770 private static final long serialVersionUID = -1615544376708838434L;
3771 private int SIZE = 3;
3772 private static final int TOP = 1;
3773@@ -341,7 +313,7 @@
3774 }
3775 }
3776
3777- // change ResizePoint's size a little bit acording to the zoom percent
3778+ // Change ResizePoint's size a little bit acording to the zoom percent
3779 private void setZoom(int percent) {
3780 if (zoom >= 220) {
3781 SIZE = 5;
3782@@ -352,5 +324,16 @@
3783 }
3784 }
3785 }
3786+
3787+ public AnnotationNote copy() {
3788+ AnnotationNote annotation = new AnnotationNote(note.getText(), Zoomer.getUnzoomedValue(this.getX(), zoom), Zoomer.getUnzoomedValue(this.getY(), zoom), note.getWidth(), note.getHeight(), this.isShowingBorder());
3789+ AnnotationNoteHandler noteHandler = new AnnotationNoteHandler((DrawingSurfaceImpl)getParent(), annotation);
3790+ annotation.addMouseListener(noteHandler);
3791+ annotation.addMouseMotionListener(noteHandler);
3792+ annotation.getNote().addMouseListener(noteHandler);
3793+ annotation.getNote().addMouseMotionListener(noteHandler);
3794+
3795+ return annotation;
3796+ }
3797
3798 }
3799
3800=== renamed file 'src/pipe/dataLayer/Arc.java' => 'src/pipe/gui/graphicElements/Arc.java'
3801--- src/pipe/dataLayer/Arc.java 2011-09-18 15:10:09 +0000
3802+++ src/pipe/gui/graphicElements/Arc.java 2011-10-14 12:17:24 +0000
3803@@ -1,4 +1,4 @@
3804-package pipe.dataLayer;
3805+package pipe.gui.graphicElements;
3806
3807 import java.awt.Rectangle;
3808 import java.awt.geom.Point2D;
3809@@ -9,82 +9,37 @@
3810 import pipe.gui.DrawingSurfaceImpl;
3811 import pipe.gui.Pipe;
3812 import pipe.gui.undo.AddArcPathPointEdit;
3813-import pipe.gui.undo.ArcWeightEdit;
3814 import dk.aau.cs.gui.undo.Command;
3815
3816 /**
3817- * <b>Arc</b> - Petri-Net Arc Class
3818- *
3819- * @see <p>
3820- * <a href="..\PNMLSchema\index.html">PNML - Petri-Net XMLSchema
3821- * (stNet.xsd)</a>
3822- * @see </p>
3823- * <p>
3824- * <a href="..\..\..\UML\dataLayer.html">UML - PNML Package </a>
3825- * </p>
3826- * @version 1.0
3827- * @author James D Bloom
3828- *
3829- * @author Pere Bonet modifed the delete method so that the weight label of an
3830- * arc is deleted when the associated arc is deleted
3831- *
3832- * @author Edwin Chung 16 Mar 2007: modified the constructor and several other
3833- * functions so that DataLayer objects can be created outside the GUI
3834- *
3835- * @author Nick Dingle 18 Oct 2007: added the ability for an arc to be "tagged"
3836- * (permit the passage of tagged tokens).
3837+ Implementation of Element for drawing an arc
3838 */
3839 public abstract class Arc extends PetriNetObject implements Cloneable {
3840
3841- /**
3842- *
3843- */
3844 private static final long serialVersionUID = 6527845538091358791L;
3845- // public final static String TYPE = "arc";
3846- /** Current Marking */
3847- protected int weight = 1;
3848- protected NameLabel weightLabel;
3849+
3850+ protected NameLabel label;
3851
3852 private static Point2D.Double point;
3853
3854- /** references to the objects this arc connects */
3855+ /** References to the objects this arc connects */
3856 private PlaceTransitionObject source = null;
3857 private PlaceTransitionObject target = null;
3858- // private boolean deleted = false; // Used for cleanup purposes
3859
3860 protected ArcPath myPath = new ArcPath(this);
3861
3862- // true if arc is not hidden when a bidirectional arc is used
3863- protected boolean inView = true;
3864-
3865- // bounds of arc need to be grown in order to avoid clipping problems
3866+ // Bounds of arc need to be grown in order to avoid clipping problems
3867 protected int zoomGrow = 10;
3868
3869 /**
3870 * Create Petri-Net Arc object
3871 *
3872- * @param startPositionXInput
3873- * Start X-axis Position
3874- * @param startPositionYInput
3875- * Start Y-axis Position
3876- * @param endPositionXInput
3877- * End X-axis Position
3878- * @param endPositionYInput
3879- * End Y-axis Position
3880- * @param sourceInput
3881- * Arc source
3882- * @param targetInput
3883- * Arc target
3884- * @param idInput
3885- * Arc id
3886- * @param inputTagged
3887- * TODO
3888 */
3889 public Arc(double startPositionXInput, double startPositionYInput,
3890 double endPositionXInput, double endPositionYInput,
3891 PlaceTransitionObject sourceInput,
3892 PlaceTransitionObject targetInput, int weightInput, String idInput) {
3893- weightLabel = new NameLabel(zoom);
3894+ label = new NameLabel(zoom);
3895 myPath.addPoint((float) startPositionXInput,
3896 (float) startPositionYInput, ArcPathPoint.STRAIGHT);
3897 myPath.addPoint((float) endPositionXInput, (float) endPositionYInput,
3898@@ -94,14 +49,13 @@
3899 id = idInput;
3900 setSource(sourceInput);
3901 setTarget(targetInput);
3902- setWeight(weightInput);
3903 }
3904
3905 /**
3906 * Create Petri-Net Arc object
3907 */
3908 public Arc(PlaceTransitionObject newSource) {
3909- weightLabel = new NameLabel(zoom);
3910+ label = new NameLabel(zoom);
3911 source = newSource;
3912 myPath.addPoint();
3913 myPath.addPoint();
3914@@ -130,45 +84,33 @@
3915 */
3916 public void setTarget(PlaceTransitionObject targetInput) {
3917 target = targetInput;
3918- // if (CreateGui.getApp() != null) {
3919- // updateArcPosition();
3920- // }
3921+ }
3922+
3923+ public void setLabelPosition() {
3924+ label.setPosition((int) (myPath.midPoint.x)
3925+ + label.getWidth() / 2 - 4, (int) (myPath.midPoint.y));
3926 }
3927
3928 /**
3929- * Set weight
3930+ * Get id
3931 *
3932- * @param weightInput
3933- * String value for Arc weight;
3934+ * @return String value for Arc id;
3935 */
3936- public Command setWeight(int weightInput) {
3937- int oldWeight = weight;
3938-
3939- weight = weightInput;
3940- if (weight == 1) {
3941- weightLabel.setText("");
3942+ @Override
3943+ public String getId() {
3944+ if (id != null) {
3945+ return id;
3946 } else {
3947- weightLabel.setText(Integer.toString(weight));
3948+ if (source != null && target != null) {
3949+ return source.getId() + " to " + target.getId();
3950+ }
3951 }
3952- weightLabel.updateSize();
3953- setWeightLabelPosition();
3954- repaint();
3955- return new ArcWeightEdit(this, oldWeight, weight);
3956- }
3957-
3958- public void setWeightLabelPosition() {
3959- weightLabel.setPosition(
3960- (int) (myPath.midPoint.x) + weightLabel.getWidth() / 2 - 4,
3961- (int) (myPath.midPoint.y));
3962+ return "";
3963 }
3964
3965 @Override
3966 public String getName() {
3967- if (source != null && target != null) {
3968- return source.getId() + " to " + target.getId();
3969- } else {
3970- return "";
3971- }
3972+ return getId();
3973 }
3974
3975 /**
3976@@ -208,15 +150,6 @@
3977 }
3978
3979 /**
3980- * Get weight
3981- *
3982- * @return Integer value for Arc weight;
3983- */
3984- public int getWeight() {
3985- return weight;
3986- }
3987-
3988- /**
3989 * Updates the start position of the arc, resets the arrowhead and updates
3990 * the bounds
3991 */
3992@@ -250,8 +183,8 @@
3993 repaint();
3994 }
3995
3996- public void updateWeightLabel(boolean displayConstantNames) {
3997-
3998+ public void updateLabel(boolean displayConstantNames) {
3999+ //No label to update for this type
4000 }
4001
4002 /** Updates the bounding box of the arc component based on the arcs bounds */
4003@@ -294,8 +227,8 @@
4004 myPath.addPointsToGui((JLayeredPane) getParent());
4005 }
4006 updateArcPosition();
4007- if (getParent() != null && weightLabel.getParent() == null) {
4008- getParent().add(weightLabel);
4009+ if (getParent() != null && label.getParent() == null) {
4010+ getParent().add(label);
4011 }
4012 }
4013
4014@@ -303,12 +236,10 @@
4015 public void delete() {
4016 if (!deleted) {
4017 if (getParent() != null) {
4018- getParent().remove(weightLabel);
4019+ getParent().remove(label);
4020 }
4021- if (source != null)
4022- source.removeFromArc(this);
4023- if (target != null)
4024- target.removeToArc(this);
4025+ if(source != null) source.removeFromArc(this);
4026+ if(target != null) target.removeToArc(this);
4027 myPath.forceHidePoints();
4028 super.delete();
4029 deleted = true;
4030@@ -324,14 +255,6 @@
4031 return new AddArcPathPointEdit(this, newPoint);
4032 }
4033
4034- /*
4035- * CB Joakim Byg - probably not needed public abstract String getType(); EOC
4036- */
4037-
4038- public boolean inView() {
4039- return inView;
4040- }
4041-
4042 public Transition getTransition() {
4043 if (getTarget() instanceof Transition) {
4044 return (Transition) getTarget();
4045@@ -342,7 +265,7 @@
4046
4047 public void removeFromView() {
4048 if (getParent() != null) {
4049- getParent().remove(weightLabel);
4050+ getParent().remove(label);
4051 }
4052 myPath.forceHidePoints();
4053 removeFromContainer();
4054@@ -376,8 +299,8 @@
4055 public void zoomUpdate(int percent) {
4056 zoom = percent;
4057 this.updateArcPosition();
4058- weightLabel.zoomUpdate(percent);
4059- weightLabel.updateSize();
4060+ label.zoomUpdate(percent);
4061+ label.updateSize();
4062 }
4063
4064 public void setZoom(int percent) {
4065
4066=== renamed file 'src/pipe/dataLayer/ArcPath.java' => 'src/pipe/gui/graphicElements/ArcPath.java'
4067--- src/pipe/dataLayer/ArcPath.java 2011-06-24 14:48:28 +0000
4068+++ src/pipe/gui/graphicElements/ArcPath.java 2011-10-14 12:17:24 +0000
4069@@ -1,7 +1,4 @@
4070-/**
4071- * Created on 12-Feb-2004
4072- */
4073-package pipe.dataLayer;
4074+package pipe.gui.graphicElements;
4075
4076 import java.awt.BasicStroke;
4077 import java.awt.Rectangle;
4078@@ -40,10 +37,7 @@
4079 protected ArcPathPoint currentPoint;
4080 private boolean pointLock = false;
4081 private static Stroke proximityStroke = new BasicStroke(
4082- Pipe.ARC_PATH_PROXIMITY_WIDTH/*
4083- * , BasicStroke.CAP_BUTT,
4084- * BasicStroke.JOIN_MITER
4085- */);
4086+ Pipe.ARC_PATH_PROXIMITY_WIDTH);
4087 private static Stroke stroke = new BasicStroke(
4088 Pipe.ARC_PATH_SELECTION_WIDTH);
4089 private Shape shape, proximityShape;
4090@@ -133,7 +127,7 @@
4091 }
4092
4093 shape = stroke.createStrokedShape(this);
4094- getArc().setWeightLabelPosition();
4095+ getArc().setLabelPosition();
4096 proximityShape = proximityStroke.createStrokedShape(this);
4097 }
4098
4099@@ -189,18 +183,18 @@
4100 int curveEndIndex = 0;
4101 myCurrentPoint = pathPoints.get(c);
4102
4103- if (myCurrentPoint.getPointType() == true) {
4104+ if (myCurrentPoint.getPointType()) {
4105 curveStartIndex = c - 1;
4106
4107- for (; c <= endIndex && myCurrentPoint.getPointType() == true; c++) {
4108+ for (; c <= endIndex && myCurrentPoint.getPointType(); c++) {
4109 myCurrentPoint = pathPoints.get(c);
4110 curveEndIndex = c;
4111 }
4112 /* calculate a cubic for each section of the curve */
4113 int lengthOfCurve = curveEndIndex - curveStartIndex;
4114 int k1;
4115- int x[] = new int[lengthOfCurve + 2];
4116- int y[] = new int[lengthOfCurve + 2];
4117+ int[] x = new int[lengthOfCurve + 2];
4118+ int[] y = new int[lengthOfCurve + 2];
4119 X = new Cubic[lengthOfCurve + 2];
4120 Y = new Cubic[lengthOfCurve + 2];
4121
4122@@ -244,7 +238,7 @@
4123 myPreviousPoint = pathPoints.get(c - 1);
4124 myCurrentPoint = pathPoints.get(c);
4125
4126- if (myCurrentPoint.getPointType() == false) {
4127+ if (!(myCurrentPoint.getPointType())) {
4128 myCurrentPoint.setControl1(getControlPoint(myPreviousPoint
4129 .getPoint(), myCurrentPoint.getPoint(), myPreviousPoint
4130 .getPoint(), myCurrentPoint.getPoint()));
4131@@ -252,7 +246,7 @@
4132 .getPoint(), myPreviousPoint.getPoint(), myCurrentPoint
4133 .getPoint(), myPreviousPoint.getPoint()));
4134 } else {
4135- if (c > 1 && myPreviousPoint.getPointType() == false) {
4136+ if (c > 1 && !(myPreviousPoint.getPointType())) {
4137 myPreviousButOnePoint = pathPoints.get(c - 2);
4138 myCurrentPoint.setControl1(getControlPoint(
4139 myPreviousButOnePoint.getPoint(), myPreviousPoint
4140@@ -261,7 +255,7 @@
4141 }
4142 if (c < getEndIndex()) {
4143 myNextPoint = pathPoints.get(c + 1);
4144- if (myNextPoint.getPointType() == false) {
4145+ if (!(myNextPoint.getPointType())) {
4146 myCurrentPoint.setControl2(getControlPoint(myNextPoint
4147 .getPoint(), myCurrentPoint.getPoint(),
4148 myCurrentPoint.getPoint(), myPreviousPoint
4149@@ -280,7 +274,7 @@
4150 if (!(getEndIndex() > 0)) {
4151 return;
4152 } else if (source != null && source instanceof Transition
4153- && (pathPoints.get(1)).getPointType() == true) {
4154+ && (pathPoints.get(1)).getPointType()) {
4155 ArcPathPoint myPoint = pathPoints.get(1);
4156 ArcPathPoint myLastPoint = pathPoints.get(0);
4157 float distance = (float) getMod(myPoint.getPoint(), myLastPoint
4158@@ -296,7 +290,7 @@
4159 myPoint.setControl2(getControlPoint(myPoint.getPoint(), myPoint
4160 .getControl1(), myPoint.getPoint(), myPoint.getControl1()));
4161 } else if (target != null && source instanceof Place
4162- && (pathPoints.get(getEndIndex())).getPointType() == true) {
4163+ && (pathPoints.get(getEndIndex())).getPointType()) {
4164 ArcPathPoint myPoint = pathPoints.get(getEndIndex());
4165 ArcPathPoint myLastPoint = pathPoints.get(getEndIndex() - 1);
4166 float distance = (float) getMod(myPoint.getPoint(), myLastPoint
4167
4168=== renamed file 'src/pipe/dataLayer/ArcPathPoint.java' => 'src/pipe/gui/graphicElements/ArcPathPoint.java'
4169--- src/pipe/dataLayer/ArcPathPoint.java 2011-02-03 19:03:15 +0000
4170+++ src/pipe/gui/graphicElements/ArcPathPoint.java 2011-10-14 12:17:24 +0000
4171@@ -4,7 +4,7 @@
4172 * @author Edwin Chung 16 Mar 2007: modified the constructor and several other
4173 * functions so that DataLayer objects can be created outside the GUI
4174 */
4175-package pipe.dataLayer;
4176+package pipe.gui.graphicElements;
4177
4178 import java.awt.Graphics;
4179 import java.awt.Graphics2D;
4180@@ -23,9 +23,6 @@
4181
4182 public class ArcPathPoint extends PetriNetObject {
4183
4184- /**
4185- *
4186- */
4187 private static final long serialVersionUID = 7584441718171173604L;
4188 public static final boolean STRAIGHT = false;
4189 public static final boolean CURVED = true;
4190@@ -74,7 +71,6 @@
4191 return point;
4192 }
4193
4194- //
4195 public void setPointLocation(float x, float y) {
4196 double realX = Zoomer.getUnzoomedValue(x, zoom);
4197 double realY = Zoomer.getUnzoomedValue(y, zoom);
4198@@ -195,8 +191,7 @@
4199 }
4200
4201 @Override
4202- public void delete() {// Won't delete if only two points left. General
4203- // delete.
4204+ public void delete() {// Won't delete if only two points left. General delete.
4205 if (isDeleteable()) {
4206 if (getArcPath().getArc().isSelected()) {
4207 return;
4208@@ -246,7 +241,6 @@
4209
4210 @Override
4211 public void addedToGui() {
4212- ;
4213 }
4214
4215 void hidePoint() {
4216@@ -274,7 +268,6 @@
4217
4218 @Override
4219 public void undelete(DrawingSurfaceImpl view) {
4220- ;
4221 }
4222
4223 @Override
4224@@ -285,8 +278,7 @@
4225
4226 public void zoomUpdate(int zoom) {
4227 this.zoom = zoom;
4228- // change ArcPathPoint's size a little bit when it's zoomed in or zoomed
4229- // out
4230+ // change ArcPathPoint's size a little bit when it's zoomed in or zoomed out
4231 if (zoom > 213) {
4232 SIZE = 5;
4233 } else if (zoom > 126) {
4234
4235=== renamed file 'src/pipe/dataLayer/NameLabel.java' => 'src/pipe/gui/graphicElements/NameLabel.java'
4236--- src/pipe/dataLayer/NameLabel.java 2011-08-30 08:56:51 +0000
4237+++ src/pipe/gui/graphicElements/NameLabel.java 2011-10-14 12:17:24 +0000
4238@@ -1,4 +1,4 @@
4239-package pipe.dataLayer;
4240+package pipe.gui.graphicElements;
4241
4242 import java.awt.Font;
4243
4244@@ -11,21 +11,14 @@
4245 import pipe.gui.Zoomer;
4246
4247 /**
4248- * <b>NameLabel</b> - This class is for the labels of PN Objects
4249+ * This class is for the labels of PN Objects
4250 *
4251- * @see </p>
4252- * <p>
4253- * <a href="uml\NameLabel.png">NameLabel UML</a>
4254- * </p>
4255 * @version 1.0
4256 * @author Camilla Clifford
4257 */
4258 public class NameLabel extends JTextArea implements Cloneable, Translatable,
4259 Zoomable {
4260
4261- /**
4262- *
4263- */
4264 private static final long serialVersionUID = 5167510420195429773L;
4265 private int positionX;
4266 private int positionY;
4267@@ -51,7 +44,7 @@
4268 setCursor(new java.awt.Cursor(java.awt.Cursor.CROSSHAIR_CURSOR));
4269 setEditable(false);
4270 setFocusable(false);
4271- setOpaque(false); // added by OP
4272+ setOpaque(false);
4273 setBorder(BorderFactory.createEmptyBorder());
4274 setBackground(Pipe.BACKGROUND_COLOR);
4275
4276
4277=== renamed file 'src/pipe/dataLayer/Note.java' => 'src/pipe/gui/graphicElements/Note.java'
4278--- src/pipe/dataLayer/Note.java 2011-02-12 12:15:54 +0000
4279+++ src/pipe/gui/graphicElements/Note.java 2011-10-14 12:17:24 +0000
4280@@ -1,7 +1,7 @@
4281 /*
4282 * Note.java
4283 */
4284-package pipe.dataLayer;
4285+package pipe.gui.graphicElements;
4286
4287 import java.awt.Component;
4288 import java.awt.Dimension;
4289@@ -26,9 +26,6 @@
4290 */
4291 public abstract class Note extends PetriNetObject implements Translatable {
4292
4293- /**
4294- *
4295- */
4296 private static final long serialVersionUID = 8965208519103066242L;
4297 protected JTextArea note = new JTextArea();
4298 protected boolean drawBorder = true;
4299
4300=== renamed file 'src/pipe/dataLayer/PetriNetObject.java' => 'src/pipe/gui/graphicElements/PetriNetObject.java'
4301--- src/pipe/dataLayer/PetriNetObject.java 2011-09-18 15:10:09 +0000
4302+++ src/pipe/gui/graphicElements/PetriNetObject.java 2011-10-14 12:17:24 +0000
4303@@ -1,4 +1,4 @@
4304-package pipe.dataLayer;
4305+package pipe.gui.graphicElements;
4306
4307 import java.awt.Color;
4308 import java.awt.Container;
4309@@ -10,44 +10,30 @@
4310
4311 import javax.swing.JComponent;
4312
4313-import pipe.gui.CopyPasteable;
4314+import pipe.dataLayer.DataLayer;
4315 import pipe.gui.DrawingSurfaceImpl;
4316 import pipe.gui.Pipe;
4317 import pipe.gui.Translatable;
4318 import pipe.gui.Zoomable;
4319
4320 /**
4321- * <b>PetriNetObject</b> - Petri-Net Object Class<b> - <i>Abstract</i></b>
4322- *
4323- * @see <p>
4324- * <a href="..\PNMLSchema\index.html">PNML - Petri-Net XMLSchema
4325- * (stNet.xsd)</a>
4326- * @see </p>
4327- * <p>
4328- * <a href="..\..\..\UML\dataLayer.html">UML - PNML Package </a>
4329- * </p>
4330- * @version 1.0
4331- * @author James D Bloom
4332+ * Petri-Net Object Class
4333+ * Implements things in common between all types of objects
4334 */
4335 public abstract class PetriNetObject extends JComponent implements Zoomable,
4336- CopyPasteable, Cloneable, Translatable {
4337+ Cloneable, Translatable {
4338
4339- /**
4340- *
4341- */
4342 private static final long serialVersionUID = 2693171860021066729L;
4343
4344- protected final static int COMPONENT_DRAW_OFFSET = 5;
4345+ protected static final int COMPONENT_DRAW_OFFSET = 5;
4346
4347- /** Id */
4348 protected String id = null;
4349
4350- /** Name Label for displaying name */
4351+ /* Name Label for displaying name */
4352 protected NameLabel pnName;
4353 protected Color objectColour = Pipe.ELEMENT_LINE_COLOUR;
4354 protected Color selectionBorderColour = Pipe.SELECTION_LINE_COLOUR;
4355- protected boolean selected = false; // True if part of the current
4356- // selection.
4357+ protected boolean selected = false; // True if part of the current selection.
4358 protected boolean selectable = true; // True if object can be selected.
4359 protected boolean draggable = true; // True if object can be dragged.
4360 protected boolean copyPasteable = true; // True if object can be cloned.
4361@@ -61,9 +47,6 @@
4362 protected int zoom = 100;
4363 private DataLayer guiModel;
4364
4365- /**
4366- * Create PetriNetObject
4367- */
4368 public PetriNetObject() {
4369 }
4370
4371@@ -75,12 +58,6 @@
4372 return guiModel;
4373 }
4374
4375- /**
4376- * Set id
4377- *
4378- * @param idInput
4379- * String value for id;
4380- */
4381 public void setId(String idInput) {
4382 id = idInput;
4383 setName(idInput);
4384@@ -200,10 +177,6 @@
4385 super.paintComponent(g);
4386 }
4387
4388- public boolean isCopyPasteable() {
4389- return copyPasteable;
4390- }
4391-
4392 public abstract int getLayerOffset();
4393
4394 public int getZoom() {
4395@@ -228,12 +201,6 @@
4396 pnObjectCopy.removeMouseMotionListener((MouseMotionListener) mouseListeners[i]);
4397 }
4398
4399-// mouseListeners = pnObjectCopy.getListeners(MouseWheelListener.class);
4400-//
4401-// for (int i = 0; i < mouseListeners.length; i++) {
4402-// pnObjectCopy.removeMouseWheelListener((MouseWheelListener) mouseListeners[i]);
4403-// }
4404-
4405 return pnObjectCopy;
4406 } catch (CloneNotSupportedException e) {
4407 throw new Error(e);
4408
4409=== renamed file 'src/pipe/dataLayer/Place.java' => 'src/pipe/gui/graphicElements/Place.java'
4410--- src/pipe/dataLayer/Place.java 2011-08-30 09:36:10 +0000
4411+++ src/pipe/gui/graphicElements/Place.java 2011-10-14 12:17:24 +0000
4412@@ -1,4 +1,4 @@
4413-package pipe.dataLayer;
4414+package pipe.gui.graphicElements;
4415
4416 import java.awt.BasicStroke;
4417 import java.awt.Graphics;
4418@@ -13,54 +13,28 @@
4419 import pipe.gui.Zoomer;
4420
4421 /**
4422- * <b>Place</b> - Petri-Net Place Class
4423- *
4424- * @see <p>
4425- * <a href="..\PNMLSchema\index.html">PNML - Petri-Net XMLSchema
4426- * (stNet.xsd)</a>
4427- * @see </p>
4428- * <p>
4429- * <a href="..\..\..\UML\dataLayer.html">UML - PNML Package </a>
4430- * </p>
4431- * @version 1.0
4432- * @author James D Bloom
4433- *
4434- * @author Edwin Chung corresponding states of matrixes has been set to change
4435- * when markings are altered. Users will be prompted to save their work
4436- * when the markings of places are altered. (6th Feb 2007)
4437- *
4438- * @author Edwin Chung 16 Mar 2007: modified the constructor and several other
4439- * functions so that DataLayer objects can be created outside the GUI
4440+ * Class for drawing a Place
4441 */
4442 public class Place extends PlaceTransitionObject {
4443
4444- /**
4445- *
4446- */
4447 private static final long serialVersionUID = -5155964364065651381L;
4448- public final static String type = "Place";
4449- /** Initial Marking */
4450- protected Integer initialMarking = 0;
4451-
4452- /** Current Marking */
4453- protected Integer currentMarking = 0;
4454-
4455- /** Initial Marking X-axis Offset */
4456+
4457+ // Initial Marking X-axis Offset
4458 protected Double markingOffsetX = 0d;
4459
4460- /** Initial Marking Y-axis Offset */
4461+ // Initial Marking Y-axis Offset
4462 protected Double markingOffsetY = 0d;
4463
4464- /** Value of the capacity restriction; 0 means no capacity restriction */
4465+ // Value of the capacity restriction; 0 means no capacity restriction
4466 protected Integer capacity = 0;
4467
4468 public static final int DIAMETER = Pipe.PLACE_TRANSITION_HEIGHT;
4469
4470- /** Token Width and Height */
4471+ // Token Width and Height
4472 public static int tWidth = 4;
4473 public static int tHeight = 4;
4474
4475- /** Ellipse2D.Double place */
4476+ // Ellipse2D.Double place
4477 protected static Ellipse2D.Double placeEllipse = new Ellipse2D.Double(0, 0, DIAMETER, DIAMETER);
4478 protected static Shape proximityPlace = (new BasicStroke(Pipe.PLACE_TRANSITION_PROXIMITY_RADIUS)).createStrokedShape(placeEllipse);
4479
4480@@ -70,8 +44,6 @@
4481 double markingOffsetYInput, int capacityInput) {
4482 super(positionXInput, positionYInput, idInput, nameInput,
4483 nameOffsetXInput, nameOffsetYInput);
4484- initialMarking = new Integer(initialMarkingInput);
4485- currentMarking = new Integer(initialMarkingInput);
4486 markingOffsetX = new Double(markingOffsetXInput);
4487 markingOffsetY = new Double(markingOffsetYInput);
4488 componentWidth = DIAMETER;
4489@@ -92,16 +64,14 @@
4490 this.incrementCopyNumber();
4491 Place copy = new Place(Grid.getModifiedX(x + this.getX()+ Pipe.PLACE_TRANSITION_HEIGHT / 2),
4492 Grid.getModifiedY(y + this.getY() + Pipe.PLACE_TRANSITION_HEIGHT / 2));
4493- copy.pnName.setName(this.pnName.getName() + "(" + this.getCopyNumber() + ")");
4494+ copy.pnName.setName(pnName.getName() + "(" + this.getCopyNumber() + ")");
4495 this.newCopy(copy);
4496- copy.nameOffsetX = this.nameOffsetX;
4497- copy.nameOffsetY = this.nameOffsetY;
4498- copy.capacity = this.capacity;
4499- copy.attributesVisible = this.attributesVisible;
4500- copy.initialMarking = this.initialMarking;
4501- copy.currentMarking = this.currentMarking;
4502- copy.markingOffsetX = this.markingOffsetX;
4503- copy.markingOffsetY = this.markingOffsetY;
4504+ copy.nameOffsetX = nameOffsetX;
4505+ copy.nameOffsetY = nameOffsetY;
4506+ copy.capacity = capacity;
4507+ copy.attributesVisible = attributesVisible;
4508+ copy.markingOffsetX = markingOffsetX;
4509+ copy.markingOffsetY = markingOffsetY;
4510 copy.update(true);
4511 return copy;
4512 }
4513@@ -109,14 +79,12 @@
4514 public Place copy() {
4515 Place copy = new Place(Zoomer.getUnzoomedValue(this.getX(), zoom), Zoomer.getUnzoomedValue(this.getY(), zoom));
4516 copy.pnName.setName(this.getName());
4517- copy.nameOffsetX = this.nameOffsetX;
4518- copy.nameOffsetY = this.nameOffsetY;
4519- copy.capacity = this.capacity;
4520- copy.attributesVisible = this.attributesVisible;
4521- copy.initialMarking = this.initialMarking;
4522- copy.currentMarking = this.currentMarking;
4523- copy.markingOffsetX = this.markingOffsetX;
4524- copy.markingOffsetY = this.markingOffsetY;
4525+ copy.nameOffsetX = nameOffsetX;
4526+ copy.nameOffsetY = nameOffsetY;
4527+ copy.capacity = capacity;
4528+ copy.attributesVisible = attributesVisible;
4529+ copy.markingOffsetX = markingOffsetX;
4530+ copy.markingOffsetY = markingOffsetY;
4531 copy.setOriginal(this);
4532 return copy;
4533 }
4534@@ -148,25 +116,6 @@
4535 }
4536
4537 /**
4538- * Set initial marking
4539- *
4540- * @param initialMarkingInput
4541- * Integer value for initial marking
4542- */
4543- public void setInitialMarking(int initialMarkingInput) {
4544- initialMarking = initialMarkingInput;
4545- }
4546-
4547- /**
4548- * Get current marking
4549- *
4550- * @return Integer value for current marking
4551- */
4552- public int getCurrentMarking() {
4553- return ((currentMarking == null) ? 0 : currentMarking.intValue());
4554- }
4555-
4556- /**
4557 * Get X-axis offset for initial marking
4558 *
4559 * @return Double value for X-axis offset of initial marking
4560@@ -263,7 +212,7 @@
4561
4562 @Override
4563 public void update(boolean displayConstantNames) {
4564- if (attributesVisible == true) {
4565+ if (attributesVisible) {
4566 pnName.setText("\nk=" + (capacity > 0 ? capacity : "\u221E"));
4567 } else {
4568 pnName.setText("");
4569@@ -278,10 +227,8 @@
4570
4571 Place toReturn = (Place) super.clone();
4572
4573- toReturn.initialMarking = this.initialMarking;
4574- toReturn.currentMarking = this.currentMarking;
4575- toReturn.markingOffsetX = this.markingOffsetX;
4576- toReturn.markingOffsetY = this.markingOffsetY;
4577+ toReturn.markingOffsetX = markingOffsetX;
4578+ toReturn.markingOffsetY = markingOffsetY;
4579 toReturn.componentWidth = componentWidth;
4580 toReturn.componentHeight = componentHeight;
4581 toReturn.setCentre((int) positionX, (int) positionY);
4582
4583=== renamed file 'src/pipe/dataLayer/PlaceTransitionObject.java' => 'src/pipe/gui/graphicElements/PlaceTransitionObject.java'
4584--- src/pipe/dataLayer/PlaceTransitionObject.java 2011-09-18 15:10:09 +0000
4585+++ src/pipe/gui/graphicElements/PlaceTransitionObject.java 2011-10-14 12:17:24 +0000
4586@@ -1,4 +1,4 @@
4587-package pipe.dataLayer;
4588+package pipe.gui.graphicElements;
4589
4590 import java.awt.Graphics;
4591 import java.awt.Graphics2D;
4592@@ -11,28 +11,12 @@
4593 import pipe.gui.Zoomer;
4594
4595 /**
4596- * <b>PlaceTransitionObject</b> - Petri-Net PLace or Transition SuperClass<b> -
4597- * <i>Abstract</i></b>
4598- *
4599- * @see <p>
4600- * <a href="..\PNMLSchema\index.html">PNML - Petri-Net XMLSchema
4601- * (stNet.xsd)</a>
4602- * @see </p>
4603- * <p>
4604- * <a href="..\..\..\UML\dataLayer.html">UML - PNML Package </a>
4605- * </p>
4606- * @version 1.0
4607- * @author James D Bloom
4608- *
4609- * @author Edwin Chung 16 Mar 2007: modified the constructor and several other
4610- * functions so that DataLayer objects can be created outside the GUI
4611+ * Petri-Net Place or Transition SuperClass
4612+ *
4613 */
4614 public abstract class PlaceTransitionObject extends PetriNetObject implements
4615 Cloneable {
4616
4617- /**
4618- *
4619- */
4620 private static final long serialVersionUID = -6629006415467929184L;
4621 /** X-axis Position on screen */
4622 protected double positionX;
4623@@ -187,6 +171,18 @@
4624 }
4625
4626 /**
4627+ * Set id
4628+ *
4629+ * @param idInput
4630+ * String value for Place id;
4631+ */
4632+ @Override
4633+ public void setId(String idInput) {
4634+ id = idInput;
4635+ setName(id);
4636+ }
4637+
4638+ /**
4639 * Get id
4640 *
4641 * @return String value for Place id;
4642@@ -220,7 +216,7 @@
4643 * @return Double value for X-axis offset of ...
4644 */
4645 public Double getNameOffsetXObject() {
4646- return this.nameOffsetX;
4647+ return nameOffsetX;
4648 }
4649
4650 /**
4651@@ -229,7 +225,7 @@
4652 * @return Double value for Y-axis offset of ...
4653 */
4654 public Double getNameOffsetYObject() {
4655- return this.nameOffsetY;
4656+ return nameOffsetY;
4657 }
4658
4659 /**
4660@@ -308,32 +304,20 @@
4661
4662 /** Adds outwards arc to place/transition */
4663 public void addConnectTo(Arc newArc) {
4664- // System.out.println("DEBUG: added arc (to)!:" + newArc + " de " +
4665- // this);
4666 connectTo.add(newArc);
4667 }
4668
4669 /** Adds inwards arc to place/transition */
4670 public void addConnectFrom(Arc newArc) {
4671- // System.out.println("DEBUG: added arc (from)!:" + newArc + " de " +
4672- // this);
4673 connectFrom.add(newArc);
4674 }
4675
4676 public void removeFromArc(Arc oldArc) {
4677- if (connectFrom.remove(oldArc)) {
4678- // System.out.println("DEBUG: removeFromArc_ok");
4679- } else {
4680- // System.out.println("DEBUG: removeFromArc_ko");
4681- }
4682+ connectFrom.remove(oldArc);
4683 }
4684
4685 public void removeToArc(Arc oldArc) {
4686- if (connectTo.remove(oldArc)) {
4687- // System.out.println("DEBUG: removeToArc_ok");
4688- } else {
4689- // System.out.println("DEBUG: removeToArc_ko");
4690- }
4691+ connectTo.remove(oldArc);
4692 }
4693
4694 /** Updates location of any attached arcs */
4695@@ -517,8 +501,8 @@
4696 PlaceTransitionObject toReturn = (PlaceTransitionObject) super.clone();
4697 toReturn.pnName = (NameLabel) pnName.clone();
4698
4699- toReturn.connectFrom = this.connectFrom;
4700- toReturn.connectTo = this.connectTo;
4701+ toReturn.connectFrom = connectFrom;
4702+ toReturn.connectTo = connectTo;
4703
4704 return toReturn;
4705 }
4706
4707=== renamed file 'src/pipe/dataLayer/Transition.java' => 'src/pipe/gui/graphicElements/Transition.java'
4708--- src/pipe/dataLayer/Transition.java 2011-08-30 09:20:01 +0000
4709+++ src/pipe/gui/graphicElements/Transition.java 2011-10-14 12:17:24 +0000
4710@@ -1,4 +1,4 @@
4711-package pipe.dataLayer;
4712+package pipe.gui.graphicElements;
4713
4714 import java.awt.BasicStroke;
4715 import java.awt.Graphics;
4716@@ -14,100 +14,38 @@
4717 import java.util.Iterator;
4718
4719 import pipe.gui.CreateGui;
4720-import pipe.gui.Grid;
4721 import pipe.gui.Pipe;
4722 import pipe.gui.Zoomer;
4723 import pipe.gui.undo.TransitionRotationEdit;
4724 import dk.aau.cs.gui.undo.Command;
4725
4726 /**
4727- * <b>Transition</b> - Petri-Net Transition Class
4728- *
4729- * @see <p>
4730- * <a href="..\PNMLSchema\index.html">PNML - Petri-Net XMLSchema
4731- * (stNet.xsd)</a>
4732- * @see </p>
4733- * <p>
4734- * <a href="..\..\..\UML\dataLayer.html">UML - PNML Package </a>
4735- * </p>
4736- * @version 1.0
4737- * @author James D Bloom *
4738- * @author Dave Patterson Add fields and methods to handle delay time for
4739- * exponentially distributed timed transitions.
4740- *
4741- * Note: The exponential distribution is based on a single parameter,
4742- * which can either be specified as a delay or a rate. The two values
4743- * are inverses of each other, so no matter how the parameter is
4744- * specified, the code after the constructor is the same. When a timed
4745- * transition is found to be enabled, a projected delay is calculated
4746- * based on its exponential distribution. As long as the transition does
4747- * not get disabled before it can be fired, that delay governs the
4748- * timing of the transition's firing. If other timed transitions are
4749- * fired, the delay before they fire (that is, the progress of the
4750- * virtual clock) is decremented from this transition's delay time to
4751- * simulate the progress of time in the virtual space. Thus, at any
4752- * time, the next timed transition to fire is the one with the lowest
4753- * delay remaining. If a timed transition gets an expected delay and
4754- * then later becomes disabled, its delay is no longer valid. When it
4755- * next becomes enabled, it will get a new expected delay (an offset
4756- * from the current virtual time). This explaination was included to
4757- * clarify any confusion about fields and methods with "delay" in their
4758- * names. They have nothing to do with whether the parameter of the
4759- * exponential distribution is specified as a rate, or an expected
4760- * delay. to the
4761+ * Petri-Net Transition Class for Drawing Transitions
4762 */
4763 public class Transition extends PlaceTransitionObject {
4764
4765- /**
4766- *
4767- */
4768 private static final long serialVersionUID = 942116302162925121L;
4769- /** Transition is of Rectangle2D.Double */
4770+
4771+ //Transition is of Rectangle2D.Double
4772 private GeneralPath transition;
4773 private Shape proximityTransition;
4774- /** Place Width */
4775+
4776+ // Transition Size
4777 public static final int TRANSITION_HEIGHT = Pipe.PLACE_TRANSITION_HEIGHT;
4778- /** Place Width */
4779 public static final int TRANSITION_WIDTH = TRANSITION_HEIGHT / 3;
4780-
4781+
4782 protected int angle;
4783+
4784+ // Animation Suff
4785 protected boolean enabled = false;
4786- // private boolean enabledBackwards = false;
4787 public boolean highlighted = false;
4788
4789- private boolean infiniteServer = false;
4790-
4791 private static final double rootThreeOverTwo = 0.5 * Math.sqrt(3);
4792
4793 private ArrayList<ArcAngleCompare> arcAngleList = new ArrayList<ArcAngleCompare>();
4794
4795- /** The transition priority */
4796- private Integer priority = 1;
4797-
4798- public Transition(Transition t) {
4799-
4800- this(t.positionX, t.positionY, t.id, t.getName(), t.nameOffsetX,
4801- t.nameOffsetY, t.infiniteServer, t.angle, t.priority);
4802-
4803- }
4804-
4805 /**
4806 * Create Petri-Net Transition object
4807- *
4808- * @param positionXInput
4809- * X-axis Position
4810- * @param positionYInput
4811- * Y-axis Position
4812- * @param idInput
4813- * Transition id
4814- * @param nameInput
4815- * Name
4816- * @param nameOffsetXInput
4817- * Name X-axis Position
4818- * @param nameOffsetYInput
4819- * Name Y-axis Position
4820- * @param infServer
4821- * TODO
4822 */
4823 public Transition(double positionXInput, double positionYInput,
4824 String idInput, String nameInput, double nameOffsetXInput,
4825@@ -117,14 +55,11 @@
4826 nameOffsetXInput, nameOffsetYInput);
4827 componentWidth = TRANSITION_HEIGHT; // sets width
4828 componentHeight = TRANSITION_HEIGHT;// sets height
4829- infiniteServer = infServer;
4830 constructTransition();
4831 angle = 0;
4832 setCentre((int) positionX, (int) positionY);
4833 rotate(angleInput);
4834 updateBounds();
4835- // this.updateEndPoints();
4836- this.priority = priority;
4837 }
4838
4839 /**
4840@@ -145,41 +80,6 @@
4841 this.updateEndPoints();
4842 }
4843
4844- public Transition paste(double x, double y, boolean fromAnotherView) {
4845- this.incrementCopyNumber();
4846- Transition copy = new Transition(Grid.getModifiedX(x + this.getX()
4847- + Pipe.PLACE_TRANSITION_HEIGHT / 2), Grid.getModifiedY(y
4848- + this.getY() + Pipe.PLACE_TRANSITION_HEIGHT / 2));
4849- copy.pnName.setName(this.pnName.getName() + "(" + this.getCopyNumber()
4850- + ")");
4851-
4852- this.newCopy(copy);
4853- copy.nameOffsetX = this.nameOffsetX;
4854- copy.nameOffsetY = this.nameOffsetY;
4855-
4856- copy.angle = this.angle;
4857-
4858- copy.attributesVisible = this.attributesVisible;
4859- copy.priority = this.priority;
4860- copy.transition.transform(AffineTransform.getRotateInstance(Math
4861- .toRadians(copy.angle), Transition.TRANSITION_HEIGHT / 2,
4862- Transition.TRANSITION_HEIGHT / 2));
4863- return copy;
4864- }
4865-
4866- public Transition copy() {
4867- Transition copy = new Transition(Zoomer.getUnzoomedValue(this.getX(),
4868- zoom), Zoomer.getUnzoomedValue(this.getY(), zoom));
4869- copy.pnName.setName(this.getName());
4870- copy.nameOffsetX = this.nameOffsetX;
4871- copy.nameOffsetY = this.nameOffsetY;
4872- copy.angle = this.angle;
4873- copy.attributesVisible = this.attributesVisible;
4874- copy.priority = this.priority;
4875- copy.setOriginal(this);
4876- return copy;
4877- }
4878-
4879 @Override
4880 public void paintComponent(Graphics g) {
4881 super.paintComponent(g);
4882@@ -242,7 +142,7 @@
4883 * @return True if enabled
4884 */
4885 public boolean isEnabled(boolean animationStatus) {
4886- if (animationStatus == true) {
4887+ if (animationStatus) {
4888 if (isEnabled()) {
4889 highlighted = true;
4890 return true;
4891@@ -254,15 +154,6 @@
4892 }
4893
4894 /**
4895- * Determines whether Transition is enabled backwards
4896- *
4897- * @return True if enabled
4898- */
4899- // public boolean isEnabledBackwards(){
4900- // return enabledBackwards;
4901- // }
4902-
4903- /**
4904 * Determines whether Transition is enabled
4905 *
4906 * @return True if enabled
4907@@ -272,14 +163,6 @@
4908 return enabled;
4909 }
4910
4911- // public void setHighlighted(boolean status) {
4912- // highlighted = status;
4913- // }
4914-
4915- public boolean isInfiniteServer() {
4916- return infiniteServer;
4917- }
4918-
4919 /**
4920 * Sets whether Transition is enabled
4921 *
4922@@ -287,20 +170,9 @@
4923 */
4924 @Override
4925 public void setEnabled(boolean status) {
4926- if (enabled && !status) {
4927- }
4928 enabled = status;
4929 }
4930
4931- /**
4932- * Sets whether Transition is enabled
4933- *
4934- * @return enabled if True
4935- */
4936- // public void setEnabledBackwards(boolean status){
4937- // enabledBackwards = status;
4938- // }
4939-
4940 /* Called at the end of animation to reset Transitions to false */
4941 public void setEnabledFalse() {
4942 enabled = false;
4943@@ -311,10 +183,6 @@
4944 return angle;
4945 }
4946
4947- public int getPriority() {
4948- return priority;
4949- }
4950-
4951 protected void constructTransition() {
4952 transition = new GeneralPath();
4953 transition.append(new Rectangle2D.Double(
4954@@ -366,12 +234,6 @@
4955 }
4956 }
4957
4958- /*
4959- * (non-Javadoc)
4960- *
4961- * @see
4962- * pipe.dataLayer.PlaceTransitionObject#updateEndPoint(pipe.dataLayer.Arc)
4963- */
4964 @Override
4965 public void updateEndPoint(Arc arc) {
4966 boolean match = false;
4967@@ -379,7 +241,7 @@
4968 Iterator<ArcAngleCompare> arcIterator = arcAngleList.iterator();
4969 while (arcIterator.hasNext()) {
4970 ArcAngleCompare thisArc = arcIterator.next();
4971- if (thisArc.arc == arc || !arc.inView()) {
4972+ if (thisArc.arc == arc) {
4973 thisArc.calcAngle();
4974 match = true;
4975 break;
4976@@ -459,12 +321,11 @@
4977
4978 arcIterator = left.iterator();
4979 double inc = TRANSITION_HEIGHT / (left.size() + 1);
4980- double current = TRANSITION_HEIGHT / 2 - inc;
4981+ double current = TRANSITION_HEIGHT / 2d - inc;
4982 while (arcIterator.hasNext()) {
4983 ArcAngleCompare thisArc = arcIterator.next();
4984 transform.transform(new Point2D.Double(-0.5 * TRANSITION_WIDTH,
4985- current + 1), transformed); // +1 due to rounding making it
4986- // off by 1
4987+ current + 1), transformed); // +1 due to rounding making it off by 1
4988 if (thisArc.sourceOrTarget()) {
4989 thisArc.arc.setTargetLocation(positionX + centreOffsetLeft()
4990 + transformed.x, positionY + centreOffsetTop()
4991@@ -534,8 +395,8 @@
4992
4993 class ArcAngleCompare implements Comparable<ArcAngleCompare> {
4994
4995- private final static boolean SOURCE = false;
4996- private final static boolean TARGET = true;
4997+ private static final boolean SOURCE = false;
4998+ private static final boolean TARGET = true;
4999 private Arc arc;
5000 private Transition transition;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches