Package net.alteiar.beans.media

Examples of net.alteiar.beans.media.ImageBean


    return DocumentTypeConstant.IMAGE;
  }

  @Override
  public BasicBean buildDocument() {
    return new ImageBean(transfertImage);
  }
View Full Code Here


  @Override
  public void setDocument(BeanDocument doc) {
    this.removeAll();

    ImageBean imgBean = doc.getBean();
    if (imgBean != null) {
      try {
        BufferedImage img = imgBean.getImage().restoreImage();

        PanelImage imgPane = new PanelImage(img);
        PanelMoveZoom<PanelImage> scroll = new PanelMoveZoom<PanelImage>(
            imgPane);
View Full Code Here

    this.acTouch = acTouch;
  }

  // ////////////// METHODS /////////////////
  public BufferedImage getCharacterImage() {
    ImageBean image = CampaignClient.getInstance().getBean(this.image);
    if (image == null) {
      return null;
    }
    try {
      return image.getImage().restoreImage();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  }
View Full Code Here

    this.will = will;
  }

  // ////////////// METHODS /////////////////
  public BufferedImage getMonsterImage() {
    ImageBean image = CampaignClient.getInstance().getBean(this.image);
    if (image == null) {
      return null;
    }
    try {
      return image.getImage().restoreImage();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  }
View Full Code Here

    this.image = image;
  }

  // ////////////// METHODS /////////////////
  public BufferedImage getMonsterImage() {
    ImageBean image = CampaignClient.getInstance().getBean(this.image);
    if (image == null) {
      return null;
    }
    try {
      return image.getImage().restoreImage();
    } catch (IOException e) {
      e.printStackTrace();
    }
    return null;
  }
View Full Code Here

    return "Aucun avatar selectionn\u00E9e";
  }

  @Override
  public BasicBean buildDocument() {
    ImageBean image = new ImageBean(transfertImage);

    String name = textFieldName.getText();
    Integer hp = Integer.valueOf(textFieldHp.getText());

    Integer cr = 1;

    Integer ac = panelAc.getAc();
    Integer acFlatFooted = panelAc.getAcFlatFooted();
    Integer acTouch = panelAc.getAcTouch();

    Integer reflex = 0;
    Integer fortitude = 0;
    Integer will = 0;

    MonsterBuilder monster = new MonsterBuilder(name, image.getId(), hp,
        cr, ac, acFlatFooted, acTouch, reflex, fortitude, will);

    // save the image as perma bean
    CampaignClient.getInstance().savePerma(image);
    MonsterManager.getInstance().addMonsterBuilder(monster);
View Full Code Here

    return "Aucun avatar selectionn\u00E9e";
  }

  @Override
  public BasicBean buildDocument() {
    ImageBean image = new ImageBean(transfertImage);
    CampaignClient.getInstance().addBean(image);

    String name = textFieldName.getText();
    Integer hp = Integer.valueOf(textFieldHp.getText());

    Integer ac = panelAc.getAc();
    Integer acFlat = panelAc.getAcFlatFooted();
    Integer acTouch = panelAc.getAcTouch();

    PathfinderCharacter character = new PathfinderCharacter(name, hp, hp,
        ac, acTouch, acFlat, 0, image.getId());

    return character;
  }
View Full Code Here

    File imgFile = StaticDialog.getSelectedImageFile((Component) action
        .getSource());

    if (imgFile != null) {
      try {
        ImageBean bean = new ImageBean(new SerializableImage(imgFile));
        CampaignClient.getInstance().addBean(bean);
        // BufferedImage img = ImageIO.read(imgFile);
        filter.setFilteredImageId(bean.getId());
      } catch (IOException e) {
        Logger.getLogger(getClass()).error(
            "Impossible de lire l'image filtre", e);
      } catch (IllegalArgumentException e) {
        Logger.getLogger(getClass()).warn(
View Full Code Here

TOP

Related Classes of net.alteiar.beans.media.ImageBean

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.