Examples of NChangeScalarAction


Examples of org.adamtacy.client.ui.effects.core.NChangeScalarAction

      int startVal; int endVal;
      // Deal with Widths
      startVal = getStartWidth(currEl);
      endVal = getEndWidth(currEl);
      if (startVal!=endVal){
        NChangeScalarAction theWidthChange = new NChangeScalarAction(startVal + "px", endVal + "px");
          temp.add(theWidthChange);
          theWidthChange.setUp(currEl, "width", 0);
      }
         
     
      // Deal with Heights
      startVal = getStartHeight(currEl);
      endVal = getEndHeight(currEl);
      if (startVal!=endVal){
        NChangeScalarAction theHeightChange = new NChangeScalarAction(startVal + "px", endVal + "px");
          temp.add(theHeightChange);
          theHeightChange.setUp(currEl, "height", 0);
      }

           
      // Deal with Fonts
      String res = StyleImplementation.getComputedStyle(currEl, "fontSize");

      if (res != null) {
        // We have a font to play with
        String unit = StyleImplementation.getUnits(res);
        double value = -1;
        if (unit==null || unit.equals("")) {
          // Assume we're dealing with a named font-size, as there are no units
          // so, find where this name is in our vector of font size names
          int scale = fontSizes.indexOf(res);
          // If we found it, calculate the font size
          if (scale>-1) {
            value = (double) Math.round(Math.pow(fontSizeScalingFactor, (scale - standardIndex)) * standardFontSize);
            unit = standardFontUnit;
          }
        } else {
          // Not a named font-size, so get the value
          value = (new Double(StyleImplementation.getValue(res, unit))).doubleValue();
        }
        if (value>-1){
          NChangeScalarAction theFontChange = new NChangeScalarAction(
              (int) (value * startXRatio) + unit, (int) (value * endXRatio)
                  + unit);
          theFontChange.setUp(currEl, "fontSize", 0);
          temp.add(theFontChange);         
        } else {
            GWT.log("Don't know what to do with this font-size definition: "+res, null);
        }
      }
View Full Code Here

Examples of org.adamtacy.client.ui.effects.core.NChangeScalarAction

    int endVal;
   
    startVal = getStartBoxHoriz(boxAspect+"Left"+end, currEl);
    endVal = getEndBoxHoriz(boxAspect+"Left"+end, currEl);
    if (startVal!=endVal){
      NChangeScalarAction marginLeft = new NChangeScalarAction(startVal + "px", endVal + "px");
      marginLeft.setUp(currEl, boxAspect+"Left"+end, 0);
      temp2.add(marginLeft);
    }
   
    startVal = getStartBoxVert(boxAspect+"Bottom"+end, currEl);
    endVal = getEndBoxVert(boxAspect+"Bottom"+end, currEl);
    if (startVal!=endVal){
      NChangeScalarAction marginBottom = new NChangeScalarAction(startVal + "px", endVal + "px");
      marginBottom.setUp(currEl, boxAspect+"Bottom"+end, 0);
      temp2.add(marginBottom);
    }
   
    startVal = getStartBoxHoriz(boxAspect+"Right"+end, currEl);
    endVal = getEndBoxHoriz(boxAspect+"Right"+end, currEl);
    if (startVal!=endVal){
      NChangeScalarAction marginRight = new NChangeScalarAction(startVal + "px", endVal + "px");
      marginRight.setUp(currEl, boxAspect+"Right"+end, 0);
      temp2.add(marginRight);
    }
   
    startVal = getStartBoxVert(boxAspect+"Top"+end, currEl);
    endVal = getEndBoxVert(boxAspect+"Top"+end, currEl);
    if (startVal!=endVal){
      NChangeScalarAction marginTop = new NChangeScalarAction(startVal + "px", endVal + "px");
      marginTop.setUp(currEl, boxAspect+"Top"+end, 0);
      temp2.add(marginTop);
    }
    return temp2;
  }
View Full Code Here

Examples of org.adamtacy.client.ui.effects.core.NChangeScalarAction

    // Deal with top if not default to align_top
    if (vertAlign != HasVerticalAlignment.ALIGN_TOP) {
      if (temp2 == null)
        temp2 = new Vector<ChangeInterface>();
      NChangeScalarAction theTopChange = new NChangeScalarAction(
          getStartTop((Element) effectElement) + "px",
          getEndTop((Element) effectElement) + "px");
      theTopChange.setUp(effectElement, "top", 0);
      temp2.add(theTopChange);
    }
    if (horizAlign != HasHorizontalAlignment.ALIGN_LEFT) {
      if (temp2 == null)
        temp2 = new Vector<ChangeInterface>();
      NChangeScalarAction theLeftChange = new NChangeScalarAction(
          getStartLeft((Element) effectElement) + "px",
          getEndLeft((Element) effectElement) + "px");
      theLeftChange.setUp(effectElement, "left", 0);
      temp2.add(theLeftChange);
    }
    if (temp2 != null)
      determinedEffects.put((Element) effectElement, temp2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.