Ignore:
Timestamp:
2012-02-28T15:08:45+01:00 (12 years ago)
Author:
malcolmh
Message:

radar range fix

Location:
applications/editors/josm/plugins/smed
Files:
16 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelRadar.java

    r27423 r27955  
    119119                rangeBox.setBounds(new Rectangle(155, 60, 50, 20));
    120120                rangeBox.setHorizontalAlignment(SwingConstants.CENTER);
     121                add(rangeBox);
    121122                rangeBox.addFocusListener(flRange);
    122123               
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java

    r27941 r27955  
    725725
    726726        public enum Pat {
    727                 NOPAT, HSTRP, VSTRP, DIAG, SQUARED, BORDER, CROSS
     727                NOPAT, HSTRP, VSTRP, DIAG, SQUARED, BORDER, CROSS, SALTIRE
    728728        }
    729729
     
    736736                PatSTR.put(Pat.BORDER, "border");
    737737                PatSTR.put(Pat.CROSS, "cross");
     738                PatSTR.put(Pat.SALTIRE, "saltire");
    738739        }
    739740
  • applications/editors/josm/plugins/smed/src/smed/tabs/SmedTabAction.java

    r27947 r27955  
    2323public class SmedTabAction extends JosmAction {
    2424
    25         /**
     25    /**
    2626     *
    2727     */
     
    3131        private JFrame frame = null;
    3232        private boolean isOpen = false;
    33         private JMenuItem osmItem = null;
     33        private JMenuItem osmItem =null;
    3434        public static JTextField smedStatusBar = null;
    35         private static String editor = tr("SeaMap Editor");
     35        private static String editor =tr("SeaMap Editor");
     36       
     37        public SmedTabAction() {
     38        super( editor, "Smed",editor,
     39            Shortcut.registerShortcut("tools:Seamaps", tr("Tool: {0}", tr("SeaMap Editor")),
     40                    KeyEvent.VK_K, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT),
     41            true);  //$NON-NLS-1$ //$NON-NLS-2$
     42    }
    3643
    37         public SmedTabAction() {
    38         super( editor, "Smed",editor, Shortcut.registerShortcut("tools:Seamaps", tr("Tool: {0}", tr("SeaMap Editor")), KeyEvent.VK_K, Shortcut.SHIFT_DEFAULT), true);  //$NON-NLS-1$ //$NON-NLS-2$
    39         }
    4044
    41         @Override
    42         public void actionPerformed(ActionEvent e) {
    43                 SwingUtilities.invokeLater(new Runnable() {
    44                         public void run() {
    45                                 createAndShowTabs();
    46                         }
    47                 });
    48 
    49                 isOpen = true;
    50                 if (osmItem == null)
    51                         return;
     45    @Override
     46    public void actionPerformed(ActionEvent e) {
     47        SwingUtilities.invokeLater(new Runnable() {
     48            public void run() {
     49                createAndShowTabs();
     50            }
     51        });
     52       
     53        isOpen = true;
     54                if (osmItem == null) return;
    5255
    5356                osmItem.setEnabled(false);
    54         }
     57    }
    5558
    56         protected void createAndShowTabs() {
    57                 // Create and set up the window.
    58                 frame = new JFrame(editor);
    59                 smedStatusBar = new JTextField();
    60                 frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    61                 frame.setResizable(false);
    62                 frame.setAlwaysOnTop(true);
    6359
    64                 // Add content to the window.
    65                 frame.setJMenuBar(smedMenu);
    66                 frame.add(smedTabs, BorderLayout.CENTER);
    67                 frame.add(smedStatusBar, BorderLayout.PAGE_END);
     60    protected void createAndShowTabs() {
     61        //Create and set up the window.
     62        frame = new JFrame(editor);
     63        smedStatusBar = new JTextField();
     64        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
     65        frame.setResizable(false);
     66        frame.setAlwaysOnTop(true);
    6867
    69                 // Display the window.
    70                 frame.addWindowListener(new java.awt.event.WindowAdapter() {
    71                         public void windowClosing(java.awt.event.WindowEvent e) {
    72                                 osmItem.setEnabled(true);
     68        //Add content to the window.
     69        frame.setJMenuBar(smedMenu);
     70        frame.add(smedTabs, BorderLayout.CENTER);
     71        frame.add(smedStatusBar,BorderLayout.PAGE_END);
    7372
    74                                 closeDialog();
    75                         }
    76                 });
    77                 frame.setSize(new Dimension(420, 470));
    78                 // frame.pack();
    79                 frame.setVisible(true);
    80         }
     73        //Display the window.
     74        frame.addWindowListener(new java.awt.event.WindowAdapter() {
     75                public void windowClosing(java.awt.event.WindowEvent e) {
     76                        osmItem.setEnabled(true);
     77                       
     78                        closeDialog();
     79                }
     80        });
     81        frame.setSize(new Dimension(420, 470));
     82        // frame.pack();
     83        frame.setVisible(true);
     84    }
     85
    8186
    8287        public void closeDialog() {
    8388                List<SmedPluggable> plugins = SmedTabbedPane.getPlugins();
    84 
    85                 if (plugins != null) {
    86                         for (SmedPluggable p : plugins)
    87                                 p.stop();
     89               
     90                if(plugins != null) {
     91                        for(SmedPluggable p : plugins) p.stop();
    8892                }
    89 
    90                 if (isOpen) {
     93               
     94                if(isOpen) {
    9195                        frame.setVisible(false);
    9296                        frame.dispose();
    9397                }
    94 
     98               
    9599                isOpen = false;
    96100        }
    97101
     102
    98103        public void setOsmItem(JMenuItem item) {
    99                 osmItem = item;
     104                osmItem = item;         
    100105        }
    101106
Note: See TracChangeset for help on using the changeset viewer.