Package org.newdawn.slick.particles.ConfigurableEmitter

Examples of org.newdawn.slick.particles.ConfigurableEmitter.LinearInterpolator


   *
   * @param e The event describing the change of state
   */
  public void itemStateChangedHandler(ItemEvent e) {
    String valueName = (String) controlToValueName.get(e.getSource());
    LinearInterpolator value = (LinearInterpolator) valueMap.get(valueName);

    if (e.getStateChange() == ItemEvent.SELECTED) {
      value.setActive(true);
      editor.registerValue(value, valueName);
    } else {
      value.setActive(false);
      editor.removeValue(valueName);
    }
  }
View Full Code Here


    properties.setMinimumSize(new Dimension(100, 20));
    properties.setPreferredSize(new Dimension(100, 20));
    properties.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent event) {
        String item = (String) event.getItem();
        LinearInterpolator currentValue = (LinearInterpolator) values
            .get(item);
        panel.setInterpolator(currentValue);
      }
    });
    top.add(properties);
View Full Code Here

   */
  public void setFirstProperty() {
    if (properties.getItemCount() > 0) {
      properties.setSelectedIndex(0);

      LinearInterpolator currentValue = (LinearInterpolator) values
          .get(properties.getSelectedItem());
      panel.setInterpolator(currentValue);
    }
  }
View Full Code Here

    GraphEditorWindow bottom = new GraphEditorWindow();

    ArrayList curve = new ArrayList();
    curve.add(new Vector2f(0.0f, 0.0f));
    curve.add(new Vector2f(1.0f, 255.0f));
    LinearInterpolator test = new ConfigurableEmitter("bla").new LinearInterpolator(
        curve, 0, 255);
    bottom.registerValue(test, "Test");

    curve = new ArrayList();
    curve.add(new Vector2f(0.0f, 255.0f));
    curve.add(new Vector2f(1.0f, 0.0f));
    test = new ConfigurableEmitter("bla").new LinearInterpolator(curve, 0,
        255);
    bottom.registerValue(test, "Test 2");

    main.add(bottom);
View Full Code Here

TOP

Related Classes of org.newdawn.slick.particles.ConfigurableEmitter.LinearInterpolator

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.