Changeset 27635 in osm for applications
- Timestamp:
- 2012-01-26T19:11:02+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/wayarea/src
- Files:
-
- 8 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/wayarea/src/wayarea/panels/PanelMain.java
r27479 r27635 13 13 14 14 private WayAreaAction dlg; 15 // public PanelF panelF = null; 16 // public PanelJ panelJ = null; 17 // public PanelK panelK = null; 18 // public PanelL panelL = null; 19 // public PanelM panelM = null; 20 // public PanelN panelN = null; 15 private JTabbedPane tabs = null; 16 public PanelF panelF = null; 17 public PanelJ panelJ = null; 18 public PanelK panelK = null; 19 public PanelL panelL = null; 20 public PanelM panelM = null; 21 public PanelN panelN = null; 21 22 public JButton saveButton = null; 22 23 private ActionListener alSave = new ActionListener() { 23 24 public void actionPerformed(java.awt.event.ActionEvent e) { 24 25 // mark.saveSign(dlg.node); 25 }26 };27 public ButtonGroup typeButtons = null;28 public JRadioButton fButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/ChanButton.png")));29 public JRadioButton jButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/HazButton.png")));30 public JRadioButton kButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/SpecButton.png")));31 public JRadioButton lButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LightsButton.png")));32 public JRadioButton mButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LightsButton.png")));33 public JRadioButton nButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LightsButton.png")));34 private ActionListener alType = new ActionListener() {35 public void actionPerformed(java.awt.event.ActionEvent e) {36 if (fButton.isSelected()) {37 fButton.setBorderPainted(true);38 // panelF.syncPanel();39 // panelF.setVisible(true);40 } else {41 fButton.setBorderPainted(false);42 // panelF.setVisible(false);43 }44 if (jButton.isSelected()) {45 jButton.setBorderPainted(true);46 // panelJ.syncPanel();47 // panelJ.setVisible(true);48 } else {49 jButton.setBorderPainted(false);50 // panelJ.setVisible(false);51 }52 if (kButton.isSelected()) {53 kButton.setBorderPainted(true);54 // panelK.syncPanel();55 // panelK.setVisible(true);56 } else {57 kButton.setBorderPainted(false);58 // panelK.setVisible(false);59 }60 if (lButton.isSelected()) {61 lButton.setBorderPainted(true);62 // panelL.syncPanel();63 // panelL.setVisible(true);64 } else {65 lButton.setBorderPainted(false);66 // panelL.setVisible(false);67 }68 if (mButton.isSelected()) {69 mButton.setBorderPainted(true);70 // panelM.syncPanel();71 // panelM.setVisible(true);72 } else {73 mButton.setBorderPainted(false);74 // panelM.setVisible(false);75 }76 if (nButton.isSelected()) {77 nButton.setBorderPainted(true);78 // panelN.syncPanel();79 // panelN.setVisible(true);80 } else {81 nButton.setBorderPainted(false);82 // panelN.setVisible(false);83 }84 26 } 85 27 }; … … 89 31 dlg = dia; 90 32 setLayout(null); 33 tabs = new JTabbedPane(JTabbedPane.LEFT); 34 35 JPanel panelF = new PanelF(); 36 tabs.addTab(null, new ImageIcon(getClass().getResource("/images/ports.png")), panelF, "Ports"); 91 37 38 JPanel panelJ = new PanelJ(); 39 tabs.addTab(null, new ImageIcon(getClass().getResource("/images/ports.png")), panelJ, "Seabed"); 40 41 JPanel panelK = new PanelK(); 42 tabs.addTab(null, new ImageIcon(getClass().getResource("/images/ports.png")), panelK, "Obstructions"); 43 44 JPanel panelL = new PanelL();; 45 tabs.addTab(null, new ImageIcon(getClass().getResource("/images/ports.png")), panelL, "Offshore Installations"); 46 47 JPanel panelM = new PanelM(); 48 tabs.addTab(null, new ImageIcon(getClass().getResource("/images/ports.png")), panelM, "Tracks & Routes"); 49 50 JPanel panelN = new PanelN();; 51 tabs.addTab(null, new ImageIcon(getClass().getResource("/images/ports.png")), panelN, "Areas & Limits"); 52 53 tabs.setBounds(new Rectangle(0, 0, 400, 325)); 54 add(tabs); 55 56 saveButton = new JButton(); 57 saveButton.setBounds(new Rectangle(285, 330, 100, 20)); 58 saveButton.setText(tr("Save")); 59 add(saveButton); 60 saveButton.addActionListener(alSave); 92 61 } 93 62 94 63 public void syncPanel() { 95 // typeButtons.clearSelection();96 // fButton.setBorderPainted(false);97 // jButton.setEnabled(false);98 // kButton.setBorderPainted(false);99 // lButton.setEnabled(false);100 // mButton.setBorderPainted(false);101 // nButton.setEnabled(false);102 }103 104 private JRadioButton getButton(JRadioButton button, int x, int y, int w, int h, String tip) {105 button.setBounds(new Rectangle(x, y, w, h));106 button.setBorder(BorderFactory.createLoweredBevelBorder());107 button.setToolTipText(Messages.getString(tip));108 return button;109 64 } 110 65
Note:
See TracChangeset
for help on using the changeset viewer.