Changeset 21350 in osm for applications/editors


Ignore:
Timestamp:
2010-05-18T17:39:26+02:00 (14 years ago)
Author:
guardian
Message:

layer interaktion

Location:
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/PositionLayer.java

    r21299 r21350  
    1515import java.awt.Point;
    1616import java.awt.Rectangle;
     17import java.awt.event.ActionEvent;
    1718import java.awt.event.KeyEvent;
    1819import java.awt.event.KeyListener;
     
    4647                super(name);           
    4748                this.ls = ls;
     49                Action a = new AbstractAction() {
     50                        public void actionPerformed(ActionEvent e) {
     51                                // TODO Auto-generated method stub
     52                                System.err.println("!!!boom!!!");
     53                        }};
    4854                selected = new ArrayList<WayPoint>();
    4955                Main.map.mapView.addMouseListener(this);
    50                 Main.map.mapView.addKeyListener(this);
     56               
     57                //Main.panel.addKeyListener(this);
     58                //Main.map.mapView.addKeyListener(this);
     59                Main.contentPane.getInputMap().put(KeyStroke.getKeyStroke("SPACE"),"pressed");
     60                Main.contentPane.getActionMap().put("pressed",a);
     61
     62                //Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE,0),a);
     63                //Main.contentPane.getActionMap().put("doSomething",a);
     64                                               
    5165                it=ls.iterator();
    5266                Timer t  = new Timer();         
     
    188202                switch(e.getKeyCode())
    189203                {
    190                         case KeyEvent.VK_LEFT: sel = ls.get(50);
     204                        case KeyEvent.VK_LEFT:
     205                                {
     206                                        it.next();
     207                                        it.next();
     208                                        it.next();
     209                                        it.next();
     210                                        it.next();
     211                                        it.next();
     212                                        it.next();
     213                                        it.next();
     214                                        it.next();
     215                                        it.next();
     216                                        it.next();
     217                                        it.next();
     218                                        it.next();
     219                                        it.next();
     220                                        it.next();
     221                                        it.next();
     222                                        it.next();
     223                                }
    191224                }
    192225               
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoAction.java

    r21299 r21350  
    99
    1010import javax.swing.JFileChooser;
     11import javax.swing.KeyStroke;
    1112import javax.swing.filechooser.FileFilter;
    1213
     
    3536        // Choose a file
    3637        public void actionPerformed(ActionEvent arg0) {
    37        
    3838                copyGPSLayer();
    39                 Main.main.addLayer(new PositionLayer("test",ls));
     39                Main.main.addLayer(new PositionLayer("test",ls));               
     40
    4041        }
    4142               
Note: See TracChangeset for help on using the changeset viewer.