Examples of FObj


Examples of org.apache.fop.fo.FObj

     * cases, because this function is not implemented
     */
    public Property eval(Property[] args,
                         PropertyInfo pInfo) throws PropertyException {

        FObj fo = pInfo.getPropertyList().getFObj();

        /* obtain property Id for the property for which the function is being
         * evaluated */
        int propId = 0;
        if (args.length == 0) {
            propId = pInfo.getPropertyMaker().getPropId();
        } else {
            String propName = args[0].getString();
            propId = FOPropertyMapping.getPropertyId(propName);
        }

        /* make sure we have a correct property id ... */
        if (propId != -1) {
            /* obtain column number for which the function is being evaluated: */
            int columnNumber = -1;
            int span = 0;
            if (fo.getNameId() != Constants.FO_TABLE_CELL) {
                // climb up to the nearest cell
                do {
                    fo = (FObj) fo.getParent();
                } while (fo.getNameId() != Constants.FO_TABLE_CELL
                          && fo.getNameId() != Constants.FO_PAGE_SEQUENCE);
                if (fo.getNameId() == Constants.FO_TABLE_CELL) {
                    //column-number is available on the cell
                    columnNumber = ((TableCell) fo).getColumnNumber();
                    span = ((TableCell) fo).getNumberColumnsSpanned();
                } else {
                    //means no table-cell was found...
View Full Code Here

Examples of org.apache.fop.fo.FObj

        }
        int correspondingId = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
           
        Property p = propertyList.getExplicitOrShorthand(correspondingId);
        if (p != null) {
            FObj parentFO = propertyList.getParentFObj();
            p = baseMaker.convertProperty(p, propertyList, parentFO);
        }
        return p;
    }
View Full Code Here

Examples of org.apache.fop.fo.FObj

    public Property get(int subpropId, PropertyList propertyList,
                        boolean tryInherit, boolean tryDefault)
            throws PropertyException {
       
        Property p = super.get(0, propertyList, tryInherit, tryDefault);   
        FObj fo = propertyList.getFObj();
        String fallbackValue = (propId == Constants.PR_PAGE_HEIGHT)
            ? fo.getFOEventHandler().getUserAgent().getPageHeight()
                    : fo.getFOEventHandler().getUserAgent().getPageWidth();
       
        if (p.getEnum() == Constants.EN_INDEFINITE) {
            int otherId = (propId == Constants.PR_PAGE_HEIGHT)
                ? Constants.PR_PAGE_WIDTH : Constants.PR_PAGE_HEIGHT;
            int writingMode = propertyList.get(Constants.PR_WRITING_MODE).getEnum();
View Full Code Here

Examples of org.apache.fop.fo.FObj

        }

        /** {@inheritDoc} */
        public Property make(PropertyList propertyList)
                throws PropertyException {
            FObj fo = propertyList.getFObj();

            return NumberProperty.getInstance(((ColumnNumberManagerHolder) fo.getParent())
                    .getColumnNumberManager().getCurrentColumnNumber());
        }
View Full Code Here

Examples of org.apache.fop.fo.FObj

                                        PropertyList propertyList, FObj fo)
                    throws PropertyException {
            if (p instanceof ColorProperty) {
                return p;
            }
            FObj fobj = (fo == null ? propertyList.getFObj() : fo);
            FOUserAgent ua = (fobj == null ? null : fobj.getUserAgent());
            Color val = p.getColor(ua);
            if (val != null) {
                return new ColorProperty(val);
            }
            return convertPropertyDatatype(p, propertyList, fo);
View Full Code Here

Examples of org.apache.fop.fo.FObj

     * Set default precedence according to the parent FObj
     *
     * {@inheritDoc}
     */
    public Property make(PropertyList propertyList) throws PropertyException {
        FObj fo = propertyList.getFObj();
        switch (fo.getNameId()) {
        case Constants.FO_TABLE:
            return num6;
        case Constants.FO_TABLE_CELL:
            return num5;
        case Constants.FO_TABLE_COLUMN:
View Full Code Here

Examples of org.apache.fop.fo.FObj

    throws PropertyException
  {
    Numeric distance
      = pInfo.getPropertyList().get("provisional-distance-between-starts").getNumeric();

    FObj item = pInfo.getFO();
    while(item != null && !(item instanceof ListItem)) {
  item = item.getParent();
    }
    if(item == null) {
  throw new PropertyException("body-start() called from outside an fo:list-item");
    }
View Full Code Here

Examples of org.apache.fop.fo.FObj

      .get("provisional-distance-between-starts").getLength();
  Length separation
      = pInfo.getPropertyList()
      .getNearestSpecified("provisional-label-separation").getLength();

  FObj item = pInfo.getFO();
  while(item != null && !(item instanceof ListItem)) {
      item = item.getParent();
  }
  if(item == null) {
      throw new PropertyException("label-end() called from outside an fo:list-item");
  }
  Length startIndent = item.properties.get("start-indent").getLength();
View Full Code Here

Examples of org.apache.fop.fo.FObj

    case CONTAINING_BOX:
      // depends on property?? inline-progression vs block-progression
      return parentFO.getContentWidth();
    case CONTAINING_REFAREA: // example: start-indent, end-indent
      {
          FObj fo;
          for (fo = parentFO;
               fo != null && !fo.generatesReferenceAreas();
               fo = fo.getParent())
          ;
          return (fo != null? fo.getContentWidth():0);
      }
    case CUSTOM_BASE:
      MessageHandler.errorln("!!! LengthBase.getBaseLength() called on CUSTOM_BASE type !!!");
      return 0;
    default:
View Full Code Here

Examples of org.apache.fop.fo.FObj

    /**
     * used for accessibility
     * @return ptr of fobj
     */
    private String getPtr() {
        FObj fobj = parentLayoutManager.getFObj();
        if (fobj instanceof StructurePointerPropertySet) {
            return (((StructurePointerPropertySet) fobj).getPtr());
        } else {
            //No structure pointer applicable
            return null;
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.