Ignore:
Timestamp:
2011-03-08T13:34:45+01:00 (14 years ago)
Author:
malcolmh
Message:

'Bug fix release'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java

    r23375 r25542  
    2828         * private Variablen
    2929         */
     30
     31        private String Longname = "";
     32
     33        public String getLongname() {
     34                return Longname;
     35        }
     36
     37        public void setLongname(String name) {
     38                Longname = name;
     39        }
     40
     41        private String Ref = "";
     42
     43        public String getRef() {
     44                return Ref;
     45        }
     46
     47        public void setRef(String ref) {
     48                Ref = ref;
     49        }
     50
     51        private String Inf = "";
     52
     53        public String getInf() {
     54                return Inf;
     55        }
     56
     57        public void setInf(String inf) {
     58                Inf = inf;
     59        }
     60
     61        private String Fixme = "";
     62
     63        public String getFixme() {
     64                return Fixme;
     65        }
     66
     67        public void setFixme(String name) {
     68                Fixme = name;
     69        }
     70
     71        private String LMheight = "";
     72
     73        public String getLMheight() {
     74                return LMheight;
     75        }
     76
     77        public void setLMheight(String height) {
     78                LMheight = height;
     79        }
    3080
    3181        private int BuoyIndex = 0;
     
    169219                        setBearing2("");
    170220                        setRadius("");
     221                        setSeq("");
    171222                }
    172223        }
     
    258309                        Range = new String[10];
    259310                Range[SectorIndex] = range;
     311        }
     312
     313        private String[] Sequence = new String[10];
     314
     315        public String getSeq() {
     316                if (Sequence[SectorIndex] == null)
     317                        return (Sequence[0]);
     318                return Sequence[SectorIndex];
     319        }
     320
     321        public void setSeq(String seq) {
     322                if (SectorIndex == 0)
     323                        Sequence = new String[10];
     324                Sequence[SectorIndex] = seq;
    260325        }
    261326
     
    418483                                if (index != 0)
    419484                                        setSectored(true);
     485                                if (key.equals("ref"))
     486                                        setRef(value);
     487                                if (key.equals("inform"))
     488                                        setInf(value);
    420489                                if (key.equals("colour")) {
    421490                                        if (value.equals("red"))
     
    435504                                } else if (key.equals("range")) {
    436505                                        Range[index] = value;
     506                                } else if (key.equals("sequence")) {
     507                                        Sequence[index] = value;
     508                                } else if (key.equals("sector_start")) {
     509                                        Bearing1[index] = value;
     510                                } else if (key.equals("sector_end")) {
     511                                        Bearing2[index] = value;
    437512                                }
    438513                        }
     
    801876                String str = dlg.tfM01Name.getText();
    802877                if (!str.isEmpty())
    803                         Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:name",
    804                                         str));
     878                        Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:name", str));
     879                if (!Longname.isEmpty())
     880                        Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:longname", Longname));
     881                if (!Fixme.isEmpty())
     882                        Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:fixme", Fixme));
    805883                Main.main.undoRedo
    806884                                .add(new ChangePropertyCommand(Node, "seamark:type", type));
     
    810888                String colour;
    811889                if (dlg.cM01Fired.isSelected()) {
    812                         if (!(colour = LightColour[0]).isEmpty())
     890                        if (!(colour = LightColour[0]).isEmpty() && !Sectored)
    813891                                if (colour.equals("R")) {
    814892                                        Main.main.undoRedo.add(new ChangePropertyCommand(Node,
     
    821899                                                        "seamark:light:colour", "white"));
    822900                                }
     901
     902                        if (!Ref.isEmpty())
     903                                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
     904                                                "seamark:light:ref", Ref));
     905
     906                        if (!Inf.isEmpty())
     907                                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
     908                                                "seamark:light:inform", Inf));
    823909
    824910                        if (!LightPeriod[0].isEmpty())
     
    841927                                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
    842928                                                "seamark:light:range", Range[0]));
     929
     930                        if (!Sequence[0].isEmpty())
     931                                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
     932                                                "seamark:light:sequence", Sequence[0]));
    843933
    844934                        for (int i = 1; i < 10; i++) {
     
    886976                                                        "seamark:light:" + i + ":height", Height[i]));
    887977
     978                                if (Sequence[i] != null)
     979                                        Main.main.undoRedo.add(new ChangePropertyCommand(Node,
     980                                                        "seamark:light:" + i + ":sequence", Sequence[i]));
     981
    888982                                if (Range[i] != null)
    889983                                        Main.main.undoRedo.add(new ChangePropertyCommand(Node,
     
    10261120                dlg.tfM01Name.setEnabled(false);
    10271121                setName("");
     1122                setLongname("");
     1123                setFixme("");
     1124                setRef("");
     1125                setInf("");
    10281126                dlg.cM01TopMark.setSelected(false);
    10291127                dlg.cM01TopMark.setVisible(false);
Note: See TracChangeset for help on using the changeset viewer.