Changeset 23445 in osm for applications/editors/josm/plugins/smed/src
- Timestamp:
- 2010-10-02T21:19:01+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/smed/src/smed
- Files:
-
- 3 edited
-
plug/manager/SmedPluginManagerImpl.java (modified) (1 diff)
-
tabs/SmedTabAction.java (modified) (5 diffs)
-
tabs/SmedTabbedPane.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/src/smed/plug/manager/SmedPluginManagerImpl.java
r23437 r23445 2 2 3 3 import smed.plug.ifc.SmedPluginManager; 4 import smed.tabs.SmedTabAction; 4 5 5 6 public class SmedPluginManagerImpl implements SmedPluginManager { 6 private staticString string = null;7 private String string = null; 7 8 8 9 @Override 9 10 public void showVisualMessage(String message) { 10 // TODO Auto-generated method stub 11 11 if(SmedTabAction.smedStatusBar != null) SmedTabAction.smedStatusBar.setText(message); 12 12 } 13 13 -
applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabAction.java
r23437 r23445 11 11 import javax.swing.JFrame; 12 12 import javax.swing.JMenuItem; 13 import javax.swing.JTextField; 13 14 import javax.swing.SwingUtilities; 14 15 import javax.swing.UIManager; … … 31 32 private JFrame frame = null; 32 33 private boolean isOpen = false; 33 private JMenuItem osmItem; 34 private JMenuItem osmItem =null; 35 public static JTextField smedStatusBar = null; 34 36 35 37 public SmedTabAction() { … … 59 61 //Create and set up the window. 60 62 frame = new JFrame("TabbedPaneDemo"); 63 smedStatusBar = new JTextField(); 61 64 frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 62 65 frame.setResizable(false); … … 66 69 frame.setJMenuBar(smedMenu); 67 70 frame.add(smedTabs, BorderLayout.CENTER); 71 frame.add(smedStatusBar,BorderLayout.PAGE_END); 68 72 69 73 //Display the window. … … 75 79 } 76 80 }); 77 frame.setSize(new Dimension(420, 550));81 frame.setSize(new Dimension(420, 470)); 78 82 // frame.pack(); 79 83 frame.setVisible(true); -
applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabbedPane.java
r23443 r23445 32 32 static private List<SmedPluggable> plugins = null; 33 33 static private JTabbedPane tabbedPane = null; 34 @SuppressWarnings("unused")34 private SmedPluginManager manager = null; 35 35 private int activeIndex = -1; 36 36 … … 52 52 int i = 0; 53 53 SmedFile splugDir = new SmedFile(pluginDirName + "/splug"); 54 SmedPluginManagermanager = new SmedPluginManagerImpl();54 manager = new SmedPluginManagerImpl(); 55 55 56 56 for(SmedPluggable p : plugins) { … … 76 76 add(tabbedPane); 77 77 78 tabbedPane.setPreferredSize(new Dimension(400, 400));78 tabbedPane.setPreferredSize(new Dimension(400, 390)); 79 79 80 80 //The following line enables to use scrolling tabs. … … 86 86 @Override 87 87 public void stateChanged(ChangeEvent event) { 88 System.out.println("hello world");89 System.out.println("activeIndex:\t" + activeIndex);90 88 JTabbedPane pane = (JTabbedPane) event.getSource(); 91 89 … … 94 92 } 95 93 96 System.out.println(pane.getSelectedIndex());97 94 activeIndex = pane.getSelectedIndex(); 98 95 for(SmedPluggable p : plugins) {
Note:
See TracChangeset
for help on using the changeset viewer.
