Skip to content

Commit

Permalink
Future JDK 11 javadoc fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rototor committed Oct 7, 2018
1 parent a62ae99 commit efb93f2
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public Java2DRendererBuilder() {
* provided by the page processor.
*
* @param g2d
* @return
* @return this for method chaining
*/
public Java2DRendererBuilder useLayoutGraphics(Graphics2D g2d) {
state._layoutGraphics = g2d;
Expand All @@ -51,7 +51,7 @@ public Java2DRendererBuilder useLayoutGraphics(Graphics2D g2d) {
* @param fontFamily
* @param fontWeight
* @param fontStyle
* @return
* @return this for method chaining
*/
public Java2DRendererBuilder useFont(FSSupplier<InputStream> supplier, String fontFamily, Integer fontWeight,
FontStyle fontStyle) {
Expand All @@ -64,7 +64,7 @@ public Java2DRendererBuilder useFont(FSSupplier<InputStream> supplier, String fo
*
* @param supplier
* @param fontFamily
* @return
* @return this for method chaining
*/
public Java2DRendererBuilder useFont(FSSupplier<InputStream> supplier, String fontFamily) {
return this.useFont(supplier, fontFamily, 400, FontStyle.NORMAL);
Expand All @@ -74,7 +74,7 @@ public Java2DRendererBuilder useFont(FSSupplier<InputStream> supplier, String fo
* Used to set an initial page number for use with page counters, etc.
*
* @param pageNumberInitial
* @return
* @return this for method chaining
*/
public Java2DRendererBuilder useInitialPageNumber(int pageNumberInitial) {
state._initialPageNumber = pageNumberInitial;
Expand All @@ -97,7 +97,7 @@ public Java2DRendererBuilder toSinglePage(FSPageProcessor pageProcessor) {
* processor for advanced usage.
*
* @param pageProcessor
* @return
* @return this for method chaining
*/
public Java2DRendererBuilder toPageProcessor(FSPageProcessor pageProcessor) {
state._pagingMode = Layer.PAGED_MODE_PRINT;
Expand Down Expand Up @@ -176,7 +176,6 @@ private AddedFont(FSSupplier<InputStream> supplier, Integer weight, String famil

/**
* This class is internal to this library, please do not use or override it!
* @internal
*/
public static abstract class Graphics2DPaintingReplacedElement extends EmptyReplacedElement {
protected Graphics2DPaintingReplacedElement(int width, int height) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
/**
* This class is an internal implementation detail. This class is only public
* because there are no friend classes in Java. DO NOT USE!
*
* @internal
*/
public class Java2DRendererBuilderState extends BaseRendererBuilder.BaseRendererBuilderState {
/* Internal! */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static String getText(Element parent) {
* Appends all text content in all offspring of an element to a StringBuffer.
* Ignores all attributes, comments and processing instructions.
*
* @return a String with the text content of an element (may be an empty string but will not be null).
* @param sb will get the text content of the element children
*/
public static void getText(Element parent, StringBuilder sb) {
NodeList children = parent.getChildNodes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,28 @@
package com.openhtmltopdf.pdfboxout;

/**
* Callback listener for PDF creation. To use this, call {@link ITextRenderer#setListener(PDFCreationListener)}.
* Note that with a handle on the ITextRenderer instance (provided in the callback arguments) you can access
* the {@link com.itextpdf.text.pdf.PdfWriter} instance being used to create the document, using
* {@link ITextRenderer#getOutputDevice()}, then calling {@link ITextOutputDevice#getWriter()}.
* Callback listener for PDF creation. To use this, call {@link PdfBoxRenderer#setListener(PDFCreationListener)}.
*/
public interface PDFCreationListener {
/**
* Called immediately after the iText Document instance is created but before the call to
* {@link com.itextpdf.text.Document#open()} is called. At this point you may still modify certain
* properties of the PDF document header via the {@link com.itextpdf.text.pdf.PdfWriter}; once
* open() is called, you can't change, e.g. the version. See the iText documentation for what limitations
* there are at this phase of processing.
* Called immediately after the PDF Document instance is created before the content is written.
*
* @param iTextRenderer the renderer preparing the document
* @param pdfBoxRenderer the renderer preparing the document
*/
void preOpen(PdfBoxRenderer iTextRenderer);
void preOpen(PdfBoxRenderer pdfBoxRenderer);

/**
* Called immediately before the pages of the PDF file are about to be written out.
* This is an opportunity to modify any document metadata that will be used to generate
* the PDF header fields (the document information dictionary). Document metadata may be accessed
* through the {@link ITextOutputDevice} that is returned by {@link ITextRenderer#getOutputDevice()}.
* the PDF header fields (the document information dictionary).
*
* @param iTextRenderer the renderer preparing the document
* @param pdfBoxRenderer the renderer preparing the document
* @param pageCount the number of pages that will be written to the PDF document
*/
void preWrite(PdfBoxRenderer iTextRenderer, int pageCount);
void preWrite(PdfBoxRenderer pdfBoxRenderer, int pageCount);

/**
* Called immediately before the iText Document instance is closed, e.g. before
* {@link com.itextpdf.text.Document#close()} is called.
* Called immediately before the Pdf Document instance is closed
*
* @param renderer the iTextRenderer preparing the document
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ private boolean realizeFont() {

/**
* Returns whether the font is available yet.
* @see {@link #getFont()}
* @see #getFont()
*/
public boolean isFontAvailable() {
return _font != null;
Expand Down Expand Up @@ -808,7 +808,7 @@ public boolean isFromFontFace() {

/**
* If the metrics are available yet.
* @see {@link #getFontMetrics()}
* @see #getFontMetrics()
*/
public boolean isMetricsAvailable() {
return _metrics != null;
Expand All @@ -818,7 +818,7 @@ public boolean isMetricsAvailable() {
* Downloads and parses the font if required (metrics were not available from cache).
* Should only be called when the font metrics are definitely needed.
* @return the font metrics or null if there was a problem.
* @see {@link #isMetricsAvailable()}
* @see #isMetricsAvailable()
*/
public PdfBoxRawPDFontMetrics getFontMetrics() {
if (!isMetricsAvailable()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public PdfRendererBuilder withProducer(String producer) {
/**
* List of caches available.
*/
public static enum CacheStore {
public enum CacheStore {

/**
* Caches font metrics, based on a combined key of family name, weight and style.
Expand All @@ -247,7 +247,7 @@ public static enum CacheStore {
* Use a specific cache. Cache values should be thread safe, so provided your cache store itself
* is thread safe can be used accross threads.
* @return this for method chaining.
* @see {@link CacheStore}
* @see CacheStore
*/
public PdfRendererBuilder useCacheStore(CacheStore which, FSCacheEx<String, FSCacheValue> cache) {
state._caches.put(which, cache);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

/**
* This class is internal. DO NOT USE! Just ignore it!
*
* @internal
*/
public class PdfRendererBuilderState extends BaseRendererBuilder.BaseRendererBuilderState {
/* Internal! */
Expand Down

0 comments on commit efb93f2

Please sign in to comment.