Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
What Is fop.jar in fop-2.7-bin.zip
What Is fop.jar? I got it from the fop-2.7-bin.zip.
✍: FYIcenter.com
fop.jar in fop-2.7-bin.zip is the JAR file for FOP 2.7, which
is a print formatter driven by XSL formatting objects (XSL-FO).
You can obtain fop.jar from the build folder of the fop-2.7-bin.zip file.
Below is the information about the fop.jar (2.2) file:
JAR File Size and Download Location:
JAR name: fop.jar, fop-2.7.jar Target JDK version: 1.7 File name: fop.jar File size: 4442817 bytes Release date: 20-Jan-2022 Download: Apache FOP Website
Java source code files for fop.jar:
⏎ org/apache/fop/layoutmgr/ElementListUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id: ElementListUtils.java 1889102 2021-04-22 10:45:11Z ssteiner $ */ package org.apache.fop.layoutmgr; import java.util.List; import java.util.ListIterator; import org.apache.fop.traits.MinOptMax; import org.apache.fop.util.ListUtil; /** * Utilities for Knuth element lists. */ public final class ElementListUtils { private ElementListUtils() { // Utility class. } /** * Removes legal breaks in an element list. A constraint can be specified to limit the * range in which the breaks are removed. Legal breaks occuring before at least * constraint.opt space is filled will be removed. * @param elements the element list * @param constraint min/opt/max value to restrict the range in which the breaks are removed. * @return true if the opt constraint is bigger than the list contents */ public static boolean removeLegalBreaks(List elements, MinOptMax constraint) { return removeLegalBreaks(elements, constraint.getOpt()); } /** * Removes legal breaks in an element list. A constraint can be specified to limit the * range in which the breaks are removed. Legal breaks occuring before at least * constraint space is filled will be removed. * @param elements the element list * @param constraint value to restrict the range in which the breaks are removed. * @return true if the constraint is bigger than the list contents */ public static boolean removeLegalBreaks(List elements, int constraint) { return removeLegalBreaks(elements, constraint, false); } /** * Removes legal breaks in an element list. A constraint can be specified to limit the * range in which the breaks are removed. Legal breaks within the space specified through the * constraint (starting from the end of the element list) will be removed. * @param elements the element list * @param constraint value to restrict the range in which the breaks are removed. * @return true if the constraint is bigger than the list contents */ public static boolean removeLegalBreaksFromEnd(List elements, int constraint) { return removeLegalBreaks(elements, constraint, true); } private static boolean removeLegalBreaks(List elements, int constraint, boolean fromEnd) { int len = 0; ListElement el; for (ListIterator iter = elements.listIterator(fromEnd ? elements.size() : 0); (fromEnd ? iter.hasPrevious() : iter.hasNext());) { if (fromEnd) { el = (ListElement) iter.previous(); } else { el = (ListElement) iter.next(); } if (el.isPenalty()) { KnuthPenalty penalty = (KnuthPenalty)el; //Convert penalty to break inhibitor if (penalty.getPenalty() < KnuthPenalty.INFINITE) { iter.set(new KnuthPenalty(penalty.getWidth(), KnuthPenalty.INFINITE, penalty.isPenaltyFlagged(), penalty.getPosition(), penalty.isAuxiliary())); } } else if (el.isGlue()) { KnuthGlue glue = (KnuthGlue)el; len += glue.getWidth(); //check if previous is a box if (!fromEnd) { iter.previous(); } el = (ListElement)iter.previous(); iter.next(); if (el.isBox()) { //add break inhibitor iter.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, false, null, false)); } if (!fromEnd) { iter.next(); } } else if (el.isUnresolvedElement()) { if (el instanceof BreakElement) { BreakElement breakEl = (BreakElement)el; if (breakEl.getPenaltyValue() < KnuthPenalty.INFINITE) { breakEl.setPenaltyValue(KnuthPenalty.INFINITE); } } else if (el instanceof UnresolvedListElementWithLength) { UnresolvedListElementWithLength uel = (UnresolvedListElementWithLength)el; len += uel.getLength().getOpt(); } } else { KnuthElement kel = (KnuthElement)el; len += kel.getWidth(); } if (len >= constraint) { return false; } } return true; } /** * Calculates the content length of the given element list. Warning: It doesn't take any * stretch and shrink possibilities into account. * @param elems the element list * @param start element at which to start * @param end element at which to stop * @return the content length */ public static int calcContentLength(List elems, int start, int end) { ListIterator iter = elems.listIterator(start); int count = end - start + 1; int len = 0; while (iter.hasNext()) { ListElement el = (ListElement)iter.next(); if (el.isBox()) { len += ((KnuthElement)el).getWidth(); } else if (el.isGlue()) { len += ((KnuthElement)el).getWidth(); } else { //log.debug("Ignoring penalty: " + el); //ignore penalties } count--; if (count == 0) { break; } } return len; } /** * Calculates the content length of the given element list. Warning: It doesn't take any * stretch and shrink possibilities into account. * @param elems the element list * @return the content length */ public static int calcContentLength(List elems) { return calcContentLength(elems, 0, elems.size() - 1); } /** * Indicates whether the given element list ends with a forced break. * @param elems the element list * @return true if the list ends with a forced break */ public static boolean endsWithForcedBreak(List elems) { ListElement last = ListUtil.getLastListElement(elems); return last == null || last.isForcedBreak(); } /** * Indicates whether the given element list starts with a forced break. * @param elems the element list * @return true if the list starts with a forced break */ public static boolean startsWithForcedBreak(List elems) { return !elems.isEmpty() && ((ListElement) elems.get(0)).isForcedBreak(); } /** * Indicates whether the given element list ends with a penalty with a non-infinite penalty * value. * @param elems the element list * @return true if the list ends with a non-infinite penalty */ public static boolean endsWithNonInfinitePenalty(List elems) { ListElement last = (ListElement) ListUtil.getLast(elems); if (last.isPenalty() && ((KnuthPenalty)last).getPenalty() < KnuthElement.INFINITE) { return true; } else if (last instanceof BreakElement && ((BreakElement)last).getPenaltyValue() < KnuthElement.INFINITE) { return true; } return false; } /** * Determines the position of the previous break before the start index on an * element list. * @param elems the element list * @param startIndex the start index * @return the position of the previous break, or -1 if there was no previous break */ public static int determinePreviousBreak(List elems, int startIndex) { int prevBreak = startIndex - 1; while (prevBreak >= 0) { KnuthElement el = (KnuthElement)elems.get(prevBreak); if (el.isPenalty() && el.getPenalty() < KnuthElement.INFINITE) { break; } prevBreak--; } return prevBreak; } public static boolean isEmptyBox(List elements) { if (elements.size() == 1 && elements.get(0) instanceof KnuthBox) { KnuthBox kb = (KnuthBox) elements.get(0); return kb.getWidth() == 0 && !isAbsoluteOrFixed(kb.getPosition()); } return false; } private static boolean isAbsoluteOrFixed(Position pos) { if (pos == null || pos == pos.getPosition()) { return false; } LayoutManager lm = pos.getLM(); if (lm instanceof BlockContainerLayoutManager && ((BlockContainerLayoutManager)lm).isAbsoluteOrFixed()) { return true; } return isAbsoluteOrFixed(pos.getPosition()); } }
⏎ org/apache/fop/layoutmgr/ElementListUtils.java
Or download all of them as a single archive file:
File name: fop-2.7-src.zip File size: 3401312 bytes Release date: 2022-01-20 Download
⇒ "fop" Command in fop-2.7-bin.zip
2016-07-07, 22101👍, 0💬
Popular Posts:
How to read XML document from socket connections with the socket\DelayedInput.java provided in the A...
JSP(tm) Standard Tag Library 1.1 implementation - Jakarta Taglibs hosts the Standard Taglib 1.1, an ...
JDK 11 jdk.localedata.jmod is the JMOD file for JDK 11 Localedata module. JDK 11 Locale Data module ...
JDK 17 java.base.jmod is the JMOD file for JDK 17 Base module. JDK 17 Base module compiled class fil...
Apache Log4j API provides the interface that applications should code to and provides the adapter co...