Changeset 23140 in osm for applications/editors/josm/plugins
- Timestamp:
- 2010-09-13T17:39:49+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r23138 r23140 406 406 407 407 dlg.tfM01Name.setText(getName()); 408 dlg.tfM01Name.setEnabled(true); 408 409 409 410 if (hasRadar()) { … … 569 570 } else { 570 571 dlg.bM01Save.setEnabled(false); 572 dlg.tfM01Name.setEnabled(false); 571 573 dlg.cM01TopMark.setVisible(false); 572 574 dlg.cbM01TopMark.setVisible(false); … … 618 620 } 619 621 620 protected void saveLightData(String colour) { 621 if (colour.isEmpty()) { 622 return; 623 } 622 protected void saveLightData() { 624 623 625 624 if (dlg.cM01Fired.isSelected()) { 626 if (colour.equals("red")) { 625 setSectorIndex(0); 626 String colour = getLightColour(); 627 if (colour.equals("R")) { 627 628 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 628 629 "seamark:light:colour", "red")); 629 setLightColour("R"); 630 } else if (colour.equals("green")) { 630 } else if (colour.equals("G")) { 631 631 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 632 632 "seamark:light:colour", "green")); 633 setLightColour("G"); 634 } else if (colour.equals("white")) { 633 } else if (colour.equals("W")) { 635 634 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 636 635 "seamark:light:colour", "white")); 637 setLightColour("W"); 638 } 639 if (getLightPeriod() != "" && getLightPeriod() != " " 640 && getLightChar() != "Q") 636 } 637 638 if (!getLightPeriod().isEmpty()) 641 639 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 642 640 "seamark:light:period", getLightPeriod())); 643 641 644 if ( getLightChar() != "")642 if (!getLightChar().isEmpty()) 645 643 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 646 644 "seamark:light:character", getLightChar())); 647 645 648 if ( getLightGroup() != "")646 if (!getLightGroup().isEmpty()) 649 647 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 650 648 "seamark:light:group", getLightGroup())); 649 650 if (!getHeight().isEmpty()) 651 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 652 "seamark:light:height", getHeight())); 653 654 if (!getRange().isEmpty()) 655 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 656 "seamark:light:range", getRange())); 657 658 for (int i = 1; i < 10; i++) { 659 setSectorIndex(i); 660 661 colour = getLightColour(); 662 if (colour.equals("R")) { 663 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 664 "seamark:light:colour:" + i, "red")); 665 } else if (colour.equals("G")) { 666 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 667 "seamark:light:colour:" + i, "green")); 668 } else if (colour.equals("W")) { 669 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 670 "seamark:light:colour:" + i, "white")); 671 } 672 673 if (!getLightPeriod().isEmpty()) 674 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 675 "seamark:light:period:" + i, getLightPeriod())); 676 677 if (!getLightChar().isEmpty()) 678 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 679 "seamark:light:character:" + i, getLightChar())); 680 681 if (!getLightGroup().isEmpty()) 682 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 683 "seamark:light:group:" + i, getLightGroup())); 684 685 if (!getHeight().isEmpty()) 686 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 687 "seamark:light:height:" + i, getHeight())); 688 689 if (!getRange().isEmpty()) 690 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 691 "seamark:light:range:" + i, getRange())); 692 } 651 693 } 652 694 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r23109 r23140 409 409 } 410 410 saveTopMarkData(shape, "black"); //$NON-NLS-1$ 411 saveLightData( "white"); //$NON-NLS-1$411 saveLightData(); //$NON-NLS-1$ 412 412 saveRadarFogData(); 413 413 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r23086 r23140 225 225 226 226 saveTopMarkData("2 spheres", "black"); //$NON-NLS-1$ //$NON-NLS-2$ 227 saveLightData( "white"); //$NON-NLS-1$227 saveLightData(); //$NON-NLS-1$ 228 228 saveRadarFogData(); 229 229 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r23109 r23140 951 951 } 952 952 saveTopMarkData(shape, colour); 953 saveLightData( colour);953 saveLightData(); 954 954 saveRadarFogData(); 955 955 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
r23138 r23140 96 96 } 97 97 98 switch (get StyleIndex()) {98 switch (getBuoyIndex()) { 99 99 case LIGHT_HOUSE: 100 100 super.saveSign("lighthouse"); //$NON-NLS-1$ … … 108 108 default: 109 109 } 110 saveLightData( "white"); //$NON-NLS-1$110 saveLightData(); //$NON-NLS-1$ 111 111 saveRadarFogData(); 112 112 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r23086 r23140 217 217 } 218 218 saveTopMarkData("spherical", "red"); //$NON-NLS-1$ //$NON-NLS-2$ 219 saveLightData( "white"); //$NON-NLS-1$219 saveLightData(); //$NON-NLS-1$ 220 220 saveRadarFogData(); 221 221 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r23086 r23140 250 250 } 251 251 saveTopMarkData("x-shape", "yellow"); //$NON-NLS-1$ //$NON-NLS-2$ 252 saveLightData( "white"); //$NON-NLS-1$252 saveLightData(); //$NON-NLS-1$ 253 253 saveRadarFogData(); 254 254 }
Note:
See TracChangeset
for help on using the changeset viewer.