logo
  Removed Methods
logo

[J2Printer] [J2Pageable ] [J2TextPrinter ] [J2TablePrinter ] [J2TreePrinter ] [J2ListPrinter ] [J2PanelPrinter ] [J2ComponentPrinter ] [J2FlowPrinter ]

As J2PrinterWorks has evolved, our goal has been to make API changes in a way that preserves compatibility over releases.  That is, when newer APIs have been added that obsolete older APIs, the older APIs have been preserved so that they still work.  These older APIs are usually declared "deprecated", meaning that Java development environments will warn that they should no longer be used and suggest alternatives. 

Now, in an effort to reduce clutter from older APIs and excess code, we are removing older APIs that have spent a long enough period of time being "deprecated".  This section documents these dropped APIs and the alternatives that should now be used.  Source Code Licensees will find the old implementations preserved in the source code as comments.


Removed methods in J2Printer  (including J2Printer14 and J2PrinterWebStart)
 

Removed method
Reason
Alternative
public J2Printer(Pageable pageable)
and
public J2Printer14(Pageable pageable)
Need to set serial number before creating J2PrinterWorks Pageables.
J2Printer printer = new J2Printer();
// or J2Printer14

printer.setParam("serialNumber");
J2TablePrinter pageable = new J2TablePrinter(yourJTable);
printer.setPageable(pageable);

public J2Printer(PrinterJob printerJob, Pageable pageable)
and
public J2Printer14(PrinterJob printerJob, Pageable pageable)
Need to set serial number before creating J2PrinterWorks Pageables. J2Printer printer = new J2Printer(printerJob);
// or J2Printer14

printer.setParam("serialNumber");
J2TablePrinter pageable = new J2TablePrinter(yourJTable);
printer.setPageable(pageable);
public J2Printer(String serialNum, Pageable pageable)
and
public J2Printer14(String serialNum, Pageable pageable)
Need to set serial number before creating J2PrinterWorks Pageables. J2Printer printer = new J2Printer(serialNum);
// or J2Printer14

J2TablePrinter pageable = new J2TablePrinter(yourJTable);
printer.setPageable(pageable);
public J2Printer(String serialNum,
                 PrinterJob printerJob, Pageable pageable)
and
public J2Printer14(String serialNum,
                 PrinterJob printerJob, Pageable pageable)

Need to set serial number before creating J2PrinterWorks Pageables. J2Printer printer = new J2Printer(serialNum, printerJob);
// or J2Printer14

J2TablePrinter pageable = new J2TablePrinter(yourJTable);
printer.setPageable(pageable);
public void setHeaderFooterFont(Font font)

Header and footer fonts now set separately.
setHeaderFont(font);
setFooterFont(font);

public Font getHeaderFooterFont()
Ill-defined since header and footer fonts can be different
Was just using:
getHeaderFont();
public printToHTML(String dir, String file, double scale)
Made creation of HTML slideshow optionalprintToHTML(dir, file, scale, true);
public setPrintPreviewCloseOnPrint(boolean closeOnPrint)
Additional options for print preview dialog close behaviorUse (if closeOnPrint TRUE):
setPrintPreviewCloseOnPrint(J2Printer.WAIT);

or (if closeOnPrint FALSE):
setPrintPreviewCloseOnPrint(J2Printer.NEVER);
public boolean isPrintPreviewCloseOnPrint()
Additional options for print preview dialog close behaviorint getPrintPreviewCloseOnPrint();


Removed methods of J2Pageable (inherited by J2TextPrinter, J2TablePrinter, J2TreePrinter, J2ListPrinter, J2PanelPrinter, J2ComponentPrinter, and J2FlowPrinter)


Removed method
Reason
Alternative
public void setCenteredHorizontally(boolean centeredHorizontally)

Options are now LEFT, CENTER, and RIGHT
setHorizontalAlignment(LEFT, CENTER, or RIGHT);

public boolean isCenteredHorizontally() Options are now LEFT, CENTER, and RIGHT getHorizontalAlignment()==CENTER
public void setCenteredVertically(boolean centeredVertically) Options are now LEFT, CENTER, and RIGHT setVerticallAlignment(TOP, CENTER, or BOTTOM);
public boolean isCenteredVertically() Options are now LEFT, CENTER, and RIGHT getVerticalAlignment()==CENTER
public void readFromPageFormat(PageFormat pageFormat)
Method renamed
setPageFormat(pageFormat)
public void writeToPageFormat(PageFormat pageFormat)
Method renamed
pageFormat = getPageFormat()
public void setHeaderFooterFont(Font font)
Header and footer fonts now set separately. setHeaderFont(font);
setFooterFont(font);
public Font getHeaderFooterFont() ll-defined since header and footer fonts can now be different Was just using:
getHeaderFont();
public void setLineBelowHeader(boolean draw)
Options are now NONE, LINE, and BOX
setHeaderStyle(LINE);
public boolean isLineBelowHeader()
Options are now NONE, LINE, and BOX getHeaderStyle()==LINE
public void setBoxAroundHeader(boolean draw)
Options are now NONE, LINE, and BOX
setHeaderStyle(BOX);
public boolean isBoxAroundHeader()
Options are now NONE, LINE, and BOX
getHeaderStyle()==BOX
public void setLineAboveFooter(boolean draw) Options are now NONE, LINE, and BOX setFooterStyle(LINE);
public boolean isLineAboveFooter() Options are now NONE, LINE, and BOX getFooterStyle()==LINE
public void setBoxAroundFooter(boolean draw) Options are now NONE, LINE, and BOX setFooterStyle(BOX);
public boolean isBoxAroundFooter() Options are now NONE, LINE, and BOX getFooterStyle()==BOX



Removed methods in J2TextPrinter
 

Removed method
Reason
Alternative
public void setMaximumBodyWidth(double maximumBodyWidth)

Formerly used to ensure WYSIWYG
setWYSIWYG(true);
public double getMaximumBodyWidth()
Formerly used to ensure WYSIWYG isWYSIWYG();
also see J2Pageable methods, above




Removed methods in J2TablePrinter
 

Removed method
Reason
Alternative
public void setRowOrderPrinting(boolean rowOrderPrinting)

Feature no longer supported, rowOrderPrinting now always true none
public boolean isRowOrderPrinting()
Feature no longer supported, rowOrderPrinting now always true true
public void setShowOutsideLines(boolean showOutsideLines) Method renamed
setOutsideLines(showOutsideLines);
public boolean isShowOutsideLines() Method renamed
isOutsideLines()
also see J2Pageable methods, above



Removed methods in J2TreePrinter

Removed method
Reason
Alternative
see J2Pageable methods, above



Removed methods in J2ListPrinter

Removed method
Reason
Alternative
seeJ2Pageable methods, above

 


Removed methods of J2PanelPrinter
 

Removed method
Reason
Alternative
see J2Pageable methods, above



  Removed methods of J2ComponentPrinter


Removed method
Reason
Alternative
see J2Pageable methods, above




Removed methods of J2FlowPrinter

Removed method
Reason
Alternative
see J2Pageable methods, above



Copyright 2009, Wildcrest Associates (http://www.wildcrest.com )