Changeset 27201 in osm for applications/editors/josm/plugins
- Timestamp:
- 2011-12-10T14:41:01+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r27200 r27201 40 40 node = null; 41 41 panelMain.mark.clearSign(); 42 panelMain.syncPanel();43 42 manager.showVisualMessage(Messages.getString("OneNode")); 44 43 } … … 48 47 node = null; 49 48 panelMain.mark.clearSign(); 50 panelMain.syncPanel();51 49 manager.showVisualMessage(Messages.getString("SelectNode")); 52 50 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java
r27200 r27201 134 134 sectorButton.setBorderPainted(sectorButton.isSelected()); 135 135 if (sectorButton.isSelected()) { 136 if (panelSector == null) {137 panelSector = new PanelSectors(dlg);138 }139 136 panelSector.setVisible(true); 140 137 } else { 141 if (panelSector != null) { 142 panelSector.setVisible(false); 143 panelSector = null; 144 } 138 panelSector.setVisible(false); 145 139 while (dlg.panelMain.mark.getSectorCount() > 1) 146 140 dlg.panelMain.mark.delLight(1); … … 158 152 this.add(panelChr, null); 159 153 this.add(panelCol, null); 154 panelSector = new PanelSectors(dlg); 155 panelSector.setVisible(false); 160 156 161 157 typeButtons = new ButtonGroup(); … … 285 281 286 282 public void syncPanel() { 287 if (panelSector != null) {288 panelSector.setVisible(false);289 panelSector = null;290 }291 singleButton.setBorderPainted(false);292 sectorButton.setBorderPainted(false);293 283 orientationLabel.setVisible(false); 294 284 orientationBox.setVisible(false); … … 319 309 exhibitionBox.setSelectedIndex(item); 320 310 } 311 if (dlg.panelMain.mark.isSectored()) { 312 singleButton.setBorderPainted(false); 313 sectorButton.setBorderPainted(true); 314 panelSector.setVisible(true); 315 } else { 316 singleButton.setBorderPainted(true); 317 sectorButton.setBorderPainted(false); 318 panelSector.setVisible(false); 319 while (dlg.panelMain.mark.getSectorCount() > 1) 320 dlg.panelMain.mark.delLight(dlg.panelMain.mark.getSectorCount() - 1); 321 } 321 322 panelCol.syncPanel(); 322 323 panelChr.syncPanel(); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java
r27200 r27201 68 68 this.getContentPane().add(panel); 69 69 70 table.setSize(860, ((table.getRowCount() * 16) + 18));70 table.setSize(860, ((table.getRowCount() * 16) + 20)); 71 71 if (table.getRowCount() > 3) { 72 this.setSize(900, ((table.getRowCount() * 16) + 4 0));72 this.setSize(900, ((table.getRowCount() * 16) + 42)); 73 73 } 74 74 … … 126 126 127 127 public int getRowCount() { 128 return dlg.panelMain.mark.getSectorCount(); 128 if (dlg.panelMain == null) 129 return 1; 130 else 131 return dlg.panelMain.mark.getSectorCount(); 129 132 } 130 133 … … 258 261 public void deleteSector(int idx) { 259 262 dlg.panelMain.mark.delLight(idx); 260 table.setSize(860, ((table.getRowCount() * 16) + 18));263 table.setSize(860, ((table.getRowCount() * 16) + 20)); 261 264 if (table.getRowCount() > 3) { 262 this.setSize(900, ((table.getRowCount() * 16) + 4 0));265 this.setSize(900, ((table.getRowCount() * 16) + 42)); 263 266 } else { 264 267 this.setSize(900, 100); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27200 r27201 21 21 public SeaMark(OSeaMAction dia) { 22 22 dlg = dia; 23 clrLight(); 23 24 } 24 25 … … 101 102 public void setObject(Obj obj) { 102 103 object = obj; 104 if (obj == Obj.UNKNOWN) { 105 setCategory(Cat.NONE); 106 setShape(Shp.UNKNOWN); 107 setColour(Ent.BODY, Col.UNKNOWN); 108 setPattern(Ent.BODY, Pat.NONE); 109 setTopmark(Top.NONE); 110 setColour(Ent.TOPMARK, Col.UNKNOWN); 111 setPattern(Ent.TOPMARK, Pat.NONE); 112 setFogSound(Fog.NONE); 113 setRadar(Rtb.NONE); 114 setStatus(Sts.UNKNOWN); 115 setConstr(Cns.UNKNOWN); 116 setConsp(Con.UNKNOWN); 117 setRefl(Con.UNKNOWN); 118 setRef(""); 119 setObjectHeight(""); 120 setElevation(""); 121 setInfo(""); 122 setSource(""); 123 setFixme(""); 124 } 103 125 repaint(); 104 126 } … … 559 581 } 560 582 583 public boolean isSectored() { 584 return (sectors.size() > 1); 585 } 586 561 587 public Object getLightAtt(Att att, int i) { 562 588 return getLightAtt(att.ordinal(), i); … … 619 645 620 646 public void clrLight() { 621 delLight(0);647 sectors.clear(); 622 648 addLight(); 623 649 } … … 723 749 public void setRadar(Rtb type) { 724 750 RaType = type; 751 if (type == Rtb.NONE) { 752 setRaconGroup(""); 753 setRaconSequence(""); 754 setRaconPeriod(""); 755 setRaconRange(""); 756 setRaconSector1(""); 757 setRaconSector2(""); 758 } 725 759 repaint(); 726 760 } … … 816 850 public void setFogSound(Fog sound) { 817 851 fogSound = sound; 852 if (sound == Fog.NONE) { 853 setFogGroup(""); 854 setFogSequence(""); 855 setFogPeriod(""); 856 setFogRange(""); 857 } 818 858 repaint(); 819 859 } … … 1094 1134 public void clearSign() { 1095 1135 setObject(Obj.UNKNOWN); 1096 setCategory(Cat.NONE); 1097 setShape(Shp.UNKNOWN); 1098 setColour(Ent.BODY, Col.UNKNOWN); 1099 setPattern(Ent.BODY, Pat.NONE); 1100 setTopmark(Top.NONE); 1101 setColour(Ent.TOPMARK, Col.UNKNOWN); 1102 setPattern(Ent.TOPMARK, Pat.NONE); 1103 setFogSound(Fog.NONE); 1104 setRadar(Rtb.NONE); 1136 setName(""); 1105 1137 clrLight(); 1106 dlg.panelMain.moreButton.setVisible(false); 1107 dlg.panelMain.saveButton.setEnabled(false); 1108 dlg.panelMain.topButton.setEnabled(false); 1109 dlg.panelMain.fogButton.setEnabled(false); 1110 dlg.panelMain.radButton.setEnabled(false); 1111 dlg.panelMain.litButton.setEnabled(false); 1112 dlg.panelMain.panelMore.syncPanel(); 1113 dlg.panelMain.panelMore.setVisible(false); 1138 dlg.panelMain.syncPanel(); 1114 1139 repaint(); 1115 1140 }
Note:
See TracChangeset
for help on using the changeset viewer.