Ignore:
Timestamp:
2014-01-19T14:52:39+01:00 (12 years ago)
Author:
malcolmh
Message:

new model structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/render/Rules.java

    r30157 r30215  
    3232       
    3333        static String getName(Feature feature) {
    34                 AttItem name = feature.atts.get(Att.OBJNAM);
     34                AttVal<?> name = feature.atts.get(Att.OBJNAM);
    3535                if (name == null) {
    3636                        AttMap atts = feature.objs.get(feature.type).get(0);
     
    5858                        return S57val.nullVal(att);
    5959                else {
    60                         AttItem item = atts.get(att);
     60                        AttVal<?> item = atts.get(att);
    6161                        if (item == null)
    6262                                return S57val.nullVal(att);
     
    8989                AttMap atts = getAtts(feature, obj, 0);
    9090                if (atts != null) {
    91                         AttItem item = atts.get(att);
     91                        AttVal item = atts.get(att);
    9292                        if (item != null) {
    9393                                switch (item.conv) {
     
    233233                        case SEA_RECH:
    234234                                if ((Renderer.zoom >= 10) && (name != null))
    235                                         if (feature.flag == Fflag.LINE) {
     235                                        if (feature.geom.prim == Pflag.LINE) {
    236236                                                Renderer.lineText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);
    237237                                        } else {
     
    241241                        case SEA_BAY:
    242242                                if ((Renderer.zoom >= 12) && (name != null))
    243                                         if (feature.flag == Fflag.LINE) {
     243                                        if (feature.geom.prim == Pflag.LINE) {
    244244                                                Renderer.lineText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);
    245245                                        } else {
     
    249249                        case SEA_SHOL:
    250250                                if (Renderer.zoom >= 14) {
    251                                         if (feature.flag == Fflag.AREA) {
     251                                        if (feature.geom.prim == Pflag.AREA) {
    252252                                                Renderer.lineVector(feature, new LineStyle(new Color(0xc480ff), 4, new float[] { 25, 25 }));
    253253                                                if (name != null) {
     
    255255                                                        Renderer.labelText(feature, "(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC));
    256256                                                }
    257                                         } else if (feature.flag == Fflag.LINE) {
     257                                        } else if (feature.geom.prim == Pflag.LINE) {
    258258                                                if (name != null) {
    259259                                                        Renderer.lineText(feature, name, new Font("Arial", Font.ITALIC, 75), Color.black, 0.5, -40);
     
    489489                case ACHARE:
    490490                        if (Renderer.zoom >= 12) {
    491                                 if (feature.flag != Fflag.AREA) {
     491                                if (feature.geom.prim != Pflag.AREA) {
    492492                                        Renderer.symbol(feature, Harbours.Anchorage, new Scheme(Color.black));
    493493                                } else {
     
    683683                        MarSYS sys = MarSYS.SYS_CEVN;
    684684                        BnkWTW bnk = BnkWTW.BWW_UNKN;
    685                         AttItem att = feature.atts.get(Att.MARSYS);
     685                        AttVal att = feature.atts.get(Att.MARSYS);
    686686                        if (att != null) sys = (MarSYS)att.val;
    687687                        ObjTab objs = feature.objs.get(Obj.NOTMRK);
Note: See TracChangeset for help on using the changeset viewer.