Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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/MultiSwitchLayoutManager.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.
*/
package org.apache.fop.layoutmgr;
import java.util.LinkedList;
import java.util.List;
import org.apache.fop.area.Area;
import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.flow.MultiSwitch;
public class MultiSwitchLayoutManager extends BlockStackingLayoutManager {
static class WhitespaceManagementPosition extends Position {
private List<ListElement> knuthList;
public WhitespaceManagementPosition(LayoutManager lm) {
super(lm);
}
public List<Position> getPositionList() {
List<Position> positions = new LinkedList<Position>();
if (knuthList != null && !knuthList.isEmpty()) {
SpaceResolver.performConditionalsNotification(knuthList, 0, knuthList.size() - 1, -1);
for (ListElement el : knuthList) {
if (el.getPosition() != null) {
positions.add(el.getPosition());
}
}
}
return positions;
}
public void setKnuthList(List<ListElement> knuthList) {
this.knuthList = knuthList;
}
public List<ListElement> getKnuthList() {
return knuthList;
}
}
private interface KnuthElementsGenerator {
List<ListElement> getKnuthElements(LayoutContext context, int alignment);
}
private class DefaultKnuthListGenerator implements KnuthElementsGenerator {
public List<ListElement> getKnuthElements(LayoutContext context, int alignment) {
List<ListElement> knuthList = new LinkedList<ListElement>();
LayoutManager childLM = getChildLM();
while (!childLM.isFinished()) {
LayoutContext childLC = makeChildLayoutContext(context);
List childElements = childLM.getNextKnuthElements(childLC, alignment);
if (childElements != null) {
List<ListElement> newList = new LinkedList<ListElement>();
wrapPositionElements(childElements, newList);
knuthList.addAll(newList);
}
}
return knuthList;
}
}
private class WhitespaceManagement implements KnuthElementsGenerator {
@SuppressWarnings("unchecked")
public List<ListElement> getKnuthElements(LayoutContext context, int alignment) {
MultiSwitchLayoutManager mslm = MultiSwitchLayoutManager.this;
List<ListElement> knuthList = new LinkedList<ListElement>();
WhitespaceManagementPenalty penalty = new WhitespaceManagementPenalty(
new WhitespaceManagementPosition(mslm));
LayoutManager childLM;
while ((childLM = getChildLM()) != null) {
LayoutContext childLC = makeChildLayoutContext(context);
List<ListElement> childElements = new LinkedList<ListElement>();
while (!childLM.isFinished()) {
childElements.addAll(childLM.getNextKnuthElements(childLC, alignment));
}
List<ListElement> wrappedElements = new LinkedList<ListElement>();
wrapPositionElements(childElements, wrappedElements);
// TODO Doing space resolution here is wrong.
SpaceResolver.resolveElementList(wrappedElements);
int contentLength = ElementListUtils.calcContentLength(wrappedElements);
penalty.addVariant(penalty.new Variant(wrappedElements, contentLength));
}
// Prevent the penalty from being ignored if it is at the beginning of the content
knuthList.add(new KnuthBox(0, new Position(mslm), false));
knuthList.add(penalty);
// Prevent the penalty from being ignored if it is at the end of the content
knuthList.add(new KnuthBox(0, new Position(mslm), false));
return knuthList;
}
}
private KnuthElementsGenerator knuthGen;
public MultiSwitchLayoutManager(FObj node) {
super(node);
MultiSwitch multiSwitchNode = (MultiSwitch) node;
if (multiSwitchNode.getAutoToggle() == Constants.EN_SELECT_FIRST_FITTING) {
knuthGen = new WhitespaceManagement();
} else {
knuthGen = new DefaultKnuthListGenerator();
}
}
@Override
public List<ListElement> getNextKnuthElements(LayoutContext context, int alignment) {
referenceIPD = context.getRefIPD();
List<ListElement> knuthList = knuthGen.getKnuthElements(context, alignment);
setFinished(true);
return knuthList;
}
@Override
public Area getParentArea(Area childArea) {
return parentLayoutManager.getParentArea(childArea);
}
@Override
public void addChildArea(Area childArea) {
parentLayoutManager.addChildArea(childArea);
}
@Override
public void addAreas(PositionIterator posIter, LayoutContext context) {
LinkedList<Position> positionList = new LinkedList<Position>();
while (posIter.hasNext()) {
Position pos = posIter.next();
if (pos instanceof WhitespaceManagementPosition) {
positionList.addAll(((WhitespaceManagementPosition) pos).getPositionList());
} else {
positionList.add(pos);
}
}
PositionIterator newPosIter = new PositionIterator(positionList.listIterator());
AreaAdditionUtil.addAreas(this, newPosIter, context);
flush();
}
}
⏎ org/apache/fop/layoutmgr/MultiSwitchLayoutManager.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, ≈334🔥, 0💬
Popular Posts:
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms, it was develo...
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...
maven-compat-3.5.4.jar is the JAR file for Apache Maven 3.5.4 Compact module. The JAR file name may ...
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...