Changeset 23954 in osm for applications/editors/josm
- Timestamp:
- 2010-10-31T11:45:55+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/SimpleVideoPlayer.java
r23529 r23954 2 2 import java.awt.Adjustable; 3 3 import org.apache.log4j.Logger; 4 import org.apache.log4j.helpers.DateTimeDateFormat; 4 5 5 6 import java.awt.BorderLayout; … … 13 14 import java.beans.PropertyChangeListener; 14 15 import java.io.File; 16 import java.sql.Time; 17 import java.text.DateFormat; 15 18 import java.text.SimpleDateFormat; 16 19 import java.util.Date; … … 18 21 import java.util.Hashtable ; 19 22 import java.util.Set; 23 import java.util.TimeZone; 20 24 import java.util.Timer; 21 25 import java.util.TimerTask; … … 340 344 if(mp.isPlaying()) 341 345 { 342 setTitle(ms.format(new Date(mp.getTime()))); 346 long millis=mp.getTime(); 347 String s = String.format("%02d:%02d:%02d", //dont know why normal Java date utils doesn't format the time right 348 TimeUnit.MILLISECONDS.toHours(millis), 349 TimeUnit.MILLISECONDS.toMinutes(millis) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)), 350 TimeUnit.MILLISECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)) 351 ); 352 //setTitle(ms.format(new Time(sec))); 353 setTitle(s); 343 354 syncTimeline=true; 344 355 timeline.setValue(Math.round(mp.getPosition()*100));
Note:
See TracChangeset
for help on using the changeset viewer.