|
Side of Software Print Preview Library 1.8.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.plaf.ComponentUI | +--sos.preview.PrintPreviewPageUI | +--sos.preview.BasicPrintPreviewPageUI
A basic implementation of the print preview page look and feel.
PrintPreviewPageUI
,
JPrintPreviewPage
Field Summary | |
static java.lang.Object |
ALWAYS_CACHE_VALUE
A possible value for the look-and-feel key CACHING_POLICY_KEY that
always caches the image of the page. |
static java.lang.Object |
BACKGROUND_KEY
The look-and-feel key for the background color. |
static java.lang.Object |
BORDER_THICKNESS_KEY
The look-and-feel key for the border thickness. |
static java.lang.Object |
CACHING_POLICY_KEY
The look-and-feel key for the use of a cache. |
static java.lang.Object |
FOREGROUND_KEY
The look-and-feel key for the foreground color. |
static java.lang.Object |
MARGIN_COLOR_KEY
The look-and-feel key for the margin color. |
static java.lang.Object |
MARGIN_STROKE_KEY
The look-and-feel key for the margin stroke. |
static java.lang.Object |
MEMORY_SENSITIVE_CACHE_VALUE
A possible value for the look-and-feel key CACHING_POLICY_KEY that
caches a soft reference to the image of the page. |
static java.lang.Object |
NEVER_CACHE_VALUE
A possible value for the look-and-feel key CACHING_POLICY_KEY that
never caches the image of the page. |
static java.lang.Object |
SHADOW_COLOR_KEY
The look-and-feel key for the shadow color. |
static java.lang.Object |
SHADOW_THICKNESS_KEY
The look-and-feel key for the shadow thickness. |
Constructor Summary | |
BasicPrintPreviewPageUI()
Creates a new instance of BasicPrintPreviewPageUI |
Method Summary | |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Returns an instance of the UI delegate for the specified component. |
double |
getFixedHeight(JPrintPreviewPage printPreviewPage)
Returns the height of the fixed portion of the specified page. |
double |
getFixedWidth(JPrintPreviewPage printPreviewPage)
Returns the width of the fixed portion of the specified page. |
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
Returns the specified component's preferred size appropriate for the look and feel. |
java.awt.Dimension |
getScaleablePreferredSize(JPrintPreviewPage printPreviewPage)
Returns the preferred size of the scaleable portion of the specified page. |
protected void |
installDefaults()
Installs the default colors and lines of the print preview page. |
void |
installUI(javax.swing.JComponent c)
Configures the specified component appropriate for the look and feel. |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
Paints the specified component appropriate for the look and feel. |
protected void |
uninstallDefaults()
Uninstalls the defaults installed by installDefaults . |
void |
uninstallUI(javax.swing.JComponent c)
Reverses configuration which was done on the specified component during installUI . |
Methods inherited from class javax.swing.plaf.ComponentUI |
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Object BORDER_THICKNESS_KEY
UIManager.put( BasicPrintPreviewPageUI.BORDER_THICKNESS_KEY, new Integer( n ));
public static final java.lang.Object SHADOW_THICKNESS_KEY
UIManager.put( BasicPrintPreviewPageUI.SHADOW_THICKNESS_KEY, new Integer( n ));
public static final java.lang.Object BACKGROUND_KEY
UIManager.put( BasicPrintPreviewPageUI.BACKGROUND_KEY, Color.blue );
public static final java.lang.Object FOREGROUND_KEY
UIManager.put( BasicPrintPreviewPageUI.FOREGROUND_KEY, Color.blue );
public static final java.lang.Object SHADOW_COLOR_KEY
UIManager.put( BasicPrintPreviewPageUI.SHADOW_COLOR_KEY, Color.blue );
public static final java.lang.Object MARGIN_COLOR_KEY
UIManager.put( BasicPrintPreviewPageUI.MARGIN_COLOR_KEY, Color.blue );
public static final java.lang.Object MARGIN_STROKE_KEY
UIManager.put( BasicPrintPreviewPageUI.MARGIN_STROKE_KEY, new BasicStroke() );
public static final java.lang.Object CACHING_POLICY_KEY
NEVER_CACHE_VALUE
).
Applications may change
the default value by invoking at application start-up either
UIManager.put( BasicPrintPreviewPageUI.CACHING_POLICY_KEY, BasicPrintPreviewPageUI.ALWAYS_CACHE_VALUE );or
UIManager.put( BasicPrintPreviewPageUI.CACHING_POLICY_KEY, BasicPrintPreviewPageUI.MEMORY_SENSITIVE_CACHE_VALUE);
ALWAYS_CACHE_VALUE
,
MEMORY_SENSITIVE_CACHE_VALUE
public static final java.lang.Object ALWAYS_CACHE_VALUE
CACHING_POLICY_KEY
that
always caches the image of the page. If the rendering of a page is slow,
use of the cached image will speed up successive renderings.The image is cached for the current zoom level only. If the zoom level changes, the image is redrawn and re-cached.
public static final java.lang.Object NEVER_CACHE_VALUE
CACHING_POLICY_KEY
that
never caches the image of the page. Each time the image is rendered,
print
is invoked on the printable object.
public static final java.lang.Object MEMORY_SENSITIVE_CACHE_VALUE
CACHING_POLICY_KEY
that
caches a soft reference to the image of the page. If the rendering of a page is slow,
use of the cached image will speed up successive renderings. If memory
is in demand, the soft reference is cleared and the image is re-cached
the next time the page is rendered.The image is cached for the current zoom level only. If the zoom level changes, the image is redrawn and re-cached.
Constructor Detail |
public BasicPrintPreviewPageUI()
BasicPrintPreviewPageUI
Method Detail |
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
public double getFixedWidth(JPrintPreviewPage printPreviewPage)
PrintPreviewPageUI
getFixedWidth
in class PrintPreviewPageUI
printPreviewPage
- page to get the fixed width
public double getFixedHeight(JPrintPreviewPage printPreviewPage)
PrintPreviewPageUI
getFixedHeight
in class PrintPreviewPageUI
printPreviewPage
- page to get the fixed height
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize
in class javax.swing.plaf.ComponentUI
public java.awt.Dimension getScaleablePreferredSize(JPrintPreviewPage printPreviewPage)
PrintPreviewPageUI
getScaleablePreferredSize
in class PrintPreviewPageUI
printPreviewPage
- page to get the preferred size
protected void installDefaults()
uninstallDefaults()
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.ComponentUI
uninstallUI(javax.swing.JComponent)
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.ComponentUI
protected void uninstallDefaults()
installDefaults
.
installDefaults()
public void uninstallUI(javax.swing.JComponent c)
installUI
.
uninstallUI
in class javax.swing.plaf.ComponentUI
installUI(javax.swing.JComponent)
|
Side of Software Print Preview Library 1.8.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |