Changeset 27230 in osm


Ignore:
Timestamp:
2011-12-14T02:56:38+01:00 (13 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChan.java

    r27219 r27230  
    3939                                } else {
    4040                                        panelPort.shapeButtons.clearSelection();
    41                                         dlg.panelMain.mark.setShape(Shp.UNKNOWN);
     41                                        dlg.panelMain.mark.setShape(Shp.UNKSHP);
    4242                                }
    4343                                panelPort.alShape.actionPerformed(null);
     
    5353                                } else {
    5454                                        panelPort.shapeButtons.clearSelection();
    55                                         dlg.panelMain.mark.setShape(Shp.UNKNOWN);
     55                                        dlg.panelMain.mark.setShape(Shp.UNKSHP);
    5656                                }
    5757                                panelPort.alShape.actionPerformed(null);
     
    6767                                } else {
    6868                                        panelStbd.shapeButtons.clearSelection();
    69                                         dlg.panelMain.mark.setShape(Shp.UNKNOWN);
     69                                        dlg.panelMain.mark.setShape(Shp.UNKSHP);
    7070                                }
    7171                                panelStbd.alShape.actionPerformed(null);
     
    8181                                } else {
    8282                                        panelStbd.shapeButtons.clearSelection();
    83                                         dlg.panelMain.mark.setShape(Shp.UNKNOWN);
     83                                        dlg.panelMain.mark.setShape(Shp.UNKSHP);
    8484                                }
    8585                                panelStbd.alShape.actionPerformed(null);
     
    9090                        }
    9191                        if (safeWaterButton.isSelected()) {
    92                                 dlg.panelMain.mark.setCategory(Cat.NONE);
     92                                dlg.panelMain.mark.setCategory(Cat.NOCAT);
    9393                                panelSaw.setVisible(true);
    9494                                if (panelSaw.shapes.containsKey(shp)) {
     
    9696                                } else {
    9797                                        panelSaw.shapeButtons.clearSelection();
    98                                         dlg.panelMain.mark.setShape(Shp.UNKNOWN);
     98                                        dlg.panelMain.mark.setShape(Shp.UNKSHP);
    9999                                }
    100100                                panelSaw.alShape.actionPerformed(null);
     
    116116                                if (SeaMark.GrpMAP.get(dlg.panelMain.mark.getObject()) == Grp.SAW) {
    117117                                        dlg.panelMain.mark.setTopmark(Top.SPHERE);
    118                                         dlg.panelMain.mark.setTopPattern(Pat.NONE);
     118                                        dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    119119                                        dlg.panelMain.mark.setTopColour(Col.RED);
    120120                                } else {
     
    125125                                                switch (dlg.panelMain.mark.getRegion()) {
    126126                                                case A:
    127                                                         dlg.panelMain.mark.setTopPattern(Pat.NONE);
     127                                                        dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    128128                                                        dlg.panelMain.mark.setTopColour(Col.RED);
    129129                                                        break;
    130130                                                case B:
    131                                                         dlg.panelMain.mark.setTopPattern(Pat.NONE);
     131                                                        dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    132132                                                        dlg.panelMain.mark.setTopColour(Col.GREEN);
    133133                                                        break;
     
    144144                                                switch (dlg.panelMain.mark.getRegion()) {
    145145                                                case A:
    146                                                         dlg.panelMain.mark.setTopPattern(Pat.NONE);
     146                                                        dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    147147                                                        dlg.panelMain.mark.setTopColour(Col.GREEN);
    148148                                                        break;
    149149                                                case B:
    150                                                         dlg.panelMain.mark.setTopPattern(Pat.NONE);
     150                                                        dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    151151                                                        dlg.panelMain.mark.setTopColour(Col.RED);
    152152                                                        break;
     
    162162                                topmarkButton.setBorderPainted(true);
    163163                        } else {
    164                                 dlg.panelMain.mark.setTopmark(Top.NONE);
    165                                 dlg.panelMain.mark.setTopPattern(Pat.NONE);
    166                                 dlg.panelMain.mark.setTopColour(Col.UNKNOWN);
     164                                dlg.panelMain.mark.setTopmark(Top.NOTOP);
     165                                dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
     166                                dlg.panelMain.mark.setTopColour(Col.UNKCOL);
    167167                                topmarkButton.setBorderPainted(false);
    168168                        }
     
    284284                        safeWaterButton.setBorderPainted(false);
    285285                }
    286                 topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NONE);
    287                 topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NONE);
     286                topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
     287                topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
    288288                topmarkButton.setVisible(dlg.panelMain.mark.testValid());
    289                 Boolean lit = (dlg.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKNOWN) && !((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty();
     289                Boolean lit = (dlg.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKCOL) && !((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty();
    290290                lightButton.setBorderPainted(lit);
    291291                lightButton.setSelected(lit);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChr.java

    r27219 r27230  
    7070                        if (!str.contains("Al")) {
    7171                                col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, 0)));
    72                                 dlg.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKNOWN);
     72                                dlg.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKCOL);
    7373                        } else {
    7474                                col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.ALT, 0)));
     
    9999                        if (!str.contains("Al")) {
    100100                                col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, 0)));
    101                                 dlg.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKNOWN);
     101                                dlg.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKCOL);
    102102                        } else {
    103103                                col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.ALT, 0)));
     
    109109                dlg = dia;
    110110                setLayout(null);
    111                 add(getChrButton(noneButton, 0, 0, 44, 16, Messages.getString("NoChar"), Chr.UNKNOWN));
     111                add(getChrButton(noneButton, 0, 0, 44, 16, Messages.getString("NoChar"), Chr.UNKCHR));
    112112                add(getChrButton(fixedButton, 0, 16, 44, 16, Messages.getString("FChar"), Chr.FIXED));
    113113                add(getChrButton(flashButton, 0, 32, 44, 16, Messages.getString("FlChar"), Chr.FLASH));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java

    r27223 r27230  
    4040                                JRadioButton button = colours.get(col);
    4141                                if (button.isSelected()) {
    42                                                 if (ent == Ent.LIGHT) {
    43                                                         if (((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).contains("Al")) {
    44                                                                 if (((button == delButton) && (dlg.panelMain.mark.getLightAtt(Att.ALT, 0) == Col.UNKNOWN))
    45                                                                                 || (dlg.panelMain.mark.getLightAtt(Att.COL, 0) == Col.UNKNOWN)) {
    46                                                                         dlg.panelMain.mark.setLightAtt(Att.COL, 0, col);
    47                                                                         dlg.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));
    48                                                                 } else {
    49                                                                         dlg.panelMain.mark.setLightAtt(Att.ALT, 0, col);
    50                                                                         dlg.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));
    51                                                                 }
    52                                                         } else {
     42                                        if (ent == Ent.LIGHT) {
     43                                                if (((String) dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).contains("Al")) {
     44                                                        if (((button == delButton) && (dlg.panelMain.mark.getLightAtt(Att.ALT, 0) == Col.UNKCOL))
     45                                                                        || (dlg.panelMain.mark.getLightAtt(Att.COL, 0) == Col.UNKCOL)) {
    5346                                                                dlg.panelMain.mark.setLightAtt(Att.COL, 0, col);
    5447                                                                dlg.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));
     48                                                        } else {
     49                                                                dlg.panelMain.mark.setLightAtt(Att.ALT, 0, col);
    5550                                                                dlg.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));
    5651                                                        }
    57                                                         button.setBorderPainted(true);
    5852                                                } else {
    59                                                         if (button == delButton) {
    60                                                                 dlg.panelMain.mark.subColour(ent, stackIdx);
    61                                                         } else if (button == addButton) {
    62                                                                 if (stackCol.size() != 0)
    63                                                                         stackIdx++;
    64                                                                 if (stackCol.size() == 0)
    65                                                                         dlg.panelMain.mark.setColour(ent, col);
    66                                                                 else
     53                                                        dlg.panelMain.mark.setLightAtt(Att.COL, 0, col);
     54                                                        dlg.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));
     55                                                        dlg.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));
     56                                                }
     57                                                button.setBorderPainted(true);
     58                                        } else {
     59                                                if (button == delButton) {
     60                                                        dlg.panelMain.mark.subColour(ent, stackIdx);
     61                                                } else if (button == addButton) {
     62                                                        if (stackCol.size() != 0)
     63                                                                stackIdx++;
     64                                                        if (stackCol.size() == 0)
     65                                                                dlg.panelMain.mark.setColour(ent, col);
     66                                                        else
     67                                                                switch (dlg.panelMain.mark.getPattern(ent)) {
     68                                                                case NOPAT:
     69                                                                        break;
     70                                                                case BORDER:
     71                                                                case CROSS:
     72                                                                        if (stackCol.size() < 2)
     73                                                                                dlg.panelMain.mark.addColour(ent, stackIdx, col);
     74                                                                        break;
     75                                                                case SQUARE:
     76                                                                        if (stackCol.size() < 4)
     77                                                                                dlg.panelMain.mark.addColour(ent, stackIdx, col);
     78                                                                        break;
     79                                                                default:
    6780                                                                        dlg.panelMain.mark.addColour(ent, stackIdx, col);
    68                                                         } else {
    69                                                                 dlg.panelMain.mark.setColour(ent, stackIdx, col);
    70                                                         }
    71                                                         syncPanel();
     81                                                                        break;
     82                                                                }
     83                                                } else {
     84                                                        dlg.panelMain.mark.setColour(ent, stackIdx, col);
    7285                                                }
     86                                                syncPanel();
     87                                        }
    7388                                } else {
    7489                                        button.setBorderPainted(false);
     
    99114                ent = entity;
    100115                setLayout(null);
    101                 add(getColButton(delButton, 0, 0, 34, 16, Messages.getString("RemColour"), Col.UNKNOWN));
     116                add(getColButton(delButton, 0, 0, 34, 16, Messages.getString("RemColour"), Col.UNKCOL));
    102117                add(getColButton(whiteButton, 0, 16, 34, 16, Messages.getString("White"), Col.WHITE));
    103118                add(getColButton(redButton, 0, 32, 34, 16, Messages.getString("Red"), Col.RED));
     
    142157                } else {
    143158                        int idx;
    144                         for (idx = 0; dlg.panelMain.mark.getColour(ent, idx) != Col.UNKNOWN; idx++) {
     159                        for (idx = 0; dlg.panelMain.mark.getColour(ent, idx) != Col.UNKCOL; idx++) {
    145160                                if (stackCol.size() <= idx) {
    146161                                        stackCol.add(idx, new JRadioButton(new ImageIcon(getClass().getResource("/images/ColourButton.png"))));
     
    159174                                stackCol.remove(idx);
    160175                        }
    161                         if ((stackIdx >= stackCol.size()) && (stackIdx > 0))
     176                        if (stackIdx >= stackCol.size())
    162177                                stackIdx = stackCol.size() - 1;
    163178                        if (stackIdx < 0)
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelFog.java

    r27219 r27230  
    6969                dlg = dia;
    7070                setLayout(null);
    71                 add(getFogButton(noFogButton, 0, 2, 27, 27, "NoFog", Fog.NONE));
    72                 add(getFogButton(yesFogButton, 0, 32, 27, 27, "FogSignal", Fog.UNKNOWN));
     71                add(getFogButton(noFogButton, 0, 2, 27, 27, "NoFog", Fog.NOFOG));
     72                add(getFogButton(yesFogButton, 0, 32, 27, 27, "FogSignal", Fog.FOGSIG));
    7373                add(getFogButton(hornButton, 0, 62, 27, 27, "Horn", Fog.HORN));
    7474                add(getFogButton(sirenButton, 0, 92, 27, 27, "Siren", Fog.SIREN));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java

    r27219 r27230  
    6060                        }
    6161                        if (isolButton.isSelected()) {
    62                                 dlg.panelMain.mark.setCategory(Cat.NONE);
     62                                dlg.panelMain.mark.setCategory(Cat.NOCAT);
    6363                                dlg.panelMain.mark.setObjColour(Col.BLACK);
    6464                                dlg.panelMain.mark.addObjColour(Col.RED);
     
    107107                public void actionPerformed(java.awt.event.ActionEvent e) {
    108108                        if (topmarkButton.isSelected()) {
    109                                 dlg.panelMain.mark.setTopPattern(Pat.NONE);
     109                                dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    110110                                dlg.panelMain.mark.setTopColour(Col.BLACK);
    111111                                switch (dlg.panelMain.mark.getCategory()) {
     
    128128                                topmarkButton.setBorderPainted(true);
    129129                        } else {
    130                                 dlg.panelMain.mark.setTopmark(Top.NONE);
    131                                 dlg.panelMain.mark.setTopPattern(Pat.NONE);
    132                                 dlg.panelMain.mark.setTopColour(Col.UNKNOWN);
     130                                dlg.panelMain.mark.setTopmark(Top.NOTOP);
     131                                dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
     132                                dlg.panelMain.mark.setTopColour(Col.UNKCOL);
    133133                                topmarkButton.setBorderPainted(false);
    134134                        }
     
    184184                add(getShapeButton(sparButton, 55, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYCAR, Obj.BOYISD));
    185185                add(getShapeButton(canButton, 55, 64, 34, 32, "Can", Shp.CAN, Obj.BOYCAR, Obj.BOYISD));
    186                 add(getShapeButton(coneButton, 55, 96, 34, 32, "Cone", Shp.CONE, Obj.BOYCAR, Obj.BOYISD));
    187                 add(getShapeButton(sphereButton, 55, 128, 34, 32, "Sphere", Shp.SPHERE, Obj.BOYCAR, Obj.BOYISD));
     186                add(getShapeButton(coneButton, 55, 96, 34, 32, "Cone", Shp.CONI, Obj.BOYCAR, Obj.BOYISD));
     187                add(getShapeButton(sphereButton, 55, 128, 34, 32, "Sphere", Shp.SPHERI, Obj.BOYCAR, Obj.BOYISD));
    188188                add(getShapeButton(floatButton, 90, 0, 34, 32, "Float", Shp.FLOAT, Obj.LITFLT, Obj.LITFLT));
    189189                add(getShapeButton(beaconButton, 90, 32, 34, 32, "Beacon", Shp.BEACON, Obj.BCNCAR, Obj.BCNISD));
     
    214214                        button.setBorderPainted(dlg.panelMain.mark.getShape() == shp);
    215215                }
    216                 topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NONE);
    217                 topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NONE);
     216                topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
     217                topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
    218218                topmarkButton.setVisible(dlg.panelMain.mark.testValid());
    219                 Boolean lit = (dlg.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKNOWN) && !((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty();
     219                Boolean lit = (dlg.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKCOL) && !((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty();
    220220                lightButton.setBorderPainted(lit);
    221221                lightButton.setSelected(lit);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java

    r27219 r27230  
    8181                        else if (dlg.panelMain.mark.getObject() == Obj.LITFLT)
    8282                                dlg.panelMain.mark.setShape(Shp.FLOAT);
    83                         else dlg.panelMain.mark.setShape(Shp.UNKNOWN);
     83                        else dlg.panelMain.mark.setShape(Shp.UNKSHP);
    8484                        if (landButton.isSelected()) {
    8585                                categoryLabel.setVisible(true);
     
    101101                                alWarningCatBox.actionPerformed(null);
    102102                        } else {
    103                                 dlg.panelMain.mark.setCategory(Cat.NONE);
     103                                dlg.panelMain.mark.setCategory(Cat.NOCAT);
    104104                                categoryLabel.setVisible(false);
    105105                                landCatBox.setVisible(false);
     
    132132                add(landCatBox);
    133133                landCatBox.addActionListener(alLandCatBox);
    134                 addLCItem("", Cat.NONE);
     134                addLCItem("", Cat.NOCAT);
    135135                addLCItem(Messages.getString("Tower"), Cat.LMK_TOWR);
    136136                addLCItem(Messages.getString("WaterTower"), Cat.LMK_WTRT);
     
    159159                add(trafficCatBox);
    160160                trafficCatBox.addActionListener(alTrafficCatBox);
    161                 addTCItem("", Cat.NONE);
     161                addTCItem("", Cat.NOCAT);
    162162                addTCItem(Messages.getString("Traffic"), Cat.SIS_TRFC);
    163163                addTCItem(Messages.getString("PortControl"), Cat.SIS_PTCL);
     
    176176                add(warningCatBox);
    177177                warningCatBox.addActionListener(alWarningCatBox);
    178                 addWCItem("", Cat.NONE);
     178                addWCItem("", Cat.NOCAT);
    179179                addWCItem(Messages.getString("Danger"), Cat.SIS_DNGR);
    180180                addWCItem(Messages.getString("Storm"), Cat.SIS_STRM);
     
    197197
    198198        public void syncPanel() {
    199                 if ((dlg.panelMain.mark.getObject() == Obj.LNDMRK) && (dlg.panelMain.mark.getCategory() != Cat.NONE)) {
     199                if ((dlg.panelMain.mark.getObject() == Obj.LNDMRK) && (dlg.panelMain.mark.getCategory() != Cat.NOCAT)) {
    200200                        categoryLabel.setVisible(true);
    201201                        landCatBox.setVisible(true);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java

    r27219 r27230  
    212212                categoryBox.setBounds(new Rectangle(185, 20, 165, 20));
    213213                add(categoryBox);
    214                 addCatItem("", Lit.UNKNOWN);
     214                addCatItem("", Lit.UNKLIT);
    215215                addCatItem(Messages.getString("VertDisp"), Lit.VERT);
    216216                addCatItem(Messages.getString("HorizDisp"), Lit.HORIZ);
     
    238238                visibilityBox.setBounds(new Rectangle(185, 60, 165, 20));
    239239                add(visibilityBox);
    240                 addVisibItem("", Vis.UNKNOWN);
     240                addVisibItem("", Vis.UNKVIS);
    241241                addVisibItem(Messages.getString("Intensified"), Vis.INTEN);
    242242                addVisibItem(Messages.getString("Unintensified"), Vis.UNINTEN);
     
    250250                exhibitionBox.setBounds(new Rectangle(280, 100, 70, 20));
    251251                add(exhibitionBox);
    252                 addExhibItem("", Exh.UNKNOWN);
     252                addExhibItem("", Exh.UNKEXH);
    253253                addExhibItem(Messages.getString("24h"), Exh.H24);
    254254                addExhibItem(Messages.getString("Day"), Exh.DAY);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java

    r27219 r27230  
    308308                                panelSpec.syncPanel();
    309309                                break;
    310                         case LIT:
     310                        case LGT:
    311311                        case SIS:
    312312                                lightsButton.setBorderPainted(true);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMore.java

    r27219 r27230  
    103103                                case LAM_PORT:
    104104                                        dlg.panelMain.mark.setObjColour(Col.RED);
    105                                         dlg.panelMain.mark.setObjPattern(Pat.NONE);
     105                                        dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    106106                                        break;
    107107                                case LAM_PPORT:
     
    113113                                case LAM_STBD:
    114114                                        dlg.panelMain.mark.setObjColour(Col.GREEN);
    115                                         dlg.panelMain.mark.setObjPattern(Pat.NONE);
     115                                        dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    116116                                        break;
    117117                                case LAM_PSTBD:
     
    131131                                case LAM_PORT:
    132132                                        dlg.panelMain.mark.setObjColour(Col.GREEN);
    133                                         dlg.panelMain.mark.setObjPattern(Pat.NONE);
     133                                        dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    134134                                        break;
    135135                                case LAM_PPORT:
     
    141141                                case LAM_STBD:
    142142                                        dlg.panelMain.mark.setObjColour(Col.RED);
    143                                         dlg.panelMain.mark.setObjPattern(Pat.NONE);
     143                                        dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    144144                                        break;
    145145                                case LAM_PSTBD:
     
    236236                statusBox = new JComboBox();
    237237                statusBox.setBounds(new Rectangle(250, 20, 100, 20));
    238                 addStsItem("", Sts.UNKNOWN);
     238                addStsItem("", Sts.UNKSTS);
    239239                addStsItem(Messages.getString("Permanent"), Sts.PERM);
    240240                addStsItem(Messages.getString("Occasional"), Sts.OCC);
     
    263263                constrBox = new JComboBox();
    264264                constrBox.setBounds(new Rectangle(250, 60, 100, 20));
    265                 addCnsItem("", Cns.UNKNOWN);
     265                addCnsItem("", Cns.UNKCNS);
    266266                addCnsItem(Messages.getString("Masonry"), Cns.BRICK);
    267267                addCnsItem(Messages.getString("Concreted"), Cns.CONC);
     
    281281                conBox = new JComboBox();
    282282                conBox.setBounds(new Rectangle(250, 100, 100, 20));
    283                 addConItem("", Con.UNKNOWN);
     283                addConItem("", Con.UNKCON);
    284284                addConItem(Messages.getString("Conspicuous"), Con.CONSP);
    285285                addConItem(Messages.getString("NotConspicuous"), Con.NCONS);
     
    292292                reflBox = new JComboBox();
    293293                reflBox.setBounds(new Rectangle(250, 140, 100, 20));
    294                 addReflItem("", Con.UNKNOWN);
     294                addReflItem("", Con.UNKCON);
    295295                addReflItem(Messages.getString("Conspicuous"), Con.CONSP);
    296296                addReflItem(Messages.getString("NotConspicuous"), Con.NCONS);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPat.java

    r27219 r27230  
    3737                        }
    3838                        switch (dlg.panelMain.mark.getPattern(ent)) {
    39                         case NONE:
     39                        case NOPAT:
    4040                                panelCol.trimStack(1);
    4141                                break;
     
    4848                                break;
    4949                        case BORDER:
     50                        case CROSS:
    5051                                panelCol.trimStack(2);
    5152                                break;
     
    6162                panelCol.setBounds(new Rectangle(0, 0, 72, 160));
    6263                add(panelCol);
    63                 add(getPatButton(noneButton, 76, 0, 27, 27, "NoPat", Pat.NONE));
     64                add(getPatButton(noneButton, 76, 0, 27, 27, "NoPat", Pat.NOPAT));
    6465                add(getPatButton(horizButton, 76, 26, 27, 27, "HorizPat", Pat.HORIZ));
    6566                add(getPatButton(vertButton, 76, 52, 27, 27, "VertPat", Pat.VERT));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPort.java

    r27219 r27230  
    4343                                        switch (dlg.panelMain.mark.getRegion()) {
    4444                                        case A:
    45                                                 dlg.panelMain.mark.setObjPattern(Pat.NONE);
     45                                                dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    4646                                                dlg.panelMain.mark.setObjColour(Col.RED);
    4747                                                break;
    4848                                        case B:
    49                                                 dlg.panelMain.mark.setObjPattern(Pat.NONE);
     49                                                dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    5050                                                dlg.panelMain.mark.setObjColour(Col.GREEN);
    5151                                                break;
     
    9393                add(getShapeButton(sparButton, 0, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYLAT));
    9494                add(getShapeButton(canButton, 0, 64, 34, 32, "Can", Shp.CAN, Obj.BOYLAT));
    95                 add(getShapeButton(sphereButton, 0, 96, 34, 32, "Sphere", Shp.SPHERE, Obj.BOYLAT));
     95                add(getShapeButton(sphereButton, 0, 96, 34, 32, "Sphere", Shp.SPHERI, Obj.BOYLAT));
    9696                add(getShapeButton(floatButton, 0, 128, 34, 32, "Float", Shp.FLOAT, Obj.FLTLAT));
    9797                add(getShapeButton(beaconButton, 35, 0, 34, 32, "Beacon", Shp.BEACON, Obj.BCNLAT));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelRadar.java

    r27219 r27230  
    8080                dlg = dia;
    8181                setLayout(null);
    82                 add(getRadButton(noRadButton, 0, 3, 27, 27, "NoRadar", Rtb.NONE));
     82                add(getRadButton(noRadButton, 0, 3, 27, 27, "NoRadar", Rtb.NORTB));
    8383                add(getRadButton(reflButton, 0, 33, 27, 27, "RadarReflector", Rtb.REFLECTOR));
    8484                add(getRadButton(ramarkButton, 0, 63, 27, 27, "Ramark", Rtb.RAMARK));
     
    145145
    146146        public void syncPanel() {
    147                 boolean rad = ((dlg.panelMain.mark.getRadar() != Rtb.NONE) && (dlg.panelMain.mark.getRadar() != Rtb.REFLECTOR));
     147                boolean rad = ((dlg.panelMain.mark.getRadar() != Rtb.NORTB) && (dlg.panelMain.mark.getRadar() != Rtb.REFLECTOR));
    148148                groupLabel.setVisible(rad);
    149149                groupBox.setVisible(rad);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSaw.java

    r27219 r27230  
    5050                add(getShapeButton(pillarButton, 0, 0, 34, 32, "Pillar", Shp.PILLAR, Obj.BOYSAW));
    5151                add(getShapeButton(sparButton, 0, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYSAW));
    52                 add(getShapeButton(sphereButton, 0, 64, 34, 32, "Sphere", Shp.SPHERE, Obj.BOYSAW));
     52                add(getShapeButton(sphereButton, 0, 64, 34, 32, "Sphere", Shp.SPHERI, Obj.BOYSAW));
    5353                add(getShapeButton(floatButton, 0, 96, 34, 32, "Float", Shp.FLOAT, Obj.FLTSAW));
    5454                add(getShapeButton(beaconButton, 0, 128, 34, 32, "Beacon", Shp.BEACON, Obj.BCNSAW));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java

    r27223 r27230  
    7676                TableColumn colColumn = table.getColumnModel().getColumn(1);
    7777                colourBox = new JComboBox();
    78                 addColItem(new ImageIcon(getClass().getResource("/images/DelButton.png")), Col.UNKNOWN);
     78                addColItem(new ImageIcon(getClass().getResource("/images/DelButton.png")), Col.UNKCOL);
    7979                addColItem(new ImageIcon(getClass().getResource("/images/WhiteButton.png")), Col.WHITE);
    8080                addColItem(new ImageIcon(getClass().getResource("/images/RedButton.png")), Col.RED);
     
    8989                TableColumn visColumn = table.getColumnModel().getColumn(12);
    9090                visibilityBox = new JComboBox();
    91                 addVisibItem("", Vis.UNKNOWN);
     91                addVisibItem("", Vis.UNKVIS);
    9292                addVisibItem(Messages.getString("Intensified"), Vis.INTEN);
    9393                addVisibItem(Messages.getString("Unintensified"), Vis.UNINTEN);
     
    9797                TableColumn exhColumn = table.getColumnModel().getColumn(13);
    9898                exhibitionBox = new JComboBox();
    99                 addExhibItem("", Exh.UNKNOWN);
     99                addExhibItem("", Exh.UNKEXH);
    100100                addExhibItem(Messages.getString("24h"), Exh.H24);
    101101                addExhibItem(Messages.getString("Day"), Exh.DAY);
     
    154154                        case 1:
    155155                                if (((String)dlg.panelMain.mark.getLightAtt(Att.CHR, row)).contains("Al")) {
    156                                         if (dlg.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKNOWN) {
    157                                                 return Col.UNKNOWN;
     156                                        if (dlg.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKCOL) {
     157                                                return Col.UNKCOL;
    158158                                        } else {
    159159                                                return dlg.panelMain.mark.getLightAtt(Att.ALT, row);
     
    186186                                        if (img == value)
    187187                                                if (((String)dlg.panelMain.mark.getLightAtt(Att.CHR, row)).contains("Al")) {
    188                                                         if (((colour == Col.UNKNOWN) && (dlg.panelMain.mark.getLightAtt(Att.ALT, row) == Col.UNKNOWN))
    189                                                                         || (dlg.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKNOWN)) {
     188                                                        if (((colour == Col.UNKCOL) && (dlg.panelMain.mark.getLightAtt(Att.ALT, row) == Col.UNKCOL))
     189                                                                        || (dlg.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKCOL)) {
    190190                                                                dlg.panelMain.mark.setLightAtt(Att.COL, row, colour);
    191191                                                        } else {
     
    209209                                        dlg.panelMain.mark.setLightAtt(Att.END, row, "");
    210210                                } else {
    211                                         dlg.panelMain.mark.setLightAtt(Att.LIT, row, Lit.UNKNOWN);
     211                                        dlg.panelMain.mark.setLightAtt(Att.LIT, row, Lit.UNKLIT);
    212212                                        dlg.panelMain.mark.setLightAtt(Att.ORT, row, "");
    213213                                }
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java

    r27219 r27230  
    5050                                        dlg.panelMain.mark.setObject(objects.get(shp));
    5151                                        if (button == cairnButton) {
    52                                                 dlg.panelMain.mark.setObjPattern(Pat.NONE);
    53                                                 dlg.panelMain.mark.setObjColour(Col.UNKNOWN);
     52                                                dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
     53                                                dlg.panelMain.mark.setObjColour(Col.UNKCOL);
    5454                                        }
    55                                         if (dlg.panelMain.mark.getObjColour(0) == Col.UNKNOWN) {
    56                                                 dlg.panelMain.mark.setObjPattern(Pat.NONE);
     55                                        if (dlg.panelMain.mark.getObjColour(0) == Col.UNKCOL) {
     56                                                dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    5757                                                dlg.panelMain.mark.setObjColour(Col.YELLOW);
    5858                                        }
     
    7070                        if (topmarkButton.isSelected()) {
    7171                                dlg.panelMain.mark.setTopmark(Top.X_SHAPE);
    72                                 dlg.panelMain.mark.setTopPattern(Pat.NONE);
     72                                dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    7373                                dlg.panelMain.mark.setTopColour(Col.YELLOW);
    7474                                topmarkButton.setBorderPainted(true);
    7575                        } else {
    76                                 dlg.panelMain.mark.setTopmark(Top.NONE);
    77                                 dlg.panelMain.mark.setTopPattern(Pat.NONE);
    78                                 dlg.panelMain.mark.setTopColour(Col.UNKNOWN);
     76                                dlg.panelMain.mark.setTopmark(Top.NOTOP);
     77                                dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
     78                                dlg.panelMain.mark.setTopColour(Col.UNKCOL);
    7979                                topmarkButton.setBorderPainted(false);
    8080                        }
     
    8989                add(getShapeButton(sparButton, 34, 0, 34, 32, "Spar", Shp.SPAR, Obj.BOYSPP));
    9090                add(getShapeButton(canButton, 68, 0, 34, 32, "Can", Shp.CAN, Obj.BOYSPP));
    91                 add(getShapeButton(coneButton, 102, 0, 34, 32, "Cone", Shp.CONE, Obj.BOYSPP));
    92                 add(getShapeButton(sphereButton, 0, 32, 34, 32, "Sphere", Shp.SPHERE, Obj.BOYSPP));
     91                add(getShapeButton(coneButton, 102, 0, 34, 32, "Cone", Shp.CONI, Obj.BOYSPP));
     92                add(getShapeButton(sphereButton, 0, 32, 34, 32, "Sphere", Shp.SPHERI, Obj.BOYSPP));
    9393                add(getShapeButton(barrelButton, 34, 32, 34, 32, "Barrel", Shp.BARREL, Obj.BOYSPP));
    9494                add(getShapeButton(superButton, 68, 32, 34, 32, "Super", Shp.SUPER, Obj.BOYSPP));
     
    106106                add(categoryBox);
    107107                categoryBox.addActionListener(alCategoryBox);
    108                 addCatItem("", Cat.NONE);
     108                addCatItem("", Cat.NOCAT);
    109109                addCatItem(Messages.getString("UKPurpose"), Cat.SPM_UNKN);
    110110                addCatItem(Messages.getString("Warning"), Cat.SPM_WARN);
     
    144144                                categoryBox.setSelectedIndex(item);
    145145                }
    146                 topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NONE);
    147                 topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NONE);
     146                topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
     147                topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
    148148                topmarkButton.setVisible(dlg.panelMain.mark.testValid());
    149149        }
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelStbd.java

    r27219 r27230  
    4343                                        switch (dlg.panelMain.mark.getRegion()) {
    4444                                        case A:
    45                                                 dlg.panelMain.mark.setObjPattern(Pat.NONE);
     45                                                dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    4646                                                dlg.panelMain.mark.setObjColour(Col.GREEN);
    4747                                                break;
    4848                                        case B:
    49                                                 dlg.panelMain.mark.setObjPattern(Pat.NONE);
     49                                                dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    5050                                                dlg.panelMain.mark.setObjColour(Col.RED);
    5151                                                break;
     
    9292                add(getShapeButton(pillarButton, 0, 0, 34, 32, "Pillar", Shp.PILLAR, Obj.BOYLAT));
    9393                add(getShapeButton(sparButton, 0, 32, 34, 32, "Spar", Shp.SPAR, Obj.BOYLAT));
    94                 add(getShapeButton(coneButton, 0, 64, 34, 32, "Cone", Shp.CONE, Obj.BOYLAT));
    95                 add(getShapeButton(sphereButton, 0, 96, 34, 32, "Sphere", Shp.SPHERE, Obj.BOYLAT));
     94                add(getShapeButton(coneButton, 0, 64, 34, 32, "Cone", Shp.CONI, Obj.BOYLAT));
     95                add(getShapeButton(sphereButton, 0, 96, 34, 32, "Sphere", Shp.SPHERI, Obj.BOYLAT));
    9696                add(getShapeButton(floatButton, 0, 128, 34, 32, "Float", Shp.FLOAT, Obj.FLTLAT));
    9797                add(getShapeButton(beaconButton, 35, 0, 34, 32, "Beacon", Shp.BEACON, Obj.BCNLAT));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelTop.java

    r27219 r27230  
    5454                panelPat.setBounds(new Rectangle(160, 0, 110, 160));
    5555                add(panelPat);
    56                 add(getTopButton(noTopButton, 0, 5, 27, 27, "NoTop", Top.NONE));
     56                add(getTopButton(noTopButton, 0, 5, 27, 27, "NoTop", Top.NOTOP));
    5757                add(getTopButton(canTopButton, 30, 5, 27, 27, "CanTop", Top.CAN));
    5858                add(getTopButton(coneTopButton, 60, 5, 27, 27, "ConeTop", Top.CONE));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java

    r27223 r27230  
    6161
    6262        public enum Obj {
    63                 UNKNOWN, BCNCAR, BCNISD, BCNLAT, BCNSAW, BCNSPP,
     63                UNKOBJ, BCNCAR, BCNISD, BCNLAT, BCNSAW, BCNSPP,
    6464                BOYCAR, BOYISD, BOYLAT, BOYSAW, BOYSPP,
    6565                FLTCAR, FLTISD, FLTLAT, FLTSAW, FLTSPP,
     
    9696        }
    9797
    98         private Obj object = Obj.UNKNOWN;
     98        private Obj object = Obj.UNKOBJ;
    9999
    100100        public Obj getObject() {
     
    104104        public void setObject(Obj obj) {
    105105                object = obj;
    106                 if (obj == Obj.UNKNOWN) {
    107                         setCategory(Cat.NONE);
    108                         setShape(Shp.UNKNOWN);
    109                         setColour(Ent.BODY, Col.UNKNOWN);
    110                         setPattern(Ent.BODY, Pat.NONE);
    111                         setTopmark(Top.NONE);
    112                         setColour(Ent.TOPMARK, Col.UNKNOWN);
    113                         setPattern(Ent.TOPMARK, Pat.NONE);
    114                         setFogSound(Fog.NONE);
    115                         setRadar(Rtb.NONE);
    116                         setStatus(Sts.UNKNOWN);
    117                         setConstr(Cns.UNKNOWN);
    118                         setConsp(Con.UNKNOWN);
    119                         setRefl(Con.UNKNOWN);
     106                if (obj == Obj.UNKOBJ) {
     107                        setCategory(Cat.NOCAT);
     108                        setShape(Shp.UNKSHP);
     109                        setColour(Ent.BODY, Col.UNKCOL);
     110                        setPattern(Ent.BODY, Pat.NOPAT);
     111                        setTopmark(Top.NOTOP);
     112                        setColour(Ent.TOPMARK, Col.UNKCOL);
     113                        setPattern(Ent.TOPMARK, Pat.NOPAT);
     114                        setFogSound(Fog.NOFOG);
     115                        setRadar(Rtb.NORTB);
     116                        setStatus(Sts.UNKSTS);
     117                        setConstr(Cns.UNKCNS);
     118                        setConsp(Con.UNKCON);
     119                        setRefl(Con.UNKCON);
    120120                        setRef("");
    121121                        setObjectHeight("");
     
    129129
    130130        public enum Ent {
    131                 BODY, BUOY, BEACON, FLOAT, TOPMARK, LIGHT, MOORING, STATION
     131                BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION
    132132        }
    133133
     
    146146                EntMAP.put(Obj.LITMAJ, Ent.LIGHT);
    147147                EntMAP.put(Obj.LITMIN, Ent.LIGHT);
    148                 EntMAP.put(Obj.LITFLT, Ent.FLOAT);
    149                 EntMAP.put(Obj.FLTCAR, Ent.FLOAT);
    150                 EntMAP.put(Obj.FLTLAT, Ent.FLOAT);
    151                 EntMAP.put(Obj.FLTSAW, Ent.FLOAT);
    152                 EntMAP.put(Obj.FLTISD, Ent.FLOAT);
    153                 EntMAP.put(Obj.FLTSPP, Ent.FLOAT);
    154                 EntMAP.put(Obj.LITVES, Ent.FLOAT);
     148                EntMAP.put(Obj.LITFLT, Ent.LFLOAT);
     149                EntMAP.put(Obj.FLTCAR, Ent.LFLOAT);
     150                EntMAP.put(Obj.FLTLAT, Ent.LFLOAT);
     151                EntMAP.put(Obj.FLTSAW, Ent.LFLOAT);
     152                EntMAP.put(Obj.FLTISD, Ent.LFLOAT);
     153                EntMAP.put(Obj.FLTSPP, Ent.LFLOAT);
     154                EntMAP.put(Obj.LITVES, Ent.LFLOAT);
    155155                EntMAP.put(Obj.LITHSE, Ent.LIGHT);
    156156                EntMAP.put(Obj.LNDMRK, Ent.LIGHT);
     
    161161
    162162        public enum Grp {
    163                 NUL, LAT, CAR, SAW, ISD, SPP, LIT, SIS
     163                NUL, LAT, CAR, SAW, ISD, SPP, LGT, SIS
    164164        }
    165165
    166166        public static final EnumMap<Obj, Grp> GrpMAP = new EnumMap<Obj, Grp>(Obj.class);
    167167        static {
    168                 GrpMAP.put(Obj.UNKNOWN, Grp.NUL);
     168                GrpMAP.put(Obj.UNKOBJ, Grp.NUL);
    169169                GrpMAP.put(Obj.BCNCAR, Grp.CAR);
    170170                GrpMAP.put(Obj.BCNISD, Grp.ISD);
     
    182182                GrpMAP.put(Obj.FLTISD, Grp.ISD);
    183183                GrpMAP.put(Obj.FLTSPP, Grp.SPP);
    184                 GrpMAP.put(Obj.LITFLT, Grp.LIT);
    185                 GrpMAP.put(Obj.LITMAJ, Grp.LIT);
    186                 GrpMAP.put(Obj.LITMIN, Grp.LIT);
    187                 GrpMAP.put(Obj.LITVES, Grp.LIT);
    188                 GrpMAP.put(Obj.LITHSE, Grp.LIT);
    189                 GrpMAP.put(Obj.LNDMRK, Grp.LIT);
     184                GrpMAP.put(Obj.LITFLT, Grp.LGT);
     185                GrpMAP.put(Obj.LITMAJ, Grp.LGT);
     186                GrpMAP.put(Obj.LITMIN, Grp.LGT);
     187                GrpMAP.put(Obj.LITVES, Grp.LGT);
     188                GrpMAP.put(Obj.LITHSE, Grp.LGT);
     189                GrpMAP.put(Obj.LNDMRK, Grp.LGT);
    190190                GrpMAP.put(Obj.MORFAC, Grp.SPP);
    191191                GrpMAP.put(Obj.SISTAW, Grp.SIS);
     
    194194
    195195        public enum Cat {
    196                 NONE, LAM_PORT, LAM_STBD, LAM_PPORT, LAM_PSTBD, CAM_NORTH, CAM_EAST, CAM_SOUTH, CAM_WEST,
     196                NOCAT, LAM_PORT, LAM_STBD, LAM_PPORT, LAM_PSTBD, CAM_NORTH, CAM_EAST, CAM_SOUTH, CAM_WEST,
    197197                ACH_URST, ACH_DEEP, ACH_TANK, ACH_EXPL, ACH_QUAR, ACH_SPLN, ACH_SCAN, ACH_SCMO, ACH_T24H, ACH_TLIM,
    198198                SPM_UNKN, SPM_WARN, SPM_CHBF, SPM_YCHT, SPM_CABL, SPM_OFAL, SPM_ODAS, SPM_RECN, SPM_MOOR, SPM_LNBY,
     
    287287        }
    288288
    289         private Cat category = Cat.NONE;
     289        private Cat category = Cat.NOCAT;
    290290
    291291        public Cat getCategory() {
     
    299299
    300300        public enum Shp {
    301                 UNKNOWN, PILLAR, SPAR, CAN, CONE, SPHERE, BARREL, FLOAT, SUPER, BUOYANT, CAIRN, PILE, LATTICE, TOWER, STAKE, POLE, POST, PERCH, BUOY, BEACON
     301                UNKSHP, PILLAR, SPAR, CAN, CONI, SPHERI, BARREL, FLOAT, SUPER, BUOYANT, CAIRN, PILE, LATTICE, TOWER, STAKE, POLE, POST, PERCH, BUOY, BEACON
    302302        }
    303303
     
    307307                ShpSTR.put(Shp.SPAR, "spar");
    308308                ShpSTR.put(Shp.CAN, "can");
    309                 ShpSTR.put(Shp.CONE, "conical");
    310                 ShpSTR.put(Shp.SPHERE, "spherical");
     309                ShpSTR.put(Shp.CONI, "conical");
     310                ShpSTR.put(Shp.SPHERI, "spherical");
    311311                ShpSTR.put(Shp.BARREL, "barrel");
    312312                ShpSTR.put(Shp.FLOAT, "float");
     
    321321        }
    322322
    323         private Shp shape = Shp.UNKNOWN;
     323        private Shp shape = Shp.UNKSHP;
    324324
    325325        public Shp getShape() {
     
    333333
    334334        public enum Col {
    335                 UNKNOWN, BLANK, WHITE, RED, ORANGE, AMBER, YELLOW, GREEN, BLUE, VIOLET, BLACK, GREY, BROWN, MAGENTA, PINK
     335                UNKCOL, BLANK, WHITE, RED, ORANGE, AMBER, YELLOW, GREEN, BLUE, VIOLET, BLACK, GREY, BROWN, MAGENTA, PINK
    336336        }
    337337
    338338        public static final EnumMap<Col, Color> ColMAP = new EnumMap<Col, Color>(Col.class);
    339339        static {
    340                 ColMAP.put(Col.UNKNOWN, new Color(0xc0c0c0));
     340                ColMAP.put(Col.UNKCOL, new Color(0xc0c0c0));
    341341                ColMAP.put(Col.WHITE, Color.WHITE);
    342342                ColMAP.put(Col.RED, Color.RED);
     
    412412                        return bodyColour.get(i);
    413413                else
    414                         return Col.UNKNOWN;
     414                        return Col.UNKCOL;
    415415        }
    416416
     
    430430                if (bodyColour.size() >= i)
    431431                        bodyColour.add(i, col);
     432                repaint();
    432433        }
    433434
    434435        public void addObjColour(Col col) {
    435436                bodyColour.add(col);
     437                repaint();
    436438        }
    437439
     
    439441                if (bodyColour.size() > i)
    440442                        bodyColour.remove(i);
     443                repaint();
    441444        }
    442445
     
    447450                        return topmarkColour.get(i);
    448451                else
    449                         return Col.UNKNOWN;
     452                        return Col.UNKCOL;
    450453        }
    451454
     
    465468                if (topmarkColour.size() >= i)
    466469                        topmarkColour.add(i, col);
     470                repaint();
    467471        }
    468472
    469473        public void addTopColour(Col col) {
    470474                topmarkColour.add(col);
     475                repaint();
    471476        }
    472477
     
    474479                if (topmarkColour.size() > i)
    475480                        topmarkColour.remove(i);
     481                repaint();
    476482        }
    477483
    478484        public enum Chr {
    479                 UNKNOWN, FIXED, FLASH, LFLASH, QUICK, VQUICK, UQUICK, ISOPHASED, OCCULTING, MORSE, ALTERNATING, IQUICK, IVQUICK, IUQUICK
     485                UNKCHR, FIXED, FLASH, LFLASH, QUICK, VQUICK, UQUICK, ISOPHASED, OCCULTING, MORSE, ALTERNATING, IQUICK, IVQUICK, IUQUICK
    480486        }
    481487
    482488        public static final Map<EnumSet<Chr>, String> ChrMAP = new HashMap<EnumSet<Chr>, String>();
    483489        static {
    484                 ChrMAP.put(EnumSet.of(Chr.UNKNOWN), "");
    485490                ChrMAP.put(EnumSet.of(Chr.FIXED), "F");
    486491                ChrMAP.put(EnumSet.of(Chr.FLASH), "Fl");
     
    512517
    513518        public enum Vis {
    514                 UNKNOWN, HIGH, LOW, FAINT, INTEN, UNINTEN, REST, OBS, PARTOBS
     519                UNKVIS, HIGH, LOW, FAINT, INTEN, UNINTEN, REST, OBS, PARTOBS
    515520        }
    516521
    517522        public static final EnumMap<Vis, String> VisSTR = new EnumMap<Vis, String>(Vis.class);
    518523        static {
    519                 VisSTR.put(Vis.UNKNOWN, "");
    520524                VisSTR.put(Vis.HIGH, "high");
    521525                VisSTR.put(Vis.LOW, "low");
     
    529533
    530534        public enum Lit {
    531                 UNKNOWN, VERT, HORIZ, DIR, UPPER, LOWER, LEAD, REAR, FRONT, AERO, AIROBS, FOGDET, FLOOD, STRIP, SUBS, SPOT, MOIRE, EMERG, BEAR
     535                UNKLIT, VERT, HORIZ, DIR, UPPER, LOWER, LEAD, REAR, FRONT, AERO, AIROBS, FOGDET, FLOOD, STRIP, SUBS, SPOT, MOIRE, EMERG, BEAR
    532536        }
    533537
    534538        public static final EnumMap<Lit, String> LitSTR = new EnumMap<Lit, String>(Lit.class);
    535539        static {
    536                 LitSTR.put(Lit.UNKNOWN, "");
    537540                LitSTR.put(Lit.VERT, "vertical");
    538541                LitSTR.put(Lit.HORIZ, "horizontal");
     
    556559
    557560        public enum Exh {
    558                 UNKNOWN, H24, DAY, NIGHT, FOG, WARN, STORM
     561                UNKEXH, H24, DAY, NIGHT, FOG, WARN, STORM
    559562        }
    560563
    561564        public static final EnumMap<Exh, String> ExhSTR = new EnumMap<Exh, String>(Exh.class);
    562565        static {
    563                 ExhSTR.put(Exh.UNKNOWN, "");
    564566                ExhSTR.put(Exh.H24, "24h");
    565567                ExhSTR.put(Exh.DAY, "day");
     
    574576        }
    575577
    576         public Object[] sector = { Col.UNKNOWN, "", "", "", "", Lit.UNKNOWN, "", "",
    577                         "", "", "", Vis.UNKNOWN, Exh.UNKNOWN, "", "", Col.UNKNOWN };
     578        public Object[] sector = { Col.UNKCOL, "", "", "", "", Lit.UNKLIT, "", "",
     579                        "", "", "", Vis.UNKVIS, Exh.UNKEXH, "", "", Col.UNKCOL };
    578580
    579581        private ArrayList<Object[]> sectors = new ArrayList<Object[]>();
     
    608610                        switch (att) {
    609611                        case 4:
    610                         case 8:
    611612                        case 9:
    612613                        case 10:
     
    653654
    654655        public enum Pat {
    655                 NONE, HORIZ, VERT, DIAG, SQUARE, BORDER
     656                NOPAT, HORIZ, VERT, DIAG, SQUARE, BORDER, CROSS
    656657        }
    657658
     
    663664                PatSTR.put(Pat.SQUARE, "squared");
    664665                PatSTR.put(Pat.BORDER, "border");
     666                PatSTR.put(Pat.CROSS, "cross");
    665667        }
    666668
     
    679681        }
    680682
    681         private Pat bodyPattern = Pat.NONE;
     683        private Pat bodyPattern = Pat.NOPAT;
    682684
    683685        public Pat getObjPattern() {
     
    689691        }
    690692
    691         private Pat topPattern = Pat.NONE;
     693        private Pat topPattern = Pat.NOPAT;
    692694
    693695        public Pat getTopPattern() {
     
    700702
    701703        public enum Top {
    702                 NONE, CAN, CONE, SPHERE, X_SHAPE, NORTH, SOUTH, EAST, WEST, SPHERES2, BOARD, DIAMOND, CIRCLE, TRIANGLE, TRIANGLE_INV, SQUARE
     704                NOTOP, CAN, CONE, SPHERE, X_SHAPE, NORTH, SOUTH, EAST, WEST, SPHERES2, BOARD, DIAMOND, CIRCLE, TRIANGLE, TRIANGLE_INV, SQUARE
    703705        }
    704706
     
    722724        }
    723725
    724         private Top topShape = Top.NONE;
     726        private Top topShape = Top.NOTOP;
    725727
    726728        public Top getTopmark() {
     
    734736
    735737        public enum Rtb {
    736                 NONE, REFLECTOR, RACON, RAMARK, LEADING
     738                NORTB, REFLECTOR, RACON, RAMARK, LEADING
    737739        }
    738740
     
    744746        }
    745747
    746         private Rtb RaType = Rtb.NONE;
     748        private Rtb RaType = Rtb.NORTB;
    747749
    748750        public Rtb getRadar() {
     
    752754        public void setRadar(Rtb type) {
    753755                RaType = type;
    754                 if (type == Rtb.NONE) {
     756                if (type == Rtb.NORTB) {
    755757                        setRaconGroup("");
    756758                        setRaconSequence("");
     
    830832
    831833        public enum Fog {
    832                 NONE, UNKNOWN, HORN, SIREN, DIA, BELL, WHIS, GONG, EXPLOS
     834                NOFOG, FOGSIG, HORN, SIREN, DIA, BELL, WHIS, GONG, EXPLOS
    833835        }
    834836
    835837        public static final EnumMap<Fog, String> FogSTR = new EnumMap<Fog, String>(Fog.class);
    836838        static {
    837                 FogSTR.put(Fog.UNKNOWN, "yes");
     839                FogSTR.put(Fog.FOGSIG, "yes");
    838840                FogSTR.put(Fog.HORN, "horn");
    839841                FogSTR.put(Fog.SIREN, "siren");
     
    845847        }
    846848
    847         private Fog fogSound = Fog.NONE;
     849        private Fog fogSound = Fog.NOFOG;
    848850
    849851        public Fog getFogSound() {
     
    853855        public void setFogSound(Fog sound) {
    854856                fogSound = sound;
    855                 if (sound == Fog.NONE) {
     857                if (sound == Fog.NOFOG) {
    856858                        setFogGroup("");
    857859                        setFogSequence("");
     
    907909
    908910        public enum Sts {
    909                 UNKNOWN, PERM, OCC, REC, NIU, INT, RESV, TEMP, PRIV, MAND, DEST, EXT, ILLUM, HIST, PUB, SYNC, WATCH, UNWAT, DOUBT
     911                UNKSTS, PERM, OCC, REC, NIU, INT, RESV, TEMP, PRIV, MAND, DEST, EXT, ILLUM, HIST, PUB, SYNC, WATCH, UNWAT, DOUBT
    910912        }
    911913
     
    932934        }
    933935
    934         private Sts status = Sts.UNKNOWN;
     936        private Sts status = Sts.UNKSTS;
    935937
    936938        public Sts getStatus() {
     
    943945
    944946        public enum Cns {
    945                 UNKNOWN, BRICK, CONC, BOULD, HSURF, USURF, WOOD, METAL, GRP, PAINT
     947                UNKCNS, BRICK, CONC, BOULD, HSURF, USURF, WOOD, METAL, GRP, PAINT
    946948        }
    947949
     
    959961        }
    960962
    961         private Cns construction = Cns.UNKNOWN;
     963        private Cns construction = Cns.UNKCNS;
    962964
    963965        public Cns getConstr() {
     
    970972
    971973        public enum Con {
    972                 UNKNOWN, CONSP, NCONS, REFL
     974                UNKCON, CONSP, NCONS, REFL
    973975        }
    974976
     
    980982        }
    981983
    982         private Con conspicuity = Con.UNKNOWN;
     984        private Con conspicuity = Con.UNKCON;
    983985
    984986        public Con getConsp() {
     
    990992        }
    991993
    992         private Con reflectivity = Con.UNKNOWN;
     994        private Con reflectivity = Con.UNKCON;
    993995
    994996        public Con getRefl() {
     
    10781080                case BOYCAR:
    10791081                case BOYLAT:
    1080                         if ((getCategory() != Cat.NONE) && (getShape() != Shp.UNKNOWN))
     1082                        if ((getCategory() != Cat.NOCAT) && (getShape() != Shp.UNKSHP))
    10811083                                tmp = true;
    10821084                        break;
     
    10871089                case BOYSAW:
    10881090                case BOYSPP:
    1089                         if (getShape() != Shp.UNKNOWN)
     1091                        if (getShape() != Shp.UNKSHP)
    10901092                                tmp = true;
    10911093                        break;
     
    10951097                case FLTSAW:
    10961098                case FLTSPP:
    1097                         if (getObjColour(0) != Col.UNKNOWN)
     1099                        if (getObjColour(0) != Col.UNKCOL)
    10981100                                tmp = true;
    10991101                        break;
     
    11091111                        break;
    11101112                case LNDMRK:
    1111                         if (getCategory() != Cat.NONE)
     1113                        if (getCategory() != Cat.NOCAT)
    11121114                                tmp = true;
    11131115                        break;
     
    11181120                        Ent ent = EntMAP.get(getObject());
    11191121                        dlg.panelMain.topButton.setEnabled((ent == Ent.BUOY)
    1120                                         || (ent == Ent.BEACON) || (ent == Ent.FLOAT));
     1122                                        || (ent == Ent.BEACON) || (ent == Ent.LFLOAT));
    11211123                        dlg.panelMain.fogButton.setEnabled(true);
    11221124                        dlg.panelMain.radButton.setEnabled(true);
     
    11361138
    11371139        public void clearSign() {
    1138                 setObject(Obj.UNKNOWN);
     1140                setObject(Obj.UNKOBJ);
    11391141                setName("");
    11401142                clrLight();
     
    11811183                        str = keys.get("seamark:type");
    11821184
    1183                 setObject(Obj.UNKNOWN);
     1185                setObject(Obj.UNKOBJ);
    11841186                for (Obj obj : ObjSTR.keySet()) {
    11851187                        if (ObjSTR.get(obj).equals(str)) {
     
    11911193                        dlg.manager.showVisualMessage("No seamark");
    11921194                }
    1193                 if (getObject() == Obj.UNKNOWN) {
     1195                if (getObject() == Obj.UNKOBJ) {
    11941196                        dlg.manager.showVisualMessage("Seamark not recognised");
    11951197                }
     
    12131215                }
    12141216               
    1215                
    12161217                if (keys.containsKey("seamark:longname"))
    12171218                        longName = keys.get("seamark:longname");
     
    12221223                        if (keys.containsKey("seamark:" + ObjSTR.get(obj) + ":category")) {
    12231224                                str = keys.get("seamark:" + ObjSTR.get(obj) + ":category");
    1224                                 setCategory(Cat.NONE);
     1225                                setCategory(Cat.NOCAT);
    12251226                                for (Cat cat : CatSTR.keySet()) {
    12261227                                        if (CatSTR.get(cat).equals(str)) {
     
    12341235                        if (keys.containsKey("seamark:" + ObjSTR.get(obj) + ":shape")) {
    12351236                                str = keys.get("seamark:" + ObjSTR.get(obj) + ":shape");
    1236                                 setShape(Shp.UNKNOWN);
     1237                                setShape(Shp.UNKSHP);
    12371238                                for (Shp shp : ShpSTR.keySet()) {
    12381239                                        if (ShpSTR.get(shp).equals(str)) {
     
    12421243                        }
    12431244                }
    1244                 if (getShape() == Shp.UNKNOWN) {
     1245                if (getShape() == Shp.UNKSHP) {
    12451246                        if (EntMAP.get(getObject()) == Ent.BUOY)
    12461247                                setShape(Shp.BUOY);
    12471248                        if (EntMAP.get(getObject()) == Ent.BEACON)
    12481249                                setShape(Shp.BEACON);
    1249                         if (EntMAP.get(getObject()) == Ent.FLOAT)
     1250                        if (EntMAP.get(getObject()) == Ent.LFLOAT)
    12501251                                if (getObject() == Obj.LITVES)
    12511252                                        setShape(Shp.SUPER);
     
    12711272                        if (keys.containsKey("seamark:" + ObjSTR.get(obj) + ":colour_pattern")) {
    12721273                                str = keys.get("seamark:" + ObjSTR.get(obj) + ":colour_pattern");
    1273                                 setObjPattern(Pat.NONE);
     1274                                setObjPattern(Pat.NOPAT);
    12741275                                for (Pat pat : PatSTR.keySet()) {
    12751276                                        if (PatSTR.get(pat).equals(str)) {
     
    12871288                }
    12881289
    1289                 if ((getObject() == Obj.LNDMRK) && (getCategory() == Cat.NONE)) {
     1290                if ((getObject() == Obj.LNDMRK) && (getCategory() == Cat.NOCAT)) {
    12901291                        setObject(Obj.LITHSE);
    12911292                }
     
    12941295                        switch (getObjColour(0)) {
    12951296                        case RED:
    1296                                 if ((getObjColour(1) == Col.WHITE) && (getObjColour(2) == Col.UNKNOWN)) {
     1297                                if ((getObjColour(1) == Col.WHITE) && (getObjColour(2) == Col.UNKCOL)) {
    12971298                                        setObject(Obj.FLTSAW);
    1298                                         setCategory(Cat.NONE);
    1299                                 } else if (getObjColour(1) == Col.UNKNOWN) {
     1299                                        setCategory(Cat.NOCAT);
     1300                                } else if (getObjColour(1) == Col.UNKCOL) {
    13001301                                        setObject(Obj.FLTLAT);
    13011302                                        if (getRegion() == Reg.B) {
     
    13181319                                } else {
    13191320                                        setObject(Obj.FLTSPP);
    1320                                         setCategory(Cat.NONE);
     1321                                        setCategory(Cat.NOCAT);
    13211322                                }
    13221323                                break;
    13231324                        case GREEN:
    1324                                 if (getObjColour(1) == Col.UNKNOWN) {
     1325                                if (getObjColour(1) == Col.UNKCOL) {
    13251326                                        setObject(Obj.FLTLAT);
    13261327                                        if (getRegion() == Reg.B) {
     
    13431344                                } else {
    13441345                                        setObject(Obj.FLTSPP);
    1345                                         setCategory(Cat.NONE);
     1346                                        setCategory(Cat.NOCAT);
    13461347                                }
    13471348                                break;
     
    13561357                                } else {
    13571358                                        setObject(Obj.FLTSPP);
    1358                                         setCategory(Cat.NONE);
     1359                                        setCategory(Cat.NOCAT);
    13591360                                }
    13601361                                break;
     
    13621363                                if (getObjColour(1) == Col.RED) {
    13631364                                        setObject(Obj.FLTISD);
    1364                                         setCategory(Cat.NONE);
     1365                                        setCategory(Cat.NOCAT);
    13651366                                } else if (getObjColour(1) == Col.YELLOW) {
    13661367                                        setObject(Obj.FLTCAR);
     
    13721373                                } else {
    13731374                                        setObject(Obj.FLTSPP);
    1374                                         setCategory(Cat.NONE);
     1375                                        setCategory(Cat.NOCAT);
    13751376                                }
    13761377                                break;
    13771378                        default:
    1378                                 setCategory(Cat.NONE);
     1379                                setCategory(Cat.NOCAT);
    13791380                        }
    13801381                }
     
    14371438                if (keys.containsKey("seamark:topmark:shape")) {
    14381439                        str = keys.get("seamark:topmark:shape");
    1439                         setTopmark(Top.NONE);
     1440                        setTopmark(Top.NOTOP);
    14401441                        for (Top top : TopSTR.keySet()) {
    14411442                                if (TopSTR.get(top).equals(str)) {
     
    14461447                if (keys.containsKey("seamark:topmark:colour")) {
    14471448                        str = keys.get("seamark:topmark:colour");
    1448                         setTopColour(Col.UNKNOWN);
     1449                        setTopColour(Col.UNKCOL);
    14491450                        for (Col col : ColSTR.keySet()) {
    14501451                                if (ColSTR.get(col).equals(str)) {
     
    14551456                if (keys.containsKey("seamark:topmark:colour_pattern")) {
    14561457                        str = keys.get("seamark:topmark:colour_pattern");
    1457                         setTopPattern(Pat.NONE);
     1458                        setTopPattern(Pat.NOPAT);
    14581459                        for (Pat pat : PatSTR.keySet()) {
    14591460                                if (PatSTR.get(pat).equals(str)) {
     
    15331534
    15341535                if (keys.containsKey("seamark:fog_signal")) {
    1535                         setFogSound(Fog.UNKNOWN);
     1536                        setFogSound(Fog.FOGSIG);
    15361537                }
    15371538                if (keys.containsKey("seamark:fog_signal:category")) {
    15381539                        str = keys.get("seamark:fog_signal:category");
    1539                         setFogSound(Fog.NONE);
     1540                        setFogSound(Fog.NOFOG);
    15401541                        for (Fog fog : FogSTR.keySet()) {
    15411542                                if (FogSTR.get(fog).equals(str)) {
     
    15621563                if (keys.containsKey("seamark:radar_transponder:category")) {
    15631564                        str = keys.get("seamark:radar_transponder:category");
    1564                         setRadar(Rtb.NONE);
     1565                        setRadar(Rtb.NORTB);
    15651566                        for (Rtb rtb : RtbSTR.keySet()) {
    15661567                                if (RtbSTR.get(rtb).equals(str)) {
     
    16021603                if (keys.containsKey("seamark:status")) {
    16031604                        str = keys.get("seamark:status");
    1604                         setStatus(Sts.UNKNOWN);
     1605                        setStatus(Sts.UNKSTS);
    16051606                        for (Sts sts : StsSTR.keySet()) {
    16061607                                if (StsSTR.get(sts).equals(str)) {
     
    16111612                if (keys.containsKey("seamark:construction")) {
    16121613                        str = keys.get("seamark:construction");
    1613                         setConstr(Cns.UNKNOWN);
     1614                        setConstr(Cns.UNKCNS);
    16141615                        for (Cns cns : CnsSTR.keySet()) {
    16151616                                if (CnsSTR.get(cns).equals(str)) {
     
    16201621                if (keys.containsKey("seamark:conspicuity")) {
    16211622                        str = keys.get("seamark:conspicuity");
    1622                         setConsp(Con.UNKNOWN);
     1623                        setConsp(Con.UNKCON);
    16231624                        for (Con con : ConSTR.keySet()) {
    16241625                                if (ConSTR.get(con).equals(str)) {
     
    16291630                if (keys.containsKey("seamark:reflectivity")) {
    16301631                        str = keys.get("seamark:reflectivity");
    1631                         setRefl(Con.UNKNOWN);
     1632                        setRefl(Con.UNKCON);
    16321633                        for (Con con : ConSTR.keySet()) {
    16331634                                if (ConSTR.get(con).equals(str)) {
     
    16661667                String lblStr;
    16671668                String imgStr = "/images/";
    1668                 if (getShape() != Shp.UNKNOWN) {
     1669                if (getShape() != Shp.UNKSHP) {
    16691670                        switch (getShape()) {
    16701671                        case TOWER:
     
    16811682                                imgStr += "Can";
    16821683                                break;
    1683                         case CONE:
     1684                        case CONI:
    16841685                                imgStr += "Cone";
    16851686                                break;
    1686                         case SPHERE:
     1687                        case SPHERI:
    16871688                                imgStr += "Sphere";
    16881689                                break;
     
    17911792                                }
    17921793                        }
    1793                 } else if (getObject() != Obj.UNKNOWN) {
     1794                } else if (getObject() != Obj.UNKOBJ) {
    17941795                        switch (getObject()) {
    17951796                        case LNDMRK:
     
    18591860                }
    18601861
    1861                 if (getTopmark() != Top.NONE) {
     1862                if (getTopmark() != Top.NOTOP) {
    18621863                        imgStr = "/images/Top_";
    18631864                        switch (getTopmark()) {
     
    19241925                        switch (getShape()) {
    19251926                        case CAN:
    1926                         case CONE:
    1927                         case SPHERE:
     1927                        case CONI:
     1928                        case SPHERI:
    19281929                        case BARREL:
    19291930                                imgStr += "_Buoy_Small";
     
    19721973            g2.setStroke(new BasicStroke(6.0f));
    19731974            if (!((String)getLightAtt(Att.BEG, i)).isEmpty() && !((String)getLightAtt(Att.END, i)).isEmpty()) {
    1974                                 if (getLightAtt(Att.COL, i) != Col.UNKNOWN) {
     1975                                if (getLightAtt(Att.COL, i) != Col.UNKCOL) {
    19751976                                        g2.setPaint(ColMAP.get(getLightAtt(Att.COL, i)));
    19761977                                        Double a0 = 270 - Double.parseDouble((String) getLightAtt(Att.BEG, i));
     
    19791980                                        g2.draw(new Arc2D.Double(12, 15, 140, 140, a0, da, Arc2D.OPEN));
    19801981                                }
    1981                                 if (getLightAtt(Att.ALT, i) != Col.UNKNOWN) {
     1982                                if (getLightAtt(Att.ALT, i) != Col.UNKCOL) {
    19821983                                        g2.setPaint(ColMAP.get(getLightAtt(Att.ALT, i)));
    19831984                                        Double a0 = 270 - Double.parseDouble((String) getLightAtt(Att.BEG, i));
     
    19891990                }
    19901991    g2.setPaint(Color.BLACK);
    1991                 if ((getLightAtt(Att.COL, 0) != Col.UNKNOWN) || !(((String)getLightAtt(Att.CHR, 0)).isEmpty())) {
     1992                if ((getLightAtt(Att.COL, 0) != Col.UNKCOL) || !(((String)getLightAtt(Att.CHR, 0)).isEmpty())) {
    19921993                        if (sectors.size() == 1) {
    19931994                                if (((String) getLightAtt(Att.CHR, 0)).contains("Al")) {
     
    20782079                        if (!tmp.isEmpty())
    20792080                                c = tmp + c;
    2080                         if (getLightAtt(Att.LIT, 0) != Lit.UNKNOWN) {
     2081                        if (getLightAtt(Att.LIT, 0) != Lit.UNKLIT) {
    20812082                                switch ((Lit)getLightAtt(Att.LIT, 0)) {
    20822083                                case VERT:
     
    20942095                }
    20952096
    2096                 if (getFogSound() != Fog.NONE) {
     2097                if (getFogSound() != Fog.NOFOG) {
    20972098                        g2.drawImage(new ImageIcon(getClass().getResource("/images/Fog_Signal.png")).getImage(), 7, -15, null);
    20982099                        String str = "";
    2099                         if (getFogSound() != Fog.UNKNOWN)
     2100                        if (getFogSound() != Fog.FOGSIG)
    21002101                                switch (getFogSound()) {
    21012102                                case HORN:
     
    21302131                }
    21312132
    2132                 if (RaType != Rtb.NONE) {
     2133                if (RaType != Rtb.NORTB) {
    21332134                        if (getRadar() == Rtb.REFLECTOR) {
    21342135                                g2.drawImage(new ImageIcon(getClass().getResource("/images/Radar_Reflector_355.png")).getImage(), 7, -15, null);
     
    21532154        public void saveSign(Node node) {
    21542155               
    2155                 if (getObject() != Obj.UNKNOWN) {
     2156                if (getObject() != Obj.UNKOBJ) {
    21562157
    21572158                        Main.pref.put("smedplugin.IALA", getRegion() == Reg.C ? "C" : (getRegion() == Reg.B ? "B" : "A"));
     
    21802181                                }
    21812182
    2182                                 if ((getObjColour(0) != Col.UNKNOWN) && getShape() != Shp.PERCH) {
     2183                                if ((getObjColour(0) != Col.UNKCOL) && getShape() != Shp.PERCH) {
    21832184                                        String str = ColSTR.get(getObjColour(0));
    21842185                                        for (int i = 1; bodyColour.size() > i; i++) {
     
    21882189                                }
    21892190
    2190                                 if (getObjPattern() != Pat.NONE) {
     2191                                if (getObjPattern() != Pat.NOPAT) {
    21912192                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:" + objStr + ":colour_pattern", PatSTR.get(getObjPattern())));
    21922193                                }
     
    22132214                                }
    22142215                        }
    2215                         if (getTopmark() != Top.NONE) {
     2216                        if (getTopmark() != Top.NOTOP) {
    22162217                                Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:topmark:shape", TopSTR.get(getTopmark())));
    2217                                 if (getTopPattern() != Pat.NONE)
     2218                                if (getTopPattern() != Pat.NOPAT)
    22182219                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:topmark:colour_pattern", PatSTR.get(getTopPattern())));
    2219                                 if (getTopColour(0) != Col.UNKNOWN) {
     2220                                if (getTopColour(0) != Col.UNKCOL) {
    22202221                                        String str = ColSTR.get(getTopColour(0));
    22212222                                        for (int i = 1; topmarkColour.size() > i; i++) {
     
    22282229                        for (int i = 0; i < sectors.size(); i++) {
    22292230                                String secStr = (i == 0) ? "" : (":" + Integer.toString(i));
    2230                                 if (sectors.get(i)[0] != Col.UNKNOWN)
    2231                                         if ((sectors.get(i)[15] != Col.UNKNOWN) && ((String)sectors.get(i)[1]).contains("Al"))
     2231                                if (sectors.get(i)[0] != Col.UNKCOL)
     2232                                        if ((sectors.get(i)[15] != Col.UNKCOL) && ((String)sectors.get(i)[1]).contains("Al"))
    22322233                                                Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":colour", (ColSTR.get(sectors.get(i)[0]))
    22332234                                                                + ";" + ColSTR.get(sectors.get(i)[15])));
     
    22422243                                if (!((String) sectors.get(i)[4]).isEmpty())
    22432244                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":period", (String) sectors.get(i)[4]));
    2244                                 if (sectors.get(i)[5] != Lit.UNKNOWN)
     2245                                if (sectors.get(i)[5] != Lit.UNKLIT)
    22452246                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":category", LitSTR.get(sectors.get(i)[5])));
    22462247                                if (!((String) sectors.get(i)[6]).isEmpty())
     
    22542255                                if (!((String) sectors.get(i)[10]).isEmpty())
    22552256                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":range", (String) sectors.get(i)[10]));
    2256                                 if (sectors.get(i)[11] != Vis.UNKNOWN)
     2257                                if (sectors.get(i)[11] != Vis.UNKVIS)
    22572258                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":visibility", VisSTR.get(sectors.get(i)[11])));
    2258                                 if (sectors.get(i)[12] != Exh.UNKNOWN)
     2259                                if (sectors.get(i)[12] != Exh.UNKEXH)
    22592260                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":exhibition", ExhSTR.get(sectors.get(i)[12])));
    22602261                                if (!((String) sectors.get(i)[13]).isEmpty())
     
    22642265                        }
    22652266
    2266                         if (getFogSound() != Fog.NONE) {
    2267                                 if (getFogSound() == Fog.UNKNOWN)
     2267                        if (getFogSound() != Fog.NOFOG) {
     2268                                if (getFogSound() == Fog.FOGSIG)
    22682269                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:fog_signal", "yes"));
    22692270                                else
     
    22832284                        }
    22842285
    2285                         if (RaType != Rtb.NONE) {
     2286                        if (RaType != Rtb.NORTB) {
    22862287                                if (getRadar() == Rtb.REFLECTOR) {
    22872288                                        Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:radar_reflector", "yes"));
     
    23132314                                Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:source", getSource()));
    23142315                        }
    2315                         if (getStatus() != Sts.UNKNOWN) {
     2316                        if (getStatus() != Sts.UNKSTS) {
    23162317                                Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:status", StsSTR.get(getStatus())));
    23172318                        }
    2318                         if (getConstr() != Cns.UNKNOWN) {
     2319                        if (getConstr() != Cns.UNKCNS) {
    23192320                                Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:construction", CnsSTR.get(getConstr())));
    23202321                        }
    2321                         if (getConsp() != Con.UNKNOWN) {
     2322                        if (getConsp() != Con.UNKCON) {
    23222323                                Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:conspicuity", ConSTR.get(getConsp())));
    23232324                        }
    2324                         if (getRefl() != Con.UNKNOWN) {
     2325                        if (getRefl() != Con.UNKCON) {
    23252326                                Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:reflectivity", ConSTR.get(getRefl())));
    23262327                        }
Note: See TracChangeset for help on using the changeset viewer.