Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/apollo/io/SampledAudioFileImporter.java

    r318 r1102  
    11package org.apollo.io;
    22
    3 import java.awt.Point;
    43import java.io.File;
    54import java.io.IOException;
    65
    76import org.apollo.widgets.SampledTrack;
    8 import org.expeditee.gui.DisplayIO;
     7import org.expeditee.core.Point;
     8import org.expeditee.gui.DisplayController;
    99import org.expeditee.importer.FileImporter;
    1010import org.expeditee.items.Item;
     
    1818public class SampledAudioFileImporter implements FileImporter {
    1919
    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;
    2423               
    2524                SampledTrack trackWidget = SampledTrack.createFromFile(
    2625                                f,
    27                                 DisplayIO.getCurrentFrame(),
     26                                DisplayController.getCurrentFrame(),
    2827                                location.x,
    2928                                location.y);
    3029               
    3130                // Add the sampled track widget to the current frame
    32                 DisplayIO.getCurrentFrame().addAllItems(trackWidget.getItems());
     31                DisplayController.getCurrentFrame().addAllItems(trackWidget.getItems());
    3332               
    3433                return trackWidget.getSource(); // Don't allow for other importers to deal with this file
Note: See TracChangeset for help on using the changeset viewer.