-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…r paged output. For now, I’ve copied accross the files I needed to alter to the java2d sub-module to avoid breaking things. Eventually we can get rid of all Java2D and Swing code from the core. Currently the renderer and builder in the sub-module are for paged output only but I think we can combine both paged and continuous in the one builder/renderer.
- Loading branch information
Showing
19 changed files
with
1,573 additions
and
58 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
openhtmltopdf-core/src/main/java/com/openhtmltopdf/outputdevice/helper/BaseDocument.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.openhtmltopdf.outputdevice.helper; | ||
|
||
import java.io.File; | ||
|
||
import org.w3c.dom.Document; | ||
|
||
public class BaseDocument { | ||
public final String html; | ||
public final Document document; | ||
public final File file; | ||
public final String uri; | ||
public final String baseUri; | ||
|
||
public BaseDocument(String baseUri, String html, Document document, File file, String uri) { | ||
this.html = html; | ||
this.document = document; | ||
this.file = file; | ||
this.uri = uri; | ||
this.baseUri = baseUri; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...htmltopdf-core/src/main/java/com/openhtmltopdf/outputdevice/helper/NullUserInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.openhtmltopdf.outputdevice.helper; | ||
|
||
import org.w3c.dom.Element; | ||
|
||
import com.openhtmltopdf.extend.UserInterface; | ||
|
||
public class NullUserInterface implements UserInterface { | ||
public boolean isHover(Element e) { | ||
return false; | ||
} | ||
|
||
public boolean isActive(Element e) { | ||
return false; | ||
} | ||
|
||
public boolean isFocus(Element e) { | ||
return false; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
openhtmltopdf-core/src/main/java/com/openhtmltopdf/outputdevice/helper/PageDimensions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.openhtmltopdf.outputdevice.helper; | ||
|
||
public class PageDimensions { | ||
public final Float w; | ||
public final Float h; | ||
public final boolean isSizeInches; | ||
|
||
public PageDimensions(Float w, Float h, boolean isSizeInches) { | ||
this.w = w; | ||
this.h = h; | ||
this.isSizeInches = isSizeInches; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...topdf-core/src/main/java/com/openhtmltopdf/outputdevice/helper/UnicodeImplementation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.openhtmltopdf.outputdevice.helper; | ||
|
||
import com.openhtmltopdf.bidi.BidiReorderer; | ||
import com.openhtmltopdf.bidi.BidiSplitterFactory; | ||
import com.openhtmltopdf.extend.FSTextBreaker; | ||
import com.openhtmltopdf.extend.FSTextTransformer; | ||
|
||
public class UnicodeImplementation { | ||
public final BidiReorderer reorderer; | ||
public final BidiSplitterFactory splitterFactory; | ||
public final FSTextBreaker lineBreaker; | ||
public final FSTextBreaker charBreaker; | ||
public final FSTextTransformer toLowerTransformer; | ||
public final FSTextTransformer toUpperTransformer; | ||
public final FSTextTransformer toTitleTransformer; | ||
public final boolean textDirection; | ||
|
||
public UnicodeImplementation(BidiReorderer reorderer, BidiSplitterFactory splitterFactory, | ||
FSTextBreaker lineBreaker, FSTextTransformer toLower, FSTextTransformer toUpper, | ||
FSTextTransformer toTitle, boolean textDirection, FSTextBreaker charBreaker) { | ||
this.reorderer = reorderer; | ||
this.splitterFactory = splitterFactory; | ||
this.lineBreaker = lineBreaker; | ||
this.toLowerTransformer = toLower; | ||
this.toUpperTransformer = toUpper; | ||
this.toTitleTransformer = toTitle; | ||
this.textDirection = textDirection; | ||
this.charBreaker = charBreaker; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
openhtmltopdf-java2d/src/main/java/com/openhtmltopdf/java2d/Java2DFontContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* {{{ header & license | ||
* Copyright (c) 2006 Wisconsin Court System | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public License | ||
* as published by the Free Software Foundation; either version 2.1 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
* }}} | ||
*/ | ||
package com.openhtmltopdf.java2d; | ||
|
||
import java.awt.Graphics2D; | ||
|
||
import com.openhtmltopdf.extend.FontContext; | ||
|
||
public class Java2DFontContext implements FontContext { | ||
private Graphics2D _graphics; | ||
|
||
public Java2DFontContext(Graphics2D graphics) { | ||
_graphics = graphics; | ||
} | ||
|
||
public Graphics2D getGraphics() { | ||
return _graphics; | ||
} | ||
} |
Oops, something went wrong.