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);
}
}