Package org.wicketstuff.pickwick.bean

Examples of org.wicketstuff.pickwick.bean.Sequence


   * @param imageDirectory the directory containing images and a sequence file
   * @return
   */
  public static Sequence readSequence(File imageDirectory) {
    XmlBeanMapper<Sequence> mapper = new XmlBeanMapper<Sequence>(Sequence.class);
    Sequence sequence = new Sequence();
    InputStream in = null;
    try {
      in = new FileInputStream(getSequenceFile(imageDirectory));
      sequence = mapper.bindInBean(in);
    } catch (FileNotFoundException e) { 
View Full Code Here


   
    form.add(new AjaxSubmitButton("save", form) {

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form form) {
        Sequence sequence = (Sequence) form.getModelObject();
        ImageUtils.writeSequence(sequence, imageDirectory);
        log.info("Wrote sequence: " + sequence + " to image directory: " + imageDirectory);
        onSave(target);
      }
View Full Code Here

    add(feedbackPanel);
  }

  public void setImageDirectory(File file) {
    this.imageDirectory = file;
    Sequence sequenceProperties = ImageUtils.readSequence(file);
    if (sequenceProperties == null){
      sequenceProperties = new Sequence();
      sequenceProperties.setRoles(new ArrayList<Role>());
    }
    log.debug("sequence: " + sequenceProperties);
    form.setModel(new CompoundPropertyModel(sequenceProperties));
    //description.setModel(new PropertyModel(form.getModelObject(), "description"));
  }
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.