Ignore:
Timestamp:
2010-09-15T12:51:36+02:00 (14 years ago)
Author:
guardian
Message:

minor UI changes

Location:
applications/editors/josm/plugins/videomapping
Files:
4 added
4 edited

Legend:

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

    r22690 r23173  
    347347        public void jump(long relTime) {
    348348                int pos = Math.round(relTime/1000);//TODO ugly quick hack       
    349                 jump(pos);                             
     349                jump(pos);
     350                //if (autoCenter) Main.map.mapView.
    350351        }
    351352       
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/PositionLayer.java

    r23172 r23173  
    268268                                {
    269269                                        player.jump(wp);
    270                                         if(gps!=null) notifyObservers(player.getRelativeTime()); //call videoplayer to set rigth position
     270                                        //jump if we know position
     271                                        if(wp.attr.containsKey("synced"))
     272                                        {                                               
     273                                                if(gps!=null) notifyObservers(player.getRelativeTime()); //call videoplayers to set right position
     274                                        }
    271275                                }
    272276                        }
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoMappingPlugin.java

    r23172 r23173  
    147147                };
    148148               
    149                 VStart = new JosmAction(tr("play/pause"), "audio-playpause", tr("starts/pauses video playback"),
    150                                 Shortcut.registerShortcut("videomapping:startstop","",KeyEvent.VK_SPACE, Shortcut.GROUP_DIRECT), false) {
     149                VStart = new JosmAction(tr("Play/Pause"), "audio-playpause", tr("starts/pauses video playback"),
     150                                Shortcut.registerShortcut("videomapping:startstop","",KeyEvent.VK_NUMPAD5, Shortcut.GROUP_DIRECT), false) {
    151151                       
    152152                        public void actionPerformed(ActionEvent e) {                                                           
     
    154154                        }
    155155                };
    156                 Vbackward = new JosmAction(tr("backward"), "audio-prev", tr("jumps n sec back"),
     156                Vbackward = new JosmAction(tr("Backward"), "audio-prev", tr("jumps n sec back"),
    157157                                Shortcut.registerShortcut("videomapping:backward","",KeyEvent.VK_NUMPAD4, Shortcut.GROUP_DIRECT), false) {
    158                        
    159                         /**
    160                                          *
    161                                          */
    162                                         private static final long serialVersionUID = -1060444361541900464L;
    163 
    164158                        public void actionPerformed(ActionEvent e) {
    165159                                player.backward();
     
    167161                        }
    168162                };
    169                 Vbackward = new JosmAction(tr("jump"), null, tr("jumps to the entered gps time"),null, false) {                 
     163                Vbackward = new JosmAction(tr("Jump To"), null, tr("jumps to the entered gps time"),null, false) {                     
    170164                        public void actionPerformed(ActionEvent e) {
    171165                                String s =JOptionPane.showInputDialog(tr("please enter GPS timecode"),"10:07:57");
     
    185179                        }
    186180                };
    187                 Vforward= new JosmAction(tr("forward"), "audio-next", tr("jumps n sec forward"),
     181                Vforward= new JosmAction(tr("Forward"), "audio-next", tr("jumps n sec forward"),
    188182                                Shortcut.registerShortcut("videomapping:forward","",KeyEvent.VK_NUMPAD6, Shortcut.GROUP_DIRECT), false) {
    189183                       
     
    193187                        }
    194188                };
    195                 Vfaster= new JosmAction(tr("faster"), "audio-faster", tr("faster playback"),
    196                                 Shortcut.registerShortcut("videomapping:faster","",KeyEvent.VK_PLUS, Shortcut.GROUP_DIRECT), false) {
     189                Vfaster= new JosmAction(tr("Faster"), "audio-faster", tr("faster playback"),
     190                                Shortcut.registerShortcut("videomapping:faster","",KeyEvent.VK_NUMPAD8, Shortcut.GROUP_DIRECT), false) {
    197191                       
    198192                        public void actionPerformed(ActionEvent e) {
     
    201195                        }
    202196                };
    203                 Vslower= new JosmAction(tr("slower"), "audio-slower", tr("slower playback"),
    204                                 Shortcut.registerShortcut("videomapping:slower","",KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), false) {
     197                Vslower= new JosmAction(tr("Slower"), "audio-slower", tr("slower playback"),
     198                                Shortcut.registerShortcut("videomapping:slower","",KeyEvent.VK_NUMPAD2, Shortcut.GROUP_DIRECT), false) {
    205199                       
    206200                        public void actionPerformed(ActionEvent e) {
     
    209203                        }
    210204                };
    211                 Vloop= new JosmAction(tr("loop"), "clock", tr("loops n sec around current position"),
    212                                 Shortcut.registerShortcut("videomapping:loop","",KeyEvent.VK_NUMPAD5, Shortcut.GROUP_DIRECT), false) {
     205                Vloop= new JosmAction(tr("Loop"), null, tr("loops n sec around current position"),
     206                                Shortcut.registerShortcut("videomapping:loop","",KeyEvent.VK_NUMPAD7, Shortcut.GROUP_DIRECT), false) {
    213207                       
    214208                        public void actionPerformed(ActionEvent e) {
     
    219213               
    220214                //now the options menu
    221                 VCenterIcon = new JCheckBoxMenuItem(new JosmAction(tr("Keep centered"), "cursor/crosshair", tr("follows the video icon automaticly"),null, false) {
     215                VCenterIcon = new JCheckBoxMenuItem(new JosmAction(tr("Keep centered"), null, tr("follows the video icon automaticly"),null, false) {
    222216                       
    223217                        public void actionPerformed(ActionEvent e) {
    224218                                autocenter=VCenterIcon.isSelected();
     219                                player.setAutoCenter(autocenter);
    225220                                applySettings();
    226221                                saveSettings();
     
    229224                });
    230225                //now the options menu
    231                 VSubTitles = new JCheckBoxMenuItem(new JosmAction(tr("Subtitles"), "cursor/crosshair", tr("Show subtitles in video"),null, false) {
     226                VSubTitles = new JCheckBoxMenuItem(new JosmAction(tr("Subtitles"), null, tr("Show subtitles in video"),null, false) {
    232227                       
    233228                        public void actionPerformed(ActionEvent e) {
  • applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java

    r22690 r23173  
    2323public class GPSVideoPlayer implements PlayerObserver{
    2424        Timer t;
    25         TimerTask syncGPSTrack;
     25        TimerTask updateGPSTrack;
    2626        private GpsPlayer gps;
    2727        private SimpleVideoPlayer video;
     
    6464                        public void playing(long time) {
    6565                                //sync the GPS back
    66                                 if(synced) gps.jump(getGPSTime(time));                 
     66                                if(synced) gps.jump(getGPSTime(time));
     67                               
    6768                        }
    6869
     
    187188               
    188189        }
     190       
     191        public boolean isSynced()
     192        {
     193                return isSynced();
     194        }
    189195
    190196        public void loop() {
Note: See TracChangeset for help on using the changeset viewer.