Changeset 26713 in osm for applications
- Timestamp:
- 2011-09-27T21:23:20+02: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/PanelCol.java
r26631 r26713 6 6 import java.awt.event.*; 7 7 import javax.swing.*; 8 8 9 import java.util.*; 9 10 … … 41 42 if (dlg.mark != null) { 42 43 dlg.mark.setColour(ent, col); 43 // act.actionPerformed(null); 44 if (ent != Ent.LIGHT) { 45 stackCol.get(stackIdx).setBackground(dlg.mark.ColMAP.get(dlg.mark.getColour(ent, stackIdx))); 46 } 44 47 } 48 button.setBorderPainted(true); 49 } else 50 button.setBorderPainted(false); 51 } 52 } 53 }; 54 private JPanel stack; 55 private ButtonGroup stackColours = new ButtonGroup(); 56 private ArrayList<JRadioButton> stackCol = new ArrayList<JRadioButton>(); 57 private int stackIdx = 0; 58 private ActionListener alStack = new ActionListener() { 59 public void actionPerformed(java.awt.event.ActionEvent e) { 60 for (int i = 0; stackCol.size() > i; i++) { 61 JRadioButton button = stackCol.get(i); 62 if (button.isSelected()) { 63 stackIdx = i; 45 64 button.setBorderPainted(true); 46 65 } else … … 71 90 this.add(getColButton(magentaButton, 35, 48, 34, 16, Messages.getString("Magenta"), Col.MAGENTA), null); 72 91 this.add(getColButton(pinkButton, 35, 64, 34, 16, Messages.getString("Pink"), Col.PINK), null); 92 93 stack = new JPanel(); 94 stack.setBorder(BorderFactory.createLineBorder(Color.black)); 95 stack.setBounds(37, 89, 30, 60); 96 this.add(stack); 97 Col col; 98 for (int i = 0; (col = dlg.mark.getColour(ent, i)) != Col.UNKNOWN; i++) { 99 stackCol.add(new JRadioButton()); 100 } 101 73 102 } 74 103 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelPat.java
r26632 r26713 53 53 this.add(getPatButton(squareButton, 72, 104, 27, 27, "SquarePat", Pat.SQUARE), null); 54 54 this.add(getPatButton(borderButton, 72, 130, 27, 27, "BorderPat", Pat.BORDER), null); 55 55 56 56 } 57 57 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r26590 r26713 3 3 import java.awt.*; 4 4 import java.awt.event.*; 5 import java.awt.Color.*; 5 6 import javax.swing.*; 6 7 import java.util.*; … … 259 260 } 260 261 262 public static final EnumMap<Col, Color> ColMAP = new EnumMap<Col, Color>(Col.class); 263 static { 264 ColMAP.put(Col.WHITE, Color.WHITE); 265 ColMAP.put(Col.RED, Color.RED); 266 ColMAP.put(Col.ORANGE, Color.ORANGE); 267 ColMAP.put(Col.AMBER, new Color(0xffbf00f)); 268 ColMAP.put(Col.YELLOW, Color.YELLOW); 269 ColMAP.put(Col.GREEN, Color.GREEN); 270 ColMAP.put(Col.BLUE, Color.BLUE); 271 ColMAP.put(Col.VIOLET, new Color(0x8f00ff)); 272 ColMAP.put(Col.BLACK, Color.BLACK); 273 ColMAP.put(Col.GREY, Color.GRAY); 274 ColMAP.put(Col.BROWN, new Color(0xa45a58)); 275 ColMAP.put(Col.MAGENTA, Color.MAGENTA); 276 ColMAP.put(Col.PINK, Color.PINK); 277 } 278 261 279 public static final EnumMap<Col, String> ColSTR = new EnumMap<Col, String>(Col.class); 262 280 static {
Note:
See TracChangeset
for help on using the changeset viewer.