Package at.bestsolution.efxclipse.runtime.examples.media.model

Examples of at.bestsolution.efxclipse.runtime.examples.media.model.Media


 
  private Node focusNode;
 
  @PostConstruct
  void init(BorderPane p) {
    Media m = Media.deserialize(part.getPersistedState().get(MEDIA_OBJECT_KEY));
    if( m.getType() == MediaType.PICTURE ) {
      initPicture(p, m);
    } else if( m.getType() == MediaType.MOVIE ) {
      initMovie(p, m);
    } else {
      initSound(p, m);
    }
  }
View Full Code Here


    pane.setCenter(list);
  }
 
  void handleOpen() {
    MPartStack stack = (MPartStack) modelService.find("content.stack", perspective);
    Media m = list.getSelectionModel().getSelectedItem();
   
    if( m != null ) {
      String instance = Media.serialize(m);
     
      for( MStackElement e : stack.getChildren() ) {
        if( e instanceof MPart ) {
          if( instance.equals(e.getPersistedState().get(MediaPart.MEDIA_OBJECT_KEY)) ) {
            partService.activate((MPart) e);
            return;
          }
        }
      }
     
      MPart p = MBasicFactory.INSTANCE.createPart();
      p.setLabel(m.getName());
      if( m.getType() == MediaType.MOVIE ) {
        p.setIconURI("platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/22/kaffeine.png")
      } else if( m.getType() == MediaType.PICTURE ) {
        p.setIconURI("platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/22/games-config-background.png");
      } else {
        p.setIconURI("platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/22/player-volume.png");
      }
     
View Full Code Here

  }
 
  private static ObservableList<Media> createList(boolean videos) {
    ObservableList<Media> l = FXCollections.observableArrayList();
    if( ! videos ) {
      l.add(new Media(MediaType.PICTURE, "Mountains 1",     "platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/resources/pics/pic1.jpg"));
      l.add(new Media(MediaType.PICTURE, "Mountains 2", "platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/resources/pics/pic2.jpg"));
    } else {
      l.add(new Media(MediaType.MOVIE,   "Grog",       "platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/resources/movs/mov1.flv"));
    }
    return l;
  }
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.runtime.examples.media.model.Media

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.