Package org.wicketstuff.pickwick.bean

Examples of org.wicketstuff.pickwick.bean.Sequence


    super(id, model);
  }
 
  protected String renderNode(TreeNode node) {
    Folder folder = (Folder) ((DefaultMutableTreeNode) node).getUserObject();
    Sequence sequence = ImageUtils.readSequence(folder.getFile());
    return new DisplaySequence(sequence, folder.getFile()).getTitle();
  }
View Full Code Here


              .getRelativePathPrefixToContextRoot()
              + PickwickApplication.THUMBNAIL_IMAGE_PATH + "/" + imagePath)));
          link.add(new Label("thumbnailLabel", imageProperties.getTitle()));
        } else if (item.getModelObject() instanceof Folder){
          final Folder folder = (Folder) item.getModelObject();
          Sequence sequence = imageUtils.readSequence(folder.getFile());
          WebMarkupContainer link;
          item.add(link = new WebMarkupContainer("link"){
            @Override
            protected void onComponentTag(ComponentTag tag) {
              super.onComponentTag(tag);
              tag.put("href", imageUtils.getRelativePath(folder.getFile()));
            }
          });
          WebComponent image;
          link.add(image = new WebComponent("thumbnail"){
            @Override
            protected void onComponentTag(ComponentTag tag) {
              super.onComponentTag(tag);
              tag.put("src", urlFor(new ResourceReference(SequenceGridPanel.class, "images/folder.png")));
            }
          });
          String title = null;
          if (sequence != null){
            title = sequence.getTitle();
          }
          if (title == null){
            title = folder.getFile().getName();
          }
          link.add(new Label("thumbnailLabel", title));
View Full Code Here

  }
 
  public void readSequence() {
    if (uri != null) {
      File imageDir = imageUtils.toFile(uri);
      Sequence sequence = ImageUtils.readSequence(imageDir);
      setDefaultModel(new CompoundPropertyModel(new DisplaySequence(sequence, imageDir)));
    }
  }
View Full Code Here

    Folder folder = imageUtils.getFolderFor(PickwickSession.get().getUser().getRoles());
    fillFolders(folder);
    String basePath = settings.getImageDirectoryRoot().getAbsolutePath();
    for (Folder current : folders){
     
      Sequence sequence = ImageUtils.readSequence(current.getFile());
      if (sequence != null && sequence.getLatitude() != 0 && sequence.getLongitude() != 0){
        GMarker wicketLibrary = new GMarker(new GLatLng(sequence.getLatitude(), sequence.getLongitude()));
     
            //new EmptyPanel("gmarkerInfo"));//("gmarkerInfo", sequence, current));
//            new DescriptionPanel("gmarkerInfo", current.getFile().getAbsolutePath().substring(settings.getImageDirectoryRoot().getAbsolutePath().length(), current.getFile().getAbsolutePath().length())));
            gmap.addOverlay(wicketLibrary);
      }
View Full Code Here

 
 
  public void readSequence() {
    if (uri != null) {
      File imageDir = imageUtils.toFile(uri);
      Sequence sequence = ImageUtils.readSequence(imageDir);
      setDefaultModel( new CompoundPropertyModel( new DisplaySequence( sequence, imageDir ) ) );
//      setModel(new CompoundPropertyModel(new DisplaySequence(sequence, imageDir)));
    }
  }
View Full Code Here

   */
  @Override
  protected void onBeforeRender() {
    super.onBeforeRender();
    File imageDir = imageUtils.toFile(uri).getParentFile();
    Sequence sequence = imageUtils.readSequence(imageDir);
    setDefaultModel(new CompoundPropertyModel(new DisplaySequence(sequence, imageDir)));
  }
View Full Code Here

    SyndEntry entry;
    SyndContent description;

    for (File dir : results) {
      entry = new SyndEntryImpl();
      Sequence sequence = ImageUtils.readSequence(dir);
      if (sequence == null) {
        entry.setTitle(dir.getName());
        entry.setUpdatedDate(new Date(dir.lastModified()));
      } else {
        entry.setTitle(sequence.getTitle());
      }

      entry.setLink(settings.getBaseURL() + "/" + imageUtils.buildSequencePath(dir));

      // FIXME add a description == sequence caption
View Full Code Here

    List<Role> roles = session.getUser().getRoles();
    File f = new File(imagePath);
    if (f.exists()){
      while (!f.isDirectory()) {
        f = new File(f.getParent());
        Sequence s = ImageUtils.readSequence(f);
        if (s != null){
          if (!isAuthorized(roles, s.getRoles())){
            throw new RestartResponseAtInterceptPageException(PickwickLoginPage.class);
          }else{
            return;
          }
        }else{
View Full Code Here

    }

    for (int i = 0; i < files.length; i++) {
      File file = files[i];
      try {
        Sequence sequence = readSequence(file);
        List<Role> roles = null;
        if (sequence != null){
          roles = sequence.getRoles();
        }
        if (PickwickAuthorization.isAuthorized(userRole, roles)){
          Folder current = new Folder(file);
          folderList.add(current);
        }
View Full Code Here

   
    if (folder.isDirectory()){
      ArrayList<Folder> toReturn = new ArrayList<Folder>();
      for (File file : folder.listFiles()){
        if (file.isDirectory()){
          Sequence sequence = readSequence(file);
          List<Role> roles = null;
          if (sequence != null){
            roles = sequence.getRoles();
          }
          if (PickwickAuthorization.isAuthorized(userRole, roles)){
            Folder current = new Folder(file);
            current.setSubFolders(getSubFolder(file, userRole));
            toReturn.add(current);
View Full Code Here

TOP

Related Classes of org.wicketstuff.pickwick.bean.Sequence

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.