Package com.life.audiotageditor.model

Examples of com.life.audiotageditor.model.AudioModel


          audioTagDetailTextValue, audioTag);

      AudioView audioView = (AudioView) PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getActivePage()
          .findView(AudioView.ID);
      AudioModel audioModel = (AudioModel) AudioModelManager.instance()
          .getRoot();

      AudioFolder audioFolder = (AudioFolder) audioModel
          .getFolder(StringUtil.formatPath(audioFolderTextValue));
      audioView.getTreeViewer().setInput(audioFolder);
      audioView.getTreeViewer().setSelection(
          new StructuredSelection(audioFolder.members()[0]), true);
    }
View Full Code Here


    if (path == null || path.isEmpty()) {
      return null;
    }
    AudioView audioView = (AudioView) window.getActivePage().findView(
        AudioView.ID);
    AudioModel audioModel = (AudioModel) AudioModelManager.instance()
        .getRoot();
    AudioFile audioFile = (AudioFile) audioModel.getFile(StringUtil
        .formatPath(path));
    audioView.getTreeViewer().setInput(audioFile);
    audioView.getTreeViewer().setSelection(
        new StructuredSelection(audioFile), true);
    return null;
View Full Code Here

public class AudioTest {

  @Test
  public void workspaceTest() {
    AudioModel root = (AudioModel) AudioModelManager.instance().getRoot();
    IAudioFolder audioFolder = root.getFolder("D:/mp3/"); //$NON-NLS-1$

    AudioModel[] audioModels = (AudioModel[]) audioFolder.members();
    for (AudioModel audioModel : audioModels) {

      if (audioModel instanceof AudioFolder) {
View Full Code Here

public class AudioContentProvider extends WorkbenchContentProvider {

  @Override
  public Object[] getChildren(Object element) {
    if (element instanceof AudioModel) {
      AudioModel audioModel = ((AudioModel) element);
      switch (audioModel.getType()) {
      case IAudioModel.AUDIO_FOLDER:
        return ((AudioFolder) audioModel).members();
      case IAudioModel.AUDIO_FILE:
        return new Object[] { audioModel };
      }
View Full Code Here

public class AudioLabelProvider extends LabelProvider {

  @Override
  public Image getImage(Object element) {
    if (element instanceof AudioModel) {
      AudioModel audioModel = ((AudioModel) element);
      if (audioModel instanceof AudioFolder) {
        return Activator.getImageDescriptor("icons/folder.gif") //$NON-NLS-1$
            .createImage();
      }
      if (audioModel instanceof AudioFile) {
View Full Code Here

    if (path == null || path.isEmpty()) {
      return null;
    }
    AudioView audioView = (AudioView) window.getActivePage().findView(
        AudioView.ID);
    AudioModel audioModel = (AudioModel) AudioModelManager.instance()
        .getRoot();

    AudioFolder audioFolder = (AudioFolder) audioModel.getFolder(StringUtil
        .formatPath(path));
    audioView.getTreeViewer().setInput(audioFolder);
    audioView.getTreeViewer().setSelection(
        new StructuredSelection(audioFolder.members()[0]), true);
    return null;
View Full Code Here

  }

  @Override
  public Object[] getElements(Object element) {
    if (element instanceof AudioModel) {
      AudioModel audioModel = ((AudioModel) element);
      switch (audioModel.getType()) {
      case IAudioModel.AUDIO_FOLDER:
        return ((AudioFolder) audioModel).members();
      case IAudioModel.AUDIO_FILE:
        return new Object[] { audioModel };
      }
View Full Code Here

TOP

Related Classes of com.life.audiotageditor.model.AudioModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.