Changeset 23261 in osm for applications/editors/josm/plugins/smed_ex/src/smed_ex/SmedEx.java
- Timestamp:
- 2010-09-19T11:55:14+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed_ex/src/smed_ex/SmedEx.java
r23244 r23261 16 16 public class SmedEx implements SmedPluggable { 17 17 18 19 18 private JPanel jPanel = null; // @jve:decl-index=0:visual-constraint="78,30" 19 private JButton jButton = null; 20 20 21 22 23 24 25 21 @Override 22 public boolean stop() { 23 // TODO Auto-generated method stub 24 return false; 25 } 26 26 27 28 27 @Override 28 public String getName() { 29 29 30 31 30 return "Hello"; 31 } 32 32 33 34 33 @Override 34 public String getInfo() { 35 35 36 37 36 return "say hello"; 37 } 38 38 39 @Override 40 public JComponent getComponent() { 41 42 return getJPanel(); 43 } 39 @Override 40 public JComponent getComponent() { 44 41 45 @Override 46 public void setPluginManager(SmedPluginManager manager) { 47 // TODO Auto-generated method stub 42 return getJPanel(); 43 } 48 44 49 } 45 @Override 46 public void setPluginManager(SmedPluginManager manager) { 47 // TODO Auto-generated method stub 50 48 51 /** 52 * This method initializes jPanel 53 * 54 * @return javax.swing.JPanel 55 */ 56 private JPanel getJPanel() { 57 if (jPanel == null) { 58 jPanel = new JPanel(); 59 jPanel.setLayout(null); 60 jPanel.setPreferredSize(new Dimension(200, 130)); 61 jPanel.add(getJButton(), null); 62 } 63 return jPanel; 64 } 49 } 65 50 66 /** 67 * This method initializes jButton 68 * 69 * @return javax.swing.JButton 70 */ 71 private JButton getJButton() { 72 if (jButton == null) { 73 jButton = new JButton(); 74 jButton.setBounds(new Rectangle(15, 40, 160, 40)); 75 jButton.setText("Hello World!"); 76 77 jButton.addActionListener(new ActionListener() { 51 /** 52 * This method initializes jPanel 53 * 54 * @return javax.swing.JPanel 55 */ 56 private JPanel getJPanel() { 57 if (jPanel == null) { 58 jPanel = new JPanel(); 59 jPanel.setLayout(null); 60 jPanel.setPreferredSize(new Dimension(200, 130)); 61 jPanel.add(getJButton(), null); 62 } 63 return jPanel; 64 } 78 65 79 @Override 80 public void actionPerformed(ActionEvent e) { 81 JOptionPane.showMessageDialog( null, "it works" ); 82 } 83 84 }); 85 } 86 return jButton; 87 } 66 /** 67 * This method initializes jButton 68 * 69 * @return javax.swing.JButton 70 */ 71 private JButton getJButton() { 72 if (jButton == null) { 73 jButton = new JButton(); 74 jButton.setBounds(new Rectangle(15, 40, 160, 40)); 75 jButton.setText("Hello World!"); 88 76 89 @Override 90 public boolean start() { 91 // TODO Auto-generated method stub 92 return false; 93 } 77 jButton.addActionListener(new ActionListener() { 78 79 @Override 80 public void actionPerformed(ActionEvent e) { 81 JOptionPane.showMessageDialog( null, "it works" ); 82 } 83 84 }); 85 } 86 return jButton; 87 } 88 89 @Override 90 public boolean start() { 91 // TODO Auto-generated method stub 92 return false; 93 } 94 94 95 95 }
Note:
See TracChangeset
for help on using the changeset viewer.