Changeset 1102 for trunk/src/org/apollo/io/SampledAudioFileImporter.java
- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/apollo/io/SampledAudioFileImporter.java
r318 r1102 1 1 package org.apollo.io; 2 2 3 import java.awt.Point;4 3 import java.io.File; 5 4 import java.io.IOException; 6 5 7 6 import org.apollo.widgets.SampledTrack; 8 import org.expeditee.gui.DisplayIO; 7 import org.expeditee.core.Point; 8 import org.expeditee.gui.DisplayController; 9 9 import org.expeditee.importer.FileImporter; 10 10 import org.expeditee.items.Item; … … 18 18 public class SampledAudioFileImporter implements FileImporter { 19 19 20 public Item importFile(File f, Point location) throws IOException { 21 22 if (location == null || !AudioIO.canImportFile(f) || 23 DisplayIO.getCurrentFrame() == null) return null; 20 public Item importFile(File f, Point location) throws IOException 21 { 22 if (location == null || !AudioIO.canImportFile(f) || DisplayController.getCurrentFrame() == null) return null; 24 23 25 24 SampledTrack trackWidget = SampledTrack.createFromFile( 26 25 f, 27 Display IO.getCurrentFrame(),26 DisplayController.getCurrentFrame(), 28 27 location.x, 29 28 location.y); 30 29 31 30 // Add the sampled track widget to the current frame 32 Display IO.getCurrentFrame().addAllItems(trackWidget.getItems());31 DisplayController.getCurrentFrame().addAllItems(trackWidget.getItems()); 33 32 34 33 return trackWidget.getSource(); // Don't allow for other importers to deal with this file
Note:
See TracChangeset
for help on using the changeset viewer.