Changeset 26556 in osm for applications/editors/josm
- Timestamp:
- 2011-08-22T16:15:42+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
r26555 r26556 41 41 dlg.mark.addColour(Ent.BODY, Col.YELLOW); 42 42 dlg.mark.setPattern(Ent.BODY, Pat.HORIZ); 43 if (shapes.containsKey(shp)) {43 if (shapes.containsKey(shp)) 44 44 shapes.get(shp).doClick(); 45 } else {46 clearSelections();47 dlg.mark.setShape(Shp.UNKNOWN);48 }49 45 northButton.setBorderPainted(true); 50 46 } else { … … 56 52 dlg.mark.addColour(Ent.BODY, Col.BLACK); 57 53 dlg.mark.setPattern(Ent.BODY, Pat.HORIZ); 58 if (shapes.containsKey(shp)) {54 if (shapes.containsKey(shp)) 59 55 shapes.get(shp).doClick(); 60 } else {61 clearSelections();62 dlg.mark.setShape(Shp.UNKNOWN);63 }64 56 southButton.setBorderPainted(true); 65 57 } else { … … 72 64 dlg.mark.addColour(Ent.BODY, Col.BLACK); 73 65 dlg.mark.setPattern(Ent.BODY, Pat.HORIZ); 74 if (shapes.containsKey(shp)) {66 if (shapes.containsKey(shp)) 75 67 shapes.get(shp).doClick(); 76 } else {77 clearSelections();78 dlg.mark.setShape(Shp.UNKNOWN);79 }80 68 eastButton.setBorderPainted(true); 81 69 } else { … … 88 76 dlg.mark.addColour(Ent.BODY, Col.YELLOW); 89 77 dlg.mark.setPattern(Ent.BODY, Pat.HORIZ); 90 if (shapes.containsKey(shp)) {78 if (shapes.containsKey(shp)) 91 79 shapes.get(shp).doClick(); 92 } else {93 clearSelections();94 dlg.mark.setShape(Shp.UNKNOWN);95 }96 80 westButton.setBorderPainted(true); 97 81 } else { … … 99 83 } 100 84 if (isolButton.isSelected()) { 85 dlg.mark.setCategory(Cat.UNKNOWN); 101 86 dlg.mark.setColour(Ent.BODY, Col.BLACK); 102 87 dlg.mark.addColour(Ent.BODY, Col.RED); 103 88 dlg.mark.addColour(Ent.BODY, Col.BLACK); 104 89 dlg.mark.setPattern(Ent.BODY, Pat.HORIZ); 105 if (shapes.containsKey(shp)) {90 if (shapes.containsKey(shp)) 106 91 shapes.get(shp).doClick(); 107 } else {108 clearSelections();109 dlg.mark.setShape(Shp.UNKNOWN);110 }111 92 isolButton.setBorderPainted(true); 112 93 } else { -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r26552 r26556 31 31 private JButton saveButton = null; 32 32 private ActionListener alSave = null; 33 private JButton moreButton = null; 34 private ActionListener alMore = null; 33 35 public ButtonGroup typeButtons = null; 34 36 public JRadioButton chanButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ChanButton.png"))); … … 57 59 dlg = dia; 58 60 panelChan = new PanelChan(dlg); 59 panelChan.setBounds(new Rectangle(65, 0, 1 85, 160));61 panelChan.setBounds(new Rectangle(65, 0, 165, 160)); 60 62 panelChan.setVisible(false); 61 63 panelHaz = new PanelHaz(dlg); 62 panelHaz.setBounds(new Rectangle(65, 0, 1 85, 160));64 panelHaz.setBounds(new Rectangle(65, 0, 165, 160)); 63 65 panelHaz.setVisible(false); 64 66 panelSpec = new PanelSpec(dlg); 65 panelSpec.setBounds(new Rectangle(65, 0, 1 85, 160));67 panelSpec.setBounds(new Rectangle(65, 0, 165, 160)); 66 68 panelSpec.setVisible(false); 67 69 panelLights = new PanelLights(dlg); 68 panelLights.setBounds(new Rectangle(65, 0, 1 85, 160));70 panelLights.setBounds(new Rectangle(65, 0, 165, 160)); 69 71 panelLights.setVisible(false); 70 72 panelTop = new PanelTop(dlg); … … 137 139 if (specButton.isSelected()) { 138 140 dlg.panelMain.panelSpec.panelCol.yellowButton.doClick(); 139 dlg.panelMain.panelTop.enableAll(true); 140 dlg.panelMain.panelTop.noTopButton.doClick(); 141 dlg.panelMain.panelTop.panelCol.enableAll(true); 142 dlg.panelMain.panelTop.panelCol.yellowButton.doClick(); 143 topButton.setEnabled(true); 144 fogButton.setEnabled(true); 145 radButton.setEnabled(true); 146 litButton.setEnabled(true); 141 if ((dlg.mark != null) && (dlg.panelMain.panelSpec.shapes.containsKey(dlg.mark.getShape()))) { 142 dlg.panelMain.panelSpec.shapes.get(dlg.mark.getShape()).doClick(); 143 } else { 144 dlg.panelMain.panelSpec.shapeButtons.clearSelection(); 145 dlg.panelMain.panelSpec.alShape.actionPerformed(null); 146 } 147 147 specButton.setBorderPainted(true); 148 148 panelSpec.setVisible(true); … … 153 153 } 154 154 if (lightsButton.isSelected()) { 155 fogButton.setEnabled(true);156 radButton.setEnabled(true);157 155 litButton.setEnabled(true); 158 156 litButton.doClick(); … … 249 247 }; 250 248 saveButton.addActionListener(alSave); 249 250 moreButton = new JButton(); 251 moreButton.setBounds(new Rectangle(230, 145, 50, 15)); 252 moreButton.setText("more..."); 253 this.add(moreButton, null); 254 alMore = new ActionListener() { 255 public void actionPerformed(java.awt.event.ActionEvent e) { 256 } 257 }; 258 moreButton.addActionListener(alMore); 259 251 260 this.clearSelections(); 261 252 262 } 253 263 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java
r26423 r26556 18 18 import oseam.seamarks.SeaMark.Obj; 19 19 import oseam.seamarks.SeaMark.Ent; 20 import oseam.seamarks.SeaMark.Col; 20 21 21 22 public class PanelSpec extends JPanel { 22 23 23 24 private OSeaMAction dlg; 24 p rivateButtonGroup shapeButtons = new ButtonGroup();25 public ButtonGroup shapeButtons = new ButtonGroup(); 25 26 public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png"))); 26 27 public JRadioButton sparButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SparButton.png"))); … … 33 34 public JRadioButton beaconButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BeaconButton.png"))); 34 35 public JRadioButton towerButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TowerButton.png"))); 36 public JRadioButton stakeButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/StakeButton.png"))); 37 public JRadioButton cairnButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CairnButton.png"))); 35 38 public EnumMap<Shp, JRadioButton> shapes = new EnumMap<Shp, JRadioButton>(Shp.class); 36 39 public EnumMap<Shp, Obj> objects = new EnumMap<Shp, Obj>(Shp.class); 37 40 public PanelCol panelCol = null; 38 p rivateActionListener alShape = new ActionListener() {41 public ActionListener alShape = new ActionListener() { 39 42 public void actionPerformed(java.awt.event.ActionEvent e) { 40 43 for (Shp shp : shapes.keySet()) { … … 43 46 dlg.mark.setShape(shp); 44 47 dlg.mark.setObject(objects.get(shp)); 48 if (button == cairnButton) 49 panelCol.offButton.doClick(); 45 50 button.setBorderPainted(true); 46 51 } else 47 52 button.setBorderPainted(false); 48 53 } 54 if (dlg.mark != null) 55 dlg.mark.paintSign(); 49 56 } 50 57 }; … … 67 74 this.add(getShapeButton(beaconButton, 90, 96, 34, 32, "Beacon", Shp.BEACON, Obj.BCNSPP), null); 68 75 this.add(getShapeButton(towerButton, 90, 128, 34, 32, "Tower", Shp.TOWER, Obj.BCNSPP), null); 76 this.add(getShapeButton(stakeButton, 125, 0, 34, 32, "Stake", Shp.STAKE, Obj.BCNSPP), null); 77 this.add(getShapeButton(cairnButton, 125, 32, 34, 32, "Cairn", Shp.CAIRN, Obj.BCNSPP), null); 69 78 } 70 79 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r26555 r26556 845 845 imgStr += "Sphere"; 846 846 break; 847 case BARREL: 848 imgStr += "Barrel"; 849 break; 850 case CAIRN: 851 imgStr += "Cairn"; 852 break; 847 853 case FLOAT: 848 854 imgStr += "Float"; 849 855 break; 850 856 case BEACON: 851 case CAIRN:852 857 case PILE: 853 858 case LATTICE:
Note:
See TracChangeset
for help on using the changeset viewer.