Examples of PercentLength


Examples of org.apache.fop.datatypes.PercentLength

  public Length asLength() {
    if (dim == 1) {
      if (valType == ABS_LENGTH) {
  return new Length((int)absValue);
      }
      PercentLength pclen = null;
      if ((valType & PC_LENGTH)!=0)  {
  pclen = new PercentLength(pcValue, pcBase);
        if (valType == PC_LENGTH)
    return pclen;
      }
      if ((valType & TCOL_LENGTH) != 0) {
  return new TableColLength((int)absValue, pclen, tcolValue);
View Full Code Here

Examples of org.apache.fop.datatypes.PercentLength

    public Length asLength() {
        if (dim == 1) {
            if (valType == ABS_LENGTH) {
                return new Length((int)absValue);
            }
            PercentLength pclen = null;
            if ((valType & PC_LENGTH) != 0) {
                pclen = new PercentLength(pcValue, pcBase);
                if (valType == PC_LENGTH)
                    return pclen;
            }
            if ((valType & TCOL_LENGTH) != 0) {
                return new TableColLength((int)absValue, pclen, tcolValue);
View Full Code Here

Examples of org.apache.fop.datatypes.PercentLength

            ArrayList len = new ArrayList(3);
            if ((valType & ABS_LENGTH) != 0) {
                len.add(new FixedLength((int)absValue));
            }
            if ((valType & PC_LENGTH) != 0) {
                len.add(new PercentLength(pcValue, pcBase));
            }
            if ((valType & TCOL_LENGTH) != 0) {
                len.add(new TableColLength(tcolValue));
            }
            if (len.size() == 1) {
View Full Code Here

Examples of org.apache.fop.datatypes.PercentLength

  public Length asLength() {
    if (dim == 1) {
      if (valType == ABS_LENGTH) {
  return new Length((int)absValue);
      }
      PercentLength pclen = null;
      if ((valType & PC_LENGTH)!=0)  {
  pclen = new PercentLength(pcValue, pcBase);
        if (valType == PC_LENGTH)
    return pclen;
      }
      if ((valType & TCOL_LENGTH) != 0) {
  return new TableColLength((int)absValue, pclen, tcolValue);
View Full Code Here

Examples of org.apache.fop.datatypes.PercentLength

      Vector len = new Vector(3);
            if ((valType & ABS_LENGTH) != 0) {
                len.add(new FixedLength((int)absValue));
            }
            if ((valType & PC_LENGTH) != 0) {
                len.add(new PercentLength(pcValue, pcBase));
            }
            if ((valType & TCOL_LENGTH) != 0) {
                len.add(new TableColLength(tcolValue));
            }
      if (len.size() == 1) {
View Full Code Here

Examples of org.apache.fop.fo.properties.PercentLength

            PercentBase pcBase = this.propInfo.getPercentBase();
            if (pcBase != null) {
                if (pcBase.getDimension() == 0) {
                    prop = NumberProperty.getInstance(pcval * pcBase.getBaseValue());
                } else if (pcBase.getDimension() == 1) {
                    prop = new PercentLength(pcval, pcBase);
                } else {
                    throw new PropertyException("Illegal percent dimension value");
                }
            } else {
                // WARNING? Interpret as a decimal fraction, eg. 50% = .5
View Full Code Here

Examples of org.apache.fop.fo.properties.PercentLength

                        if (base != null && base.isAbsolute()) {
                            prop = FixedLength.getInstance(pcval * base.getValue());
                            break;
                        }
                    }
                    prop = new PercentLength(pcval, pcBase);
                } else {
                    throw new PropertyException("Illegal percent dimension value");
                }
            } else {
                // WARNING? Interpret as a decimal fraction, eg. 50% = .5
View Full Code Here

Examples of org.apache.fop.fo.properties.PercentLength

        }
        Length startIndent = pList.get(Constants.PR_START_INDENT).getLength();

        LengthBase base = new LengthBase(pInfo.getPropertyList(),
                                         LengthBase.CONTAINING_REFAREA_WIDTH);
        PercentLength refWidth = new PercentLength(1.0, base);

        Numeric labelEnd = distance;
        labelEnd = NumericOp.addition(labelEnd, startIndent);
        //TODO add start-intrusion-adjustment
        labelEnd = NumericOp.subtraction(labelEnd, separation);
View Full Code Here

Examples of org.apache.fop.fo.properties.PercentLength

                        if (base != null && base.isAbsolute()) {
                            prop = FixedLength.getInstance(pcval * base.getValue());
                            break;
                        }
                    }
                    prop = new PercentLength(pcval, pcBase);
                } else {
                    throw new PropertyException("Illegal percent dimension value");
                }
            } else {
                // WARNING? Interpret as a decimal fraction, eg. 50% = .5
View Full Code Here

Examples of org.apache.fop.fo.properties.PercentLength

        }
        Length startIndent = pList.get(Constants.PR_START_INDENT).getLength();

        LengthBase base = new LengthBase(pInfo.getPropertyList(),
                                         LengthBase.CONTAINING_REFAREA_WIDTH);
        PercentLength refWidth = new PercentLength(1.0, base);

        Numeric labelEnd = distance;
        labelEnd = NumericOp.addition(labelEnd, startIndent);
        //TODO add start-intrusion-adjustment
        labelEnd = NumericOp.subtraction(labelEnd, separation);
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.