Package org.adamtacy.client.ui.effects.impl.css

Examples of org.adamtacy.client.ui.effects.impl.css.Property


   * @param start
   * @param end
   */
  protected void registerProperties(Rule start, Rule end, Property replaceStart, Property replaceEnd) {
    propertyPairs = new Vector<PropertyPair>();
    Property entryStart;
    Property entryEnd;
    boolean replacedStart = false;
    boolean replacedEnd = false;
    // Since we are interested in end properties, iterate over them.
    for (Iterator<String> it = end.getProperties().keySet().iterator(); it.hasNext();) {
      // Get the property name
View Full Code Here


    // Iterate over the property pairs to ensure values are set.
    for (Iterator<PropertyPair> it = propertyPairs.iterator(); it.hasNext();) {
      try {
        PropertyPair theMorph = it.next();
        String styleName = theMorph.end.getName();
        Property start = theMorph.start;
        Property end = theMorph.end;
        if (start == null) {
          // Attempt to get value from the DOM
          start = new Property(styleName + ":"
              + StyleImplementation.getComputedStyle(effectElement, styleName));
        }
        // Now determine that type of change that is required.
        ChangeInterface theChange;
        if (StyleImplementation.isColour(start.toString())) {
          // It's a colour change
          theChange = new NChangeColorAction(start.getValue(), end.getValue());
          determinedEffects.put(styleName, theChange);
          theChange.setUp(effectElement, styleName, switchFrameNumber);
        } else if (StyleImplementation.isClip(start.toString())) {
          // It's a clip change
          // Order of check moved due to Issue #108
          theChange = new NChangeClipAction(start.getUnitizedValue(),
              end.getUnitizedValue());
          determinedEffects.put(styleName, theChange);
          theChange.setUp(effectElement, styleName, switchFrameNumber);
        } else if (StyleImplementation.isScalar(start.toString(),
            start.getUnitizedValue())) {
          // It's a scalar change
          theChange = new NChangeScalarAction(start.getValue()
              + start.getUnits(), end.getValue() + end.getUnits());
          determinedEffects.put(styleName, theChange);
          theChange.setUp(effectElement, styleName, switchFrameNumber);
        } else {
          // Assume its a binary style
          GWT.log(
              "GWT-FX: Assuming that "
                  + start.getName()
                  + " is a style attribute that switches as a binary (have you forgotten to include the unit (px/pt/em etc)?",
              null);
          theChange = new NChangeBinaryAction(start.getValue(), end.getValue());
          determinedEffects.put(styleName, theChange);
          theChange.setUp(effectElement, styleName, switchFrameNumber);
        }
      } catch (RuntimeException e) {
        GWT.log("MorphEffect CSS Style Exception", e);
View Full Code Here

TOP

Related Classes of org.adamtacy.client.ui.effects.impl.css.Property

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.