|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.wildcrest.j2printerworks.J2Pageable
An abstract base class that converts a Flowable into a Pageable (a set of formatted
pages starting and ending on page boundaries), and which is the parent class of
J2TextPrinter, J2TablePrinter, J2TreePrinter, J2ComponentPrinter, J2PanelPrinter,
J2ListPrinter, and J2FlowPrinter.
This class is not called directly by developers but is designed to be used
as a framework for implementing components that are to be both Pageable and Flowable.
J2Pageable declares both the Pageable and Flowable interfaces.
A subclass of J2Pageable must provide an implementation for the methods of Flowable,
which J2Pageable uses to create an implementation of Pageable, complete with all the
J2PrinterWorks features such as headers, footers, margins, orientation, and scaling.
For example, J2TextPrinter is declared as extending J2Pageable. J2TextPrinter
itself implements the Flowable interface methods for a given JTextPane and
inherits from J2Pageable the implementation of a standard Java Pageable as well as all the
J2PrinterWorks methods for headers, footers, margins, orientation, scale, etc.
(C) Copyright 2009, Wildcrest Associates (http://www.wildcrest.com). All rights reserved.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
static int |
BOTTOM
Specifies vertical alignment to be bottom justified within the available space. |
static int |
BOX
Specifies that a box is drawn around the header or the footer. |
static int |
CENTER
Specifies horizontal or vertical alignment to be centered within the available space. |
static int |
FIRST
Denotes header and footer values for page 1. |
static int |
GLOBAL
Indicates that the "global" (overall, default, J2Printer) values are to be used for margins, header/footer style, orientation, and scale instead of a "local" value for this Pageable |
static int |
LANDSCAPE
Specifies that the page orientation is landscape. |
static int |
LEFT
Specifies horizontal alignment to be left justified within the available space. |
static int |
LINE
Specifies that a line is drawn below the header or above the footer. |
static int |
NONE
Specifies that no additional line or box is drawn for the header or footer. |
static int |
PORTRAIT
Specifies that the page orientation is portrait. |
static int |
PPI72
A constant specifying the standard printing resolution of 72 dots ("points") per inch. |
static int |
REST
Denotes header and footer values for pages 2...n. |
static int |
REVERSE_LANDSCAPE
Specifies that the page orientation is reverse landscape (landscape rotated 180 degrees). |
static int |
RIGHT
Specifies horizontal alignment to be right justified within the available space. |
static int |
TOP
Specifies vertical alignment to be top justified within the available space. |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.print.Pageable |
UNKNOWN_NUMBER_OF_PAGES |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
J2Pageable()
Construct a J2Pageable object. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener for this component |
void |
clearFooters()
Clears all the footers for both page 1 and pages 2...n of this Pageable instance. |
void |
clearFooters(int which)
Clears all the footers for either page 1 of pages 2...n of this Pageable instance. |
void |
clearHeaders()
Clears all the headers for both page 1 and pages 2...n of this Pageable instance (NOTE: value cannot be changed in Free Trial Version). |
void |
clearHeaders(int which)
Clears all the headers for either page 1 of pages 2...n of this Pageable instance (NOTE: value cannot be changed in Free Trial Version). |
void |
dispose()
Release all heap objects created by this J2Pageable object, must not call until printing completes. |
double |
getBodyHeight(int which)
Return available body height between margins, headers/footers, and gaps for printing content for either page 1 or pages 2...n. |
double |
getBodyWidth()
Return available body width between margins for printing content. |
double |
getBottomMargin()
Returns the bottom margin of this J2Pageable instance. |
java.lang.Object |
getCenterFooter()
Returns the center footer of this J2Pageable instance (same as getCenterFooter(FIRST)). |
java.lang.Object |
getCenterFooter(int which)
Returns the center footer for either page 1 or pages 2...n of this J2Pageable instance. |
java.lang.Object |
getCenterHeader()
Returns the center header of this J2Pageable instance (same as getCenterHeader(FIRST)). |
java.lang.Object |
getCenterHeader(int which)
Returns the center header for either page 1 or pages 2...n of this J2Pageable instance. |
java.awt.Font |
getFooterFont()
Returns the Font specified for footers of this J2Pageable instance (same as getFooterFont(FIRST)). |
java.awt.Font |
getFooterFont(int which)
Returns the Font for printing the footers for either page 1 or pages 2...n of this J2Pageable instance when these are specified using a String. |
int |
getFooterStyle()
Returns footer style (BOX, LINE, or NONE) of this J2Pageable instance (returns answer for page 1). |
int |
getFooterStyle(int which)
Returns footer style (BOX, LINE, or NONE) for either page 1 or pages 2...n of this J2Pageable instance. |
double |
getGapAboveFooter()
Returns the gap between the bottom edge of the body and the footer of this J2Pageable instance in inches. |
double |
getGapBelowHeader()
Returns the gap between the header and top edge of the body of this J2Pageable instance in inches. |
java.awt.Font |
getHeaderFont()
Returns the Font specified for headers of this J2Pageable instance (same as getHeadersFont(FIRST)). |
java.awt.Font |
getHeaderFont(int which)
Returns the Font for printing the headers for either page 1 or pages 2...n of this J2Pageable instance when these are specified using a String. |
int |
getHeaderStyle()
Returns header style (BOX, LINE, or NONE) of this J2Pageable instance (returns answer for page 1). |
int |
getHeaderStyle(int which)
Returns header style (BOX, LINE, or NONE) for either page 1 or pages 2...n of this J2Pageable instance. |
java.lang.Object |
getLeftFooter()
Returns the left footer of this J2Pageable instance (same as getLeftFooter(FIRST)). |
java.lang.Object |
getLeftFooter(int which)
Returns the left footer for either page 1 or pages 2...n of this J2Pageable instance. |
java.lang.Object |
getLeftHeader()
Returns the left header of this J2Pageable instance (same as getLeftHeader(FIRST)). |
java.lang.Object |
getLeftHeader(int which)
Returns the left header for either page 1 or pages 2...n of this J2Pageable instance. |
double |
getLeftMargin()
Returns the left margin of this J2Pageable instance. |
java.awt.Dimension |
getMaximumSize()
Return maximum size of bean icon (32x32) |
java.awt.Dimension |
getMinimumSize()
Return minimum size of bean icon (32x32) |
int |
getNumberOfPages()
Returns the total number of pages (1...n) for this paginated Flowable (part of this class's implementation of java.awt.print.Pageable). |
int |
getNumberOfPagesHigh()
Returns the number of pages (1...n) vertically for this Flowable. |
int |
getNumberOfPagesWide()
Returns the number of pages (1...n) horizontally for this paginated Flowable. |
int |
getOrientation()
Returns page orientation of this J2Pageable instance (PORTRAIT, LANDSCAPE, or REVERSE_LANDSCAPE). |
java.awt.print.PageFormat |
getPageFormat()
Method for creating a PageFormat instance based on this J2Pageable's margins, size, & orientation. |
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Returns PageFormat for page with this pageIndex (0...n-1) (part of this class's implementation of java.awt.print.Pageable). |
java.awt.Dimension |
getPreferredSize()
Return preferred size of bean icon (32x32) |
java.awt.print.Printable |
getPrintable(int pageIndex)
Returns a Printable instance for the page with this pageIndex (0...n-1) (part of this class's implementation of java.awt.print.Pageable). |
java.lang.Object |
getRightFooter()
Returns the right footer of this J2Pageable instance (same as getRightFooter(FIRST)). |
java.lang.Object |
getRightFooter(int which)
Returns the right footer for either page 1 or pages 2...n of this J2Pageable instance. |
java.lang.Object |
getRightHeader()
Returns the right header of this J2Pageable instance (same as getRightHeader(FIRST)). |
java.lang.Object |
getRightHeader(int which)
Returns the right header for either page 1 or pages 2...n of this J2Pageable instance. |
double |
getRightMargin()
Returns the right margin of this J2Pageable instance. |
double |
getScale()
Returns current scaling factor for this J2Pageable. |
double |
getTopMargin()
Returns the top margin of this J2Pageable instance. |
void |
paint(java.awt.Graphics g)
This method is provided to paint this component's bean icon in your visual builder. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a PropertyChangeListener for this component |
void |
setBottomMargin(double bottomMargin)
Sets desired bottom margin of this J2Pageable instance in inches from the edge of page (when viewing content). |
void |
setCenterFooter(int which,
java.lang.Object centerFooter)
Sets the center footer for either page 1 or pages 2...n of this J2Pageable instance using a String or JLabel |
void |
setCenterFooter(java.lang.Object centerFooter)
Sets the center footer for both page 1 and pages 2...n of this J2Pageable instance using a String or JLabel. |
void |
setCenterHeader(int which,
java.lang.Object centerHeader)
Sets the center header for either page 1 or pages 2...n of this J2Pageable instance using a String or JLabel (NOTE: value cannot be changed in Free Trial Version). |
void |
setCenterHeader(java.lang.Object centerHeader)
Sets the center header for both page 1 and pages 2...n of this J2Pageable instance using a String or JLabel (NOTE: value cannot be changed in Free Trial Version). |
void |
setFooterFont(java.awt.Font font)
Sets the Font for printing the footers for both page 1 and pages 2...n of this J2Pageable instance when these are specified using a String. |
void |
setFooterFont(int which,
java.awt.Font font)
Sets the Font for printing the footers for either page 1 or pages 2...n of this J2Pageable instance when these are specified using a String. |
void |
setFooterStyle(int style)
Sets footer style (BOX, LINE, or NONE) for both page 1 and pages 2...n of this J2Pageable instance. |
void |
setFooterStyle(int which,
int style)
Sets footer style (BOX, LINE, or NONE) for either page 1 or pages 2...n of this J2Pageable instance. |
void |
setGapAboveFooter(double gapAboveFooter)
Sets the gap between the bottom edge of body and the top of the footer of this J2Pageable instance in inches. |
void |
setGapBelowHeader(double gapBelowHeader)
Sets the gap between the bottom of the header and the top edge of the body of this J2Pageable instance in inches. |
void |
setHeaderFont(java.awt.Font font)
Sets the Font for printing the headers for both page 1 and pages 2...n of this J2Pageable instance when these are specified using a String (NOTE: value cannot be changed in Free Trial Version). |
void |
setHeaderFont(int which,
java.awt.Font font)
Sets the Font for printing the headers for either page 1 or pages 2...n of this J2Pageable instance when these are specified using a String (NOTE: value cannot be changed in Free Trial Version). |
void |
setHeaderStyle(int style)
Sets header style (BOX, LINE, or NONE) for both page 1 and pages 2...n of this J2Pageable instance (NOTE: value cannot be changed in Free Trial Version). |
void |
setHeaderStyle(int which,
int style)
Sets header style (BOX, LINE, or NONE) for either page 1 or pages 2...n of this J2Pageable instance (NOTE: value cannot be changed in Free Trial Version). |
void |
setLeftFooter(int which,
java.lang.Object leftFooter)
Sets the left footer for either page 1 or pages 2...n of this J2Pageable instance using a String or JLabel |
void |
setLeftFooter(java.lang.Object leftFooter)
Sets the left footer for both page 1 and pages 2...n of this J2Pageable instance using a String or JLabel. |
void |
setLeftHeader(int which,
java.lang.Object leftHeader)
Sets the left header for either page 1 or pages 2...n of this J2Pageable instance using a String or JLabel (NOTE: value cannot be changed in Free Trial Version). |
void |
setLeftHeader(java.lang.Object leftHeader)
Sets the left header for both page 1 and pages 2...n of this J2Pageable instance using a String or JLabel (NOTE: value cannot be changed in Free Trial Version). |
void |
setLeftMargin(double leftMargin)
Sets desired left margin of this J2Pageable instance in inches from the edge of page (when viewing content). |
void |
setLocale(java.util.Locale locale)
Sets the operative locale for J2PrinterWorks |
void |
setMaximumPages(int pagesWide,
int pagesHigh)
Rescale this Pageable to print within a maximum number of vertical and/or horizontal pages (will minify to fit). |
void |
setOrientation(int orientation)
Sets page orientation of this J2Pageable instance. |
void |
setPageFormat(java.awt.print.PageFormat pageFormat)
Method for setting this J2Pageable's margins, size, and orientation from an external PageFormat instance. |
void |
setParam(java.lang.String str)
Convenience method for entering internal parameters. |
void |
setRightFooter(int which,
java.lang.Object rightFooter)
Sets the right footer for either page 1 or pages 2...n of this J2Pageable instance using a String or JLabel |
void |
setRightFooter(java.lang.Object rightFooter)
Sets the right footer for both page 1 and pages 2...n of this J2Pageable instance using a String or JLabel. |
void |
setRightHeader(int which,
java.lang.Object rightHeader)
Sets the right header for either page 1 or pages 2...n of this J2Pageable instance using a String or JLabel (NOTE: value cannot be changed in Free Trial Version). |
void |
setRightHeader(java.lang.Object rightHeader)
Sets the right header for both page 1 and pages 2...n of this J2Pageable instance using a String or JLabel (NOTE: value cannot be changed in Free Trial Version). |
void |
setRightMargin(double rightMargin)
Sets desired right margin of this J2Pageable instance in inches from the edge of page (when viewing content). |
void |
setScale(double scale)
Sets magnification or minification scaling factor for printing this J2Pageable. |
void |
setTopMargin(double topMargin)
Sets desired top margin of this J2Pageable instance in inches from the edge of page (when viewing content). |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.wildcrest.j2printerworks.Flowable |
doneX, doneY, printFlowable, resetFlowable, usedX, usedY |
Field Detail |
public static final int FIRST
public static final int REST
public static final int NONE
public static final int LINE
public static final int BOX
public static final int LANDSCAPE
public static final int PORTRAIT
public static final int REVERSE_LANDSCAPE
public static final int CENTER
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
public static final int PPI72
public static final int GLOBAL
Constructor Detail |
public J2Pageable()
Method Detail |
public void dispose()
public int getNumberOfPagesHigh()
public int getNumberOfPagesWide()
public int getNumberOfPages()
getNumberOfPages
in interface java.awt.print.Pageable
public void setMaximumPages(int pagesWide, int pagesHigh)
pagesWide
- specifies maximum horizontal number of pages for printing this Pageable (< or = 0 if unconstrained).pagesHigh
- specifies maximum vertical number of pages for printing this Pageable (< or = 0 if unconstrained).public java.awt.print.PageFormat getPageFormat(int pageIndex)
getPageFormat
in interface java.awt.print.Pageable
pageIndex
- specifies the pageIndex (0...n-1) for which the PageFormat is requestedpublic java.awt.print.Printable getPrintable(int pageIndex)
getPrintable
in interface java.awt.print.Pageable
pageIndex
- specifies the pageIndex (0...n-1) for which an instance of Printable is requested.public void paint(java.awt.Graphics g)
g
- Graphics context objectpublic double getBodyWidth()
public double getBodyHeight(int which)
which
- J2Pageable.FIRST (1) if page 1, or = J2Pageable.REST (0) if pages 2...n.public void setPageFormat(java.awt.print.PageFormat pageFormat)
pageFormat
- PageFormat whose values will be used to set the PageSetup margins and orientation.public java.awt.print.PageFormat getPageFormat()
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public java.awt.Dimension getMaximumSize()
public void setParam(java.lang.String str)
public void setLocale(java.util.Locale locale)
public void setHeaderFont(java.awt.Font font)
font
- Font used for printing headers (null means use the "global" J2Printer value).
Default: Serif,PLAIN,10public java.awt.Font getHeaderFont()
public void setHeaderFont(int which, java.awt.Font font)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.font
- Font used for printing headers (null means use the "global" J2Printer value).
Default: Serif,PLAIN,10public java.awt.Font getHeaderFont(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setFooterFont(java.awt.Font font)
font
- Font used for printing footers (null means use the "global" J2Printer value).
Default: Serif,PLAIN,10public java.awt.Font getFooterFont()
public void setFooterFont(int which, java.awt.Font font)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.font
- Font used for printing footers (null means use the "global" J2Printer value).
Default: Serif,PLAIN,10public java.awt.Font getFooterFont(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setLeftFooter(java.lang.Object leftFooter)
leftFooter
- String or JLabel representing the leftFooter (null means use the "global" J2Printer value).
All occurrences of ### (3 pound signs) replaced by current page number.
All occurrences of @@@ (3 at signs) replaced by total number of pages.
All strings between pairs of |||
(3 vertical bars) passed to Java SimpleDateFormat class for formatting the current date & time.
Default: |||EEE, MMM d, yyyy|||SimpleDateFormat
public java.lang.Object getLeftFooter()
public void setLeftFooter(int which, java.lang.Object leftFooter)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.leftFooter
- String or JLabel representing the leftFooter (null means use the "global" J2Printer value).
All occurrences of ### (3 pound signs) replaced by current page number.
All occurrences of @@@ (3 at signs) replaced by total number of pages.
All strings between pairs of |||
(3 vertical bars) passed to Java SimpleDateFormat class for formatting the current date & time.
Default: |||EEE, MMM d, yyyy|||SimpleDateFormat
public java.lang.Object getLeftFooter(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setCenterFooter(java.lang.Object centerFooter)
centerFooter
- String or JLabel representing the centerFooter (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftFooter. Default: Page ### of @@@public java.lang.Object getCenterFooter()
public void setCenterFooter(int which, java.lang.Object centerFooter)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.centerFooter
- String or JLabel representing the centerFooter (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftFooter. Default: Page ### of @@@public java.lang.Object getCenterFooter(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setRightFooter(java.lang.Object rightFooter)
rightFooter
- String or JLabel representing the rightFooter (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftFooter. Default: |||hh:mm:ss a zzz|||public java.lang.Object getRightFooter()
public void setRightFooter(int which, java.lang.Object rightFooter)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.rightFooter
- String or JLabel representing the rightFooter (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftFooter. Default: |||hh:mm:ss a zzz|||public java.lang.Object getRightFooter(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setLeftHeader(java.lang.Object leftHeader)
leftHeader
- String or JLabel representing the leftHeader (null means use the "global" J2Printer value)
All occurrences of ### (3 pound signs) replaced by current page number.
All occurrences of @@@ (3 at signs) replaced by total number of pages.
All strings between pairs of |||
(3 vertical bars) passed to Java SimpleDateFormat class for formatting the current date & time.
Default: Wildcrest copyright noticeSimpleDateFormat
public java.lang.Object getLeftHeader()
public void setLeftHeader(int which, java.lang.Object leftHeader)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.leftHeader
- String or JLabel representing the leftHeader (null means use the "global" J2Printer value).
All occurrences of ### (3 pound signs) replaced by current page number.
All occurrences of @@@ (3 at signs) replaced by total number of pages.
All strings between pairs of |||
(3 vertical bars) passed to Java SimpleDateFormat class for formatting the current date & time.
Default: Wildcrest copyright noticeSimpleDateFormat
public java.lang.Object getLeftHeader(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setCenterHeader(java.lang.Object centerHeader)
centerHeader
- String or JLabel representing the centerHeader (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftHeader.
Default: Wildcrest copyright noticepublic java.lang.Object getCenterHeader()
public void setCenterHeader(int which, java.lang.Object centerHeader)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.centerHeader
- String or JLabel representing the centerHeader (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftHeader.
Default: Wildcrest copyright noticepublic java.lang.Object getCenterHeader(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setRightHeader(java.lang.Object rightHeader)
rightHeader
- String or JLabel representing the rightHeader (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftHeader.
Default: Wildcrest copyright noticepublic java.lang.Object getRightHeader()
public void setRightHeader(int which, java.lang.Object rightHeader)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.rightHeader
- String or JLabel representing the rightHeader (null means use the "global" J2Printer value).
Page number and data & time formatting same as for setLeftHeader.
Default: Wildcrest copyright noticepublic java.lang.Object getRightHeader(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setHeaderStyle(int style)
style
- J2Pageable.BOX or .LINE or .NONE or .GLOBAL. Default: GLOBALpublic int getHeaderStyle()
public void setHeaderStyle(int which, int style)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.style
- J2Pageable.BOX or .LINE or .NONE or .GLOBAL. Default: GLOBALpublic int getHeaderStyle(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void setFooterStyle(int style)
style
- J2Pageable.BOX or .LINE or .NONE or .GLOBAL. Default: GLOBALpublic int getFooterStyle()
public void setFooterStyle(int which, int style)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.style
- J2Pageable.BOX or .LINE or .NONE or .GLOBAL. Default: GLOBALpublic int getFooterStyle(int which)
which
- J2Pageable.FIRST (1) if page 1, or J2Pageable.REST (0) if pages 2...n.public void clearHeaders()
public void clearHeaders(int which)
which
- int = FIRST (1) if page 1, or = REST (0) if pages 2...n.public void clearFooters()
public void clearFooters(int which)
which
- int = FIRST (1) if page 1, or = REST (0) if pages 2...n.public void setLeftMargin(double leftMargin)
leftMargin
- left margin in inches.
Default: GLOBALpublic double getLeftMargin()
public void setRightMargin(double rightMargin)
rightMargin
- right margin in inches (negative means use the "global" J2Printer value).
Default: GLOBALpublic double getRightMargin()
public void setTopMargin(double topMargin)
topMargin
- top margin above header in inches (negative means use the "global" J2Printer value).
Actual margin will not be less than the unprintable top margin.
Default: GLOBALpublic double getTopMargin()
public void setBottomMargin(double bottomMargin)
bottomMargin
- bottom margin below footer in inches (negative means use the "global" J2Printer
value). Default: GLOBALpublic double getBottomMargin()
public void setGapBelowHeader(double gapBelowHeader)
gapBelowHeader
- gap between the header and top edge of the body (negative means use the
"global" J2Printer value). Default -1.0public double getGapBelowHeader()
public void setGapAboveFooter(double gapAboveFooter)
gapAboveFooter
- gap between the bottom edge of the body and the footer in inches (negative
means use the "global" J2Printer value).
Default -1.0public double getGapAboveFooter()
public void setOrientation(int orientation)
orientation
- J2Printer.PORTRAIT or .LANDSCAPE or .REVERSE_LANDSCAPE or .GLOBAL
(same as PageFormat.PORTRAIT, etc.). Default: GLOBALpublic int getOrientation()
public void setScale(double scale)
scale
- scaling factor for printing this J2Pageable (Default: GLOBAL)public double getScale()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |