Package org.jwildfire.transform

Examples of org.jwildfire.transform.Transformer


  }

  public void fillInputBufferCmb() {
    Object selItem = transformerInputCmb.getSelectedItem();
    transformerInputCmb.removeAllItems();
    Transformer transformer = scriptProcessor.getTransformer();
    if (transformer != null) {
      for (Buffer buffer : getBufferList()) {
        if (transformer.acceptsInputBufferType(buffer.getBufferType()))
          transformerInputCmb.addItem(buffer.getName());
      }
    }
    if (transformerInputCmb.getItemCount() == 1)
      transformerInputCmb.setSelectedIndex(0);
View Full Code Here


  private String lastInitBuffer = null;

  public void setTransformerInput(String pName) {
    if (executing)
      return;
    Transformer transformer = scriptProcessor.getTransformer();
    if ((transformer != null)
        && ((lastInitBuffer == null) || !lastInitBuffer.equals(pName))) {
      lastInitBuffer = pName;
      Buffer buffer = getBufferList().bufferByName(pName);
      if ((buffer != null)
          && (buffer.getBufferType() == BufferType.IMAGE)) {
        transformer.initDefaultParams(buffer.getImage());
        currTransformerPropertyPanel.writeToObject(transformer);
      }
    }
  }
View Full Code Here

      }
    }
  }

  public void applyTransformerPreset(String presetName) {
    Transformer transformer = scriptProcessor.getTransformer();
    if (transformer != null) {
      SimpleImage img = null;
      String inputName = (String) transformerInputCmb.getSelectedItem();
      if (inputName != null && inputName.length() > 0) {
        Buffer inBuffer = getBufferList().bufferByName(inputName);
        if (inBuffer != null && inBuffer.getBufferType() == BufferType.IMAGE) {
          img = inBuffer.getImage();
        }
      }
      transformer.applyPreset(presetName, img);
    }
  }
View Full Code Here

  }

  public void fillTransformerPresetCmb() {
    Object selItem = transformerPresetCmb.getSelectedItem();
    transformerPresetCmb.removeAllItems();
    Transformer transformer = scriptProcessor.getTransformer();
    if (transformer != null) {
      if (transformer.getPresets().size() > 0) {
        transformerPresetCmb.addItem("(restore defaults)");
      }
      for (Preset preset : transformer.getPresets()) {
        transformerPresetCmb.addItem(preset.getName());
      }
    }
    if (selItem != null) {
      transformerPresetCmb.setSelectedItem(selItem);
View Full Code Here

  }

  private void transformersList_valueChanged(
      javax.swing.event.ListSelectionEvent e) {
    String name = (String) transformersList.getSelectedValue();
    Transformer currTransformer = mainController.getTransformer();
    if ((currTransformer == null)
        || (!currTransformer.getName().equals(name))) {
      mainController.selectTransformer(name);
      mainController.fillInputBufferCmb();
      presetRefreshing = true;
      try {
        mainController.fillTransformerPresetCmb();
View Full Code Here

        creatorSizePresetCmb.setSelectedItem(preset);
    }
  }

  public void enableControls() {
    Transformer t = mainController.getTransformer();
    transformerOutputMesh3DCBx.setEnabled((t != null)
          && t.supports3DOutput());
  }
View Full Code Here

TOP

Related Classes of org.jwildfire.transform.Transformer

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.