File tree Expand file tree Collapse file tree 8 files changed +79
-7
lines changed
Expand file tree Collapse file tree 8 files changed +79
-7
lines changed Original file line number Diff line number Diff line change 11package actions ;
22
3+ import actions .menu .ActionsMenuBarTitles ;
34import paintcomponents .DataDisplayPaintComponent ;
45import ui .PaintPanel ;
56
@@ -23,7 +24,7 @@ public void performAction() {
2324
2425 @ Override
2526 public String locationString () {
26- return "Add/ Data Display" ;
27+ return ActionsMenuBarTitles . Data (). Display_Box (). Add (). toString () ;
2728 }
2829
2930}
Original file line number Diff line number Diff line change 11package actions ;
22
3+ import actions .menu .ActionsMenuBarTitles ;
34import paintcomponents .DataInputTextfieldPaintComponent ;
45import ui .PaintPanel ;
56
@@ -24,7 +25,7 @@ public void performAction() {
2425
2526 @ Override
2627 public String locationString () {
27- return "Add/ Data Input Box..." ;
28+ return ActionsMenuBarTitles . Data (). Input_Box (). Add (). toString () ;
2829 }
2930
3031}
Original file line number Diff line number Diff line change 22
33import javax .swing .JOptionPane ;
44
5+ import actions .menu .ActionsMenuBarTitles ;
56import paintcomponents .TextPaintComponent ;
67import ui .PaintPanel ;
78
@@ -25,7 +26,7 @@ public void performAction() {
2526
2627 @ Override
2728 public String locationString () {
28- return "Add/Text Box..." ;
29+ return ActionsMenuBarTitles . Developer ( "Add/Text Box..." ). toString () ;
2930 }
3031
3132}
Original file line number Diff line number Diff line change 22
33import java .util .ArrayList ;
44
5+ import actions .menu .ActionsMenuBarTitles ;
56import paintcomponents .DataFromPoint ;
67import paintcomponents .DataLineSegment ;
78import paintcomponents .DataToPoint ;
@@ -43,7 +44,7 @@ public void performAction() {
4344 @ Override
4445 public String locationString () {
4546 // TODO Auto-generated method stub
46- return " Data/ Construct/Line Segment" ;
47+ return ActionsMenuBarTitles . Data (). Construct (). Line_Segment (). toString () ;
4748 }
4849
4950}
Original file line number Diff line number Diff line change 33import java .awt .Component ;
44import java .util .ArrayList ;
55
6+ import actions .menu .ActionsMenuBarTitles ;
67import paintcomponents .LineSegment ;
78import paintcomponents .PaintComponent ;
89import paintcomponents .SimplePoint ;
@@ -82,7 +83,7 @@ protected void addLineSegment(LineSegment lineSegment) {
8283
8384 @ Override
8485 public String locationString () {
85- return "Construct/Line Segment" ;
86+ return ActionsMenuBarTitles . Developer ( "Construct/Line Segment" ). toString () ;
8687 }
8788
8889}
Original file line number Diff line number Diff line change 44
55import javax .swing .JOptionPane ;
66
7+ import actions .menu .ActionsMenuBarTitles ;
78import paintcomponents .DataInputTextfieldPaintComponent ;
89import paintcomponents .PaintComponent ;
910import ui .PaintPanel ;
@@ -34,7 +35,7 @@ public void performAction() {
3435
3536 @ Override
3637 public String locationString () {
37- return "Input/Input into Data Panel" ;
38+ return ActionsMenuBarTitles . Data (). Input_Box (). Update (). toString () ;
3839 }
3940
4041}
Original file line number Diff line number Diff line change 44
55import javax .swing .JOptionPane ;
66
7+ import actions .menu .ActionsMenuBarTitles ;
78import paintcomponents .DataDisplayPaintComponent ;
89import paintcomponents .DataFromPointNoDataProviderException ;
910import paintcomponents .DataFromPointProviderCannotProvideDataException ;
@@ -43,7 +44,7 @@ public void performAction() {
4344
4445 @ Override
4546 public String locationString () {
46- return " Data/Display Box/ Update" ;
47+ return ActionsMenuBarTitles . Data (). Display_Box (). Update (). toString () ;
4748 }
4849
4950}
Original file line number Diff line number Diff line change 1+ package actions .menu ;
2+
3+ public class ActionsMenuBarTitles {
4+
5+ public String pending ;
6+
7+ public ActionsMenuBarTitles (String string ) {
8+ pending = string ;
9+ }
10+
11+ @ Override
12+ public String toString () {
13+ return pending ;
14+ }
15+
16+ public static ActionsMenuBarTitles Data (){
17+ return new ActionsMenuBarTitles ("Data" );
18+ }
19+
20+ /**
21+ * Returns the string construct for Developer Only Feature
22+ * @param remainingTitle the remaining menu titles, this should not begin with /
23+ * @return
24+ */
25+ public static ActionsMenuBarTitles Developer (String remainingTitle ){
26+ return new ActionsMenuBarTitles ("Developer" + "/" + remainingTitle );
27+ }
28+
29+ private void append (String str ){
30+ this .pending += "/" + str ;
31+ }
32+
33+
34+ public ActionsMenuBarTitles Input_Box (){
35+ append ("Input Box" );
36+ return this ;
37+ }
38+
39+ public ActionsMenuBarTitles Display_Box (){
40+ append ("Display Box" );
41+ return this ;
42+ }
43+
44+ public ActionsMenuBarTitles Add (){
45+ append ("Add" );
46+ return this ;
47+ }
48+
49+ public ActionsMenuBarTitles Update (){
50+ append ("Update" );
51+ return this ;
52+ }
53+
54+ public ActionsMenuBarTitles Construct (){
55+ append ("Construct" );
56+ return this ;
57+ }
58+
59+ public ActionsMenuBarTitles Line_Segment (){
60+ append ("Line Segment" );
61+ return this ;
62+ }
63+
64+
65+ }
You can’t perform that action at this time.
0 commit comments