Ignore:
Timestamp:
09/23/08 16:00:42 (16 years ago)
Author:
bjn8
Message:

Refactored a class name and extended recorder widgets to have a perminant lifetime option (for optimum idea capturing!)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src_apollo/org/apollo/widgets/SampledTrack.java

    r315 r318  
    7777 *
    7878 */
    79 public class SampledTrackEvo4 extends HeavyDutyInteractiveWidget
     79public class SampledTrack extends HeavyDutyInteractiveWidget
    8080        implements TrackModelHandler, EffecientInvalidator, Observer {
    8181
     
    133133         *
    134134         */
    135         private SampledTrackEvo4(Text source, byte[] audioBytes, AudioFormat format, TrackMixSubject mixTemplate) {
     135        private SampledTrack(Text source, byte[] audioBytes, AudioFormat format, TrackMixSubject mixTemplate) {
    136136               
    137137                super(source, new EditableSampledTrackGraphView(),
     
    179179         *              Can have a ARG_IMPORT_TAG argument...
    180180         */
    181         public SampledTrackEvo4(Text source, String[] args) {
     181        public SampledTrack(Text source, String[] args) {
    182182                super(source, new EditableSampledTrackGraphView(),
    183183                                100, -1,
     
    292292                                       
    293293                                        // Determine where popup should show
    294                                         int x = SampledTrackEvo4.this.getX();
    295                                         int y = SampledTrackEvo4.this.getY() - playbackControlPopup.getHeight() - 2; // by default show above
     294                                        int x = SampledTrack.this.getX();
     295                                        int y = SampledTrack.this.getY() - playbackControlPopup.getHeight() - 2; // by default show above
    296296                                       
    297297                                        // I get sick.dizzy from the popup expanding from the whole thing...
     
    300300                                       
    301301                                        if (y < 0) {
    302                                                 y = SampledTrackEvo4.this.getY() + SampledTrackEvo4.this.getHeight() + 2;
     302                                                y = SampledTrack.this.getY() + SampledTrack.this.getHeight() + 2;
    303303                                                animationSource.y = y - 2;
    304304                                        }
     
    432432                                if (trackModel != null && !nameLabel.getText().equals(trackModel.getName())) {
    433433                                        trackModel.setName(nameLabel.getText());
    434                                         SampledTrackEvo4.this.updateData(TrackWidgetCommons.META_NAME_TAG, trackModel.getName());
     434                                        SampledTrack.this.updateData(TrackWidgetCommons.META_NAME_TAG, trackModel.getName());
    435435                                       
    436436                                }
     
    449449
    450450        /**
    451          * Creates a {@link SampledTrackEvo4} instantly from audio bytes in memory and adds it to a given frame.
     451         * Creates a {@link SampledTrack} instantly from audio bytes in memory and adds it to a given frame.
    452452         * @param audioBytes
    453453         *                      The audio samples.
     
    474474         *                      If null then default mix settings will be used.
    475475         *
    476          * @return The {@link SampledTrackEvo4} instance added to the given frame.
    477          *
    478          */
    479         public static SampledTrackEvo4 createFromMemory(
     476         * @return The {@link SampledTrack} instance added to the given frame.
     477         *
     478         */
     479        public static SampledTrack createFromMemory(
    480480                        byte[] audioBytes,
    481481                        AudioFormat format,
     
    530530                source.setData(data);
    531531               
    532                 SampledTrackEvo4 strack = new SampledTrackEvo4(source, audioBytes, format, mixTemplate);
     532                SampledTrack strack = new SampledTrack(source, audioBytes, format, mixTemplate);
    533533
    534534                return strack;
     
    537537       
    538538        /**
    539          * Creates a {@link SampledTrackEvo4} from file - which is tyo be imported into apollos
     539         * Creates a {@link SampledTrack} from file - which is tyo be imported into apollos
    540540         *
    541541         * @param targetFrame
     
    545545         *                      The audio file to import
    546546         *
    547          * @return The {@link SampledTrackEvo4} instance added to the given frame.
    548          *
    549          */
    550         public static SampledTrackEvo4 createFromFile(File file, Frame targetFrame, int x, int y) {
     547         * @return The {@link SampledTrack} instance added to the given frame.
     548         *
     549         */
     550        public static SampledTrack createFromFile(File file, Frame targetFrame, int x, int y) {
    551551                assert (targetFrame != null);
    552552                assert (file != null);
     
    576576                source.setData(data);
    577577
    578                 SampledTrackEvo4 strack = new SampledTrackEvo4(source, args);
     578                SampledTrack strack = new SampledTrack(source, args);
    579579
    580580                return strack;
     
    632632                } else {
    633633
    634                         return SampledTrackEvo4.createFromMemory(
     634                        return SampledTrack.createFromMemory(
    635635                                        trackModel.getAllAudioBytesCopy(),
    636636                                        trackModel.getFormat(),
     
    17931793                                invalidateStateIcons();
    17941794
    1795                                 SampledTrackEvo4.this.setWidgetEdgeThickness(TrackWidgetCommons.PLAYING_TRACK_EDGE_THICKNESS);
     1795                                SampledTrack.this.setWidgetEdgeThickness(TrackWidgetCommons.PLAYING_TRACK_EDGE_THICKNESS);
    17961796                                //FrameGraphics.refresh(true);
    17971797                                        break;
     
    18091809                                // and will get garbage collected
    18101810                               
    1811                                 SampledTrackEvo4.this.setWidgetEdgeThickness(TrackWidgetCommons.STOPPED_TRACK_EDGE_THICKNESS);
     1811                                SampledTrack.this.setWidgetEdgeThickness(TrackWidgetCommons.STOPPED_TRACK_EDGE_THICKNESS);
    18121812
    18131813                                break;
Note: See TracChangeset for help on using the changeset viewer.