Package net.alteiar.utils.file.images

Examples of net.alteiar.utils.file.images.TransfertImage


  private void revalidateFilter() throws IOException {
    if (filteredImageId == null) {
      return;
    }

    TransfertImage img = ImageBean.getImage(filteredImageId);
    BufferedImage filter = img.restoreImage();
    img.clearCache();

    if (filter.getWidth() != filterMap.getWidth()
        || filter.getHeight() != filterMap.getHeight()) {
      throw new IllegalArgumentException(
          "the image is not the same size as the map");
View Full Code Here


public class TestMap extends NewCampaignTest {

  public int verifyInnerClassCall;

  public static TransfertImage createTransfertImage(String path) {
    TransfertImage battleImages = null;
    try {
      battleImages = new SerializableImage(new File(path));
    } catch (IOException e) {
      fail("cannot read file " + path);
    }
View Full Code Here

import pathfinder.bean.unit.PathfinderCharacter;

public class TestCharacter extends NewCampaignTest {

  public static TransfertImage createTransfertImage(String path) {
    TransfertImage battleImages = null;
    try {
      battleImages = new SerializableImage(new File(path));
    } catch (IOException e) {
      fail("cannot read file " + path);
    }
View Full Code Here

public class WebImageSelector implements ImageSelectorStrategy {

  @Override
  public TransfertImage selectImage() {
    TransfertImage selectedImage = null;
    DialogOkCancel<UrlOkCancel> dialogUrl = new DialogOkCancel<UrlOkCancel>(
        null, "Choisir une image sur internet", true, new UrlOkCancel());

    dialogUrl.setOkText("Choisir");
    dialogUrl.setCancelText("Annuler");
View Full Code Here

public class LocalImageSelector implements ImageSelectorStrategy {

  @Override
  public TransfertImage selectImage() {
    TransfertImage selectedImage = null;
    File imageFile = StaticDialog.getSelectedImageFile(null);

    if (imageFile != null) {
      try {
        selectedImage = new SerializableImage(imageFile);
View Full Code Here

public class DocumentImageSelector implements ImageSelectorStrategy {

  @Override
  public TransfertImage selectImage() {
    TransfertImage selectedImage = null;

    /*
     * DialogOkCancel<UrlOkCancel> dialogUrl = new
     * DialogOkCancel<UrlOkCancel>( MainFrame.FRAME,
     * "Choisir une image sur internet", true, new UrlOkCancel());
View Full Code Here

    gbc_lblPreview.gridy = 3;
    add(lblPreview, gbc_lblPreview);
  }

  private void selectImage(ImageSelectorStrategy selector) {
    TransfertImage tmp = selector.selectImage();

    if (tmp != null) {
      transfertImage = tmp;
    }
View Full Code Here

  private void selectImage(final ImageSelectorStrategy selector) {
    Threads.execute(new MyRunnable() {

      @Override
      public void run() {
        TransfertImage tmp = selector.selectImage();

        if (tmp != null) {
          transfertImage = tmp;
          try {
            BufferedImage img = transfertImage.restoreImage();
View Full Code Here

  public TransfertImage getImage() {
    return image;
  }

  public void setImage(TransfertImage image) {
    TransfertImage oldValue = this.image;
    if (notifyRemote(PROP_IMAGE_PROPERTY, oldValue, image)) {
      this.image = image;
      notifyLocal(PROP_IMAGE_PROPERTY, oldValue, image);
    }
  }
View Full Code Here

TOP

Related Classes of net.alteiar.utils.file.images.TransfertImage

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.