Changeset 27044 in osm
- Timestamp:
- 2011-11-12T23:07:53+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
r27023 r27044 67 67 isolButton.setBorderPainted(false); 68 68 } 69 syncPanel();69 alTop.actionPerformed(null); 70 70 dlg.panelMain.panelMore.syncPanel(); 71 71 dlg.mark.paintSign(); 72 72 } 73 73 }; 74 75 74 private ButtonGroup shapeButtons = new ButtonGroup(); 76 75 public JRadioButton pillarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PillarButton.png"))); … … 117 116 } 118 117 } 118 dlg.mark.paintSign(); 119 119 } 120 120 }; … … 122 122 private ActionListener alTop = new ActionListener() { 123 123 public void actionPerformed(java.awt.event.ActionEvent e) { 124 if (dlg.mark != null) { 125 if (topmarkButton.isSelected()) { 126 dlg.mark.setTopPattern(Pat.NONE); 127 dlg.mark.setTopColour(Col.BLACK); 128 switch (dlg.mark.getCategory()) { 129 case CAM_NORTH: 130 dlg.mark.setTopmark(Top.NORTH); 131 break; 132 case CAM_SOUTH: 133 dlg.mark.setTopmark(Top.SOUTH); 134 break; 135 case CAM_EAST: 136 dlg.mark.setTopmark(Top.EAST); 137 break; 138 case CAM_WEST: 139 dlg.mark.setTopmark(Top.WEST); 140 break; 141 default: 142 dlg.mark.setTopmark(Top.SPHERES2); 143 break; 144 } 145 topmarkButton.setBorderPainted(true); 146 } else { 147 dlg.mark.setTopmark(Top.NONE); 148 dlg.mark.setTopPattern(Pat.NONE); 149 dlg.mark.setTopColour(Col.UNKNOWN); 150 topmarkButton.setBorderPainted(false); 124 if (topmarkButton.isSelected()) { 125 dlg.mark.setTopPattern(Pat.NONE); 126 dlg.mark.setTopColour(Col.BLACK); 127 switch (dlg.mark.getCategory()) { 128 case CAM_NORTH: 129 dlg.mark.setTopmark(Top.NORTH); 130 break; 131 case CAM_SOUTH: 132 dlg.mark.setTopmark(Top.SOUTH); 133 break; 134 case CAM_EAST: 135 dlg.mark.setTopmark(Top.EAST); 136 break; 137 case CAM_WEST: 138 dlg.mark.setTopmark(Top.WEST); 139 break; 140 default: 141 dlg.mark.setTopmark(Top.SPHERES2); 142 break; 151 143 } 152 dlg.panelMain.panelTop.syncPanel(); 153 dlg.mark.paintSign(); 154 } 144 topmarkButton.setBorderPainted(true); 145 } else { 146 dlg.mark.setTopmark(Top.NONE); 147 dlg.mark.setTopPattern(Pat.NONE); 148 dlg.mark.setTopColour(Col.UNKNOWN); 149 topmarkButton.setBorderPainted(false); 150 } 151 dlg.panelMain.panelTop.syncPanel(); 152 dlg.mark.paintSign(); 155 153 } 156 154 }; … … 193 191 button.setBorderPainted(false); 194 192 } 195 topmarkButton.setBorderPainted( topmarkButton.isSelected());193 topmarkButton.setBorderPainted(dlg.mark.getTopmark() != Top.NONE); 196 194 topmarkButton.setVisible(dlg.mark.isValid()); 197 195 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r27042 r27044 31 31 public JLabel fogLabel = null; 32 32 public JLabel colLabel = null; 33 public JLabel litLabel = null; 33 34 public JLabel nameLabel = null; 34 35 public JTextField nameBox = null; … … 211 212 this.add(fogIcon, null); 212 213 radarLabel = new JLabel("", SwingConstants.CENTER); 213 radarLabel.setBounds(new Rectangle(210, 35, 100, 20)); 214 litLabel = new JLabel("", SwingConstants.CENTER); 215 litLabel.setBounds(new Rectangle(210, 35, 100, 20)); 216 this.add(litLabel, null); 217 radarLabel.setBounds(new Rectangle(210, 55, 100, 20)); 214 218 this.add(radarLabel, null); 215 219 fogLabel = new JLabel("", SwingConstants.CENTER); 216 fogLabel.setBounds(new Rectangle(210, 60, 100, 20));220 fogLabel.setBounds(new Rectangle(210, 75, 100, 20)); 217 221 this.add(fogLabel, null); 218 222 colLabel = new JLabel("", SwingConstants.CENTER); … … 315 319 fogLabel.setText(""); 316 320 colLabel.setText(""); 321 litLabel.setText(""); 317 322 shapeIcon.setIcon(null); 318 323 lightIcon.setIcon(null); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27042 r27044 1476 1476 1477 1477 dlg.panelMain.shapeIcon.setIcon(null); 1478 dlg.panelMain.litLabel.setText(""); 1478 1479 dlg.panelMain.colLabel.setText(""); 1479 1480 dlg.panelMain.radarLabel.setText(""); … … 1817 1818 } 1818 1819 1819 if ((getLightAtt(Att.COL, 0) != Col.UNKNOWN) && (sectors.size() == 1)) { 1820 dlg.panelMain.lightIcon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Magenta_120.png"))); 1820 if (getLightAtt(Att.COL, 0) != Col.UNKNOWN) { 1821 if (sectors.size() == 1) { 1822 switch ((Col) getLightAtt(Att.COL, 0)) { 1823 case RED: 1824 dlg.panelMain.lightIcon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Red_120.png"))); 1825 break; 1826 case GREEN: 1827 dlg.panelMain.lightIcon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Green_120.png"))); 1828 break; 1829 case WHITE: 1830 case YELLOW: 1831 dlg.panelMain.lightIcon.setIcon(new ImageIcon(getClass().getResource("/images/Light_White_120.png"))); 1832 break; 1833 default: 1834 dlg.panelMain.lightIcon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Magenta_120.png"))); 1835 } 1836 } 1837 String c = (String)getLightAtt(Att.CHR, 0); 1838 String tmp = ""; 1839 if (c.contains("+")) { 1840 int i1 = c.indexOf("+"); 1841 tmp = c.substring(i1, c.length()); 1842 c = c.substring(0, i1); 1843 if (!((String)getLightAtt(Att.GRP, 0)).isEmpty()) { 1844 c += "(" + (String)getLightAtt(Att.GRP, 0) + ")"; 1845 } 1846 if (tmp != null) 1847 c += tmp; 1848 } else if (!((String)getLightAtt(Att.GRP, 0)).isEmpty()) 1849 c += "(" + (String)getLightAtt(Att.GRP, 0) + ")"; 1850 switch ((Col)getLightAtt(Att.COL, 0)) { 1851 case RED: 1852 c += " R"; 1853 break; 1854 case GREEN: 1855 c += " G"; 1856 break; 1857 case AMBER: 1858 c += " Am"; 1859 break; 1860 case ORANGE: 1861 c += " Or"; 1862 break; 1863 case BLUE: 1864 c += " Bu"; 1865 break; 1866 case VIOLET: 1867 c += " Vi"; 1868 break; 1869 } 1870 tmp = (String)getLightAtt(Att.PER, 0); 1871 if (!tmp.isEmpty()) 1872 c += " " + tmp + "s"; 1873 dlg.panelMain.litLabel.setText(c); 1821 1874 } 1822 1875
Note:
See TracChangeset
for help on using the changeset viewer.