Package org.eclipse.jst.pagedesigner.css2.value

Examples of org.eclipse.jst.pagedesigner.css2.value.Length


  /**
   * Default constructor
   */
  public FontSizeMeta() {
    super(true, new Length((int) MEDIUM_VAL_INT, false));
  }
View Full Code Here


      }
    } else {
      fontsize = parentfontsize;
    }

    return new Length(fontsize, false);

  }
View Full Code Here

            fontSize = 1;
          }
          if (fontSize > 7) {
            fontSize = 7;
          }
          return new Length((int) (Math.round(FACTORS[fontSize - 1]
              * MEDIUM_VAL_INT)), false);
        } catch (Exception ex) {
          // Error in tag font attr calculating.
          // _log.error("Error.FontSizeMeta.0", ex); //$NON-NLS-1$
          return null;
View Full Code Here

                .getPercentageType(), getBaseFont(style));
                    if (length instanceof Length && ((Length)length).getValue() >= artificialCellPadding)                   
                        return length;
                   
        }
                return new Length(artificialCellPadding, false);
      }
    }
    return super.calculateHTMLAttributeOverride(element, htmltag,
        propertyName, style);
  }
View Full Code Here

    case CSSPrimitiveValue.CSS_PERCENTAGE:
      if (percenttype == PERCENTAGE_FONT) {
        result = (int) ((result * font.getFontSize()) / 100.0);
        break;
      }
      return new Length((int) result, true);
    case CSSPrimitiveValue.CSS_PX: // no more calculation needed
    case CSSPrimitiveValue.CSS_NUMBER:
      break;
    case CSSPrimitiveValue.CSS_EMS:
      result *= font.getFontSize();
      break;
    case CSSPrimitiveValue.CSS_EXS:
      result *= font.getXHeight();
      break;
    case CSSPrimitiveValue.CSS_CM:
      result = cmToPixel(result);
      break;
    case CSSPrimitiveValue.CSS_IN:
      result = inToPixel(result);
      break;
    case CSSPrimitiveValue.CSS_MM:
      result = mmToPixel(result);
      break;
    case CSSPrimitiveValue.CSS_PT:
      result = ptToPixel(result);
      break;
    case CSSPrimitiveValue.CSS_PC:
      result = pcToPixel(result);
      break;
    case CSSPrimitiveValue.CSS_STRING:
      return ICSSPropertyID.VAL_AUTO;
      // FIXME:every thing is delt with?
    }
    // ok, when reach here, means we get the float value "result"
    return new Length((int) result, false);
  }
View Full Code Here

        getCSSStyle(node));
    return provider;
  }

  ICSSWidgetProvider getButtonProvider(Element node) {
    ButtonWidgetProvider provider = new ButtonWidgetProvider(
        getCSSStyle(node));
    provider.setValue(getButtonValue(node));
    return provider;
  }
View Full Code Here

    // CompositeWidgetProvider(getCSSStyle(), textprovider, browsebutton,
    // false);
    // return provider;
    ICSSWidgetProvider textprovider = getTextInputProvider(node);
    // XXX: should we use the defaultstyle for the button?
    ButtonWidgetProvider browsebutton = new ButtonWidgetProvider(
        getCSSStyle(node));
    browsebutton.setValue(Messages.InputFigureHandler_Browse);
    InputFileWidgetProvider provider = new InputFileWidgetProvider(
        getCSSStyle(node), textprovider, browsebutton);
    return provider;
  }
View Full Code Here

      RadioWidgetProvider provider = new RadioWidgetProvider(
          getCSSStyle(node));
      provider.setChecked(node.hasAttribute("checked")); //$NON-NLS-1$
      return provider;
    } else if (type.equalsIgnoreCase(ICSSPropertyID.VAL_CHECKBOX)) {
      CheckboxWidgetProvider provider = new CheckboxWidgetProvider(
          getCSSStyle(node));
      provider.setChecked(node.hasAttribute("checked")); //$NON-NLS-1$
      return provider;
    } else if (type.equalsIgnoreCase(ICSSPropertyID.VAL_HIDDEN)) {
      return getHiddenProvider(node);
    }
    if (type.equalsIgnoreCase(ICSSPropertyID.VAL_PASSWORD)) {
View Full Code Here

          getCSSStyle(node));
      provider.setOptions(labels);
      provider.setRows(rowsInt);
      return provider;
    }
        ComboWidgetProvider provider = new ComboWidgetProvider(
            getCSSStyle(node));
        provider.setOptions(labels);
        provider.setSelectedLabel(getSelectedLabels(node));
        return provider;
  }
View Full Code Here

    return JSFUICommonPlugin.getDefault().getImage(
        JSFSharedImages.DEFAULT_PALETTE_TAG_IMG);
  }

  ICSSWidgetProvider getHiddenProvider(Element node) {
    return new HiddenProvider(getHiddenImage(), node);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.css2.value.Length

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.