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

            /* for non-cached, or not-yet-cached instances, preload the image */
            if ((cachedInstance == null || cachedInstance == newInstance)
                && !("".equals(newInstance.backgroundImage))) {
                //Additional processing: preload image
                String uri = URISpecification.getURL(newInstance.backgroundImage);
                FObj fobj = pList.getFObj();
                FOUserAgent userAgent = pList.getFObj().getUserAgent();
                ImageManager manager = userAgent.getFactory().getImageManager();
                ImageSessionContext sessionContext = userAgent.getImageSessionContext();
                ImageInfo info;
                try {
                    info = manager.getImageInfo(uri, sessionContext);
                    newInstance.backgroundImageInfo = info;
                } catch (ImageException e) {
                    ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
                            fobj.getUserAgent().getEventBroadcaster());
                    eventProducer.imageError(fobj, uri, e, fobj.getLocator());
                } catch (FileNotFoundException fnfe) {
                    ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
                            fobj.getUserAgent().getEventBroadcaster());
                    eventProducer.imageNotFound(fobj, uri, fnfe, fobj.getLocator());
                } catch (IOException ioe) {
                    ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
                            fobj.getUserAgent().getEventBroadcaster());
                    eventProducer.imageIOError(fobj, uri, ioe, fobj.getLocator());
                }
            }
        }

        return (cachedInstance != null ? cachedInstance : newInstance);
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

    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.getUserAgent().getPageHeight()
                    : fo.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

        }
    }
    private void assignBlockLevel ( FONode node, int defaultLevel ) {
        for ( FONode fn = node; fn != null; fn = fn.getParent() ) {
            if ( fn instanceof FObj ) {
                FObj fo = (FObj) fn;
                if ( fo.isBidiRangeBlockItem() ) {
                    if ( fo.getBidiLevel() < 0 ) {
                        fo.setBidiLevel ( defaultLevel );
                    }
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.fop.fo.FObj

    }

    /** {@inheritDoc} */
    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.selectFromWritingMode(lrtb, rltb, tbrl, tblr);

        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

                                        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

     * 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
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.