|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.ri.common.print.awt.PageSetupDialog
The purpose of this class is to expose many of the settings available in the
StormPageFormat object in a "use anywhere" dialog window. The
dialog has support for four types of basic PageDecorations defined by their
names, such as Title, URL, Date/Time and Page # of #. If the StormPageObject
has other PageDecoration with different names they are ignored by the dialog
but will still be printed as expected.
The StormPageFormat settings are represented by two panels, settings and
advanced respectively. The "Settings" panel has the following settings:
orientation - radio boxes to choice either Portrait or Landscape for the
paper orientation
Scale - text field which accepts whole number that represent the layout
scale in percent. A check box is also used to specify if the
the layout should be shrunk to fit the paper width.
Margins - Specify the paper margins in units defined in the Advanced
section.
Headers & footers - combo boxes can be used to pick the header and
footer font and font size from available system fonts. There
are also combo boxes for selecting predefined header and footer
page decoration for left, center and right positioning.
The "Advanced" Jpanel has the following settings:
Options - a check box to turn on or off the printing of background colours
and images. The default unit can also be selected via a combo
box. When a new unit is selected the margins in the "settings"
panel are automatically updated.
HTML Paging - a check box to turn on or off HTML smart paging. Smart
paging enables special algorithms in the HTML4 pilot which try
and find logical horizontal and vertical page breaks. If smart
paging is disabled horizontal and vertical page breaks are made on
the imageable area dimensions.
Frames - only applicable for html4 pages that have a frame set page. If so
a radio box is used to select individual frame printing which a
combo box to select the desired frame. A second radio box
is available to for printing all frames in the frameset.
This dialog comes in two different layout flavours which can be easily be
selected via the default constructor. The first flavour is button view where
the first settings panel is visible on the dialog and the advanced settings
are available by a button which makes the panel visible. The second flavour
is list view which displays a list view of the available panels on the left
hand side of the dialog. Selecting a list elements make the respective panel
visible on the right hand side of the dialog.
The print preview dialog takes a StormPageFormat object in the constructor
and clones it. On the return of showDialog a new modified version of the
StormPageObject is returned.
| Nested Class Summary | |
class |
PageSetupDialog.AdvancedPageSettingsPanel
The classes purpose is to provide a panel that represents many of the advanced page settings found in the the StormPageFormat object. |
class |
PageSetupDialog.PageSettingsPanel
The classes purpose is to provide a panel that represents many of the default page settings found in the the StormPageFormat object. |
| Field Summary | |
static int |
BUTTON_LAYOUT
Set the look and feel of the dialog to button panel view. |
static int |
LIST_LAYOUT
Set the look and feel of the dialog to a list panel view. |
| Constructor Summary | |
PageSetupDialog(Frame parent,
Viewport viewport,
StormPageFormat stormPageFormat)
Constructs a new PageSetupDialog with a tabbed layout. |
|
PageSetupDialog(Frame parent,
Viewport viewport,
StormPageFormat stormPageFormat,
int view)
Constructs a new PageSetupDialog with a tabbed layout. |
|
| Method Summary | |
static void |
refreshPageDecoration(Viewport viewport,
StormPageFormat stormPageFormat)
Utility function for printing. |
StormPageFormat |
showDialog()
Display the dialog by making it visible. |
void |
windowActivated(WindowEvent ev)
|
void |
windowClosed(WindowEvent ev)
|
void |
windowClosing(WindowEvent e)
Window Closing Event listener |
void |
windowDeactivated(WindowEvent ev)
|
void |
windowDeiconified(WindowEvent ev)
|
void |
windowIconified(WindowEvent ev)
|
void |
windowOpened(WindowEvent ev)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int LIST_LAYOUT
public static final int BUTTON_LAYOUT
| Constructor Detail |
public PageSetupDialog(Frame parent,
Viewport viewport,
StormPageFormat stormPageFormat)
parent - parent frame from which the dialog is displayedviewport - the viewport that will be used for setupstormPageFormat - the settings from which the dialog uses as default
values.
public PageSetupDialog(Frame parent,
Viewport viewport,
StormPageFormat stormPageFormat,
int view)
parent - parent frame from which the dialog is displayedviewport - the viewport that will be used for setupstormPageFormat - the settings from which the dialog uses as default
values.view - specify the desired layout with one of the constants,
LIST_LAYOUT and BUTTON_LAYOUT| Method Detail |
public StormPageFormat showDialog()
public static void refreshPageDecoration(Viewport viewport,
StormPageFormat stormPageFormat)
stormPageFormat object that needed
to be updated for the a given viewport state. Decorations
named "Title", "Date/Time", URL and "Page # of #" are updated to reflect
the given viewports state.
viewport - stormPageFormat - public void windowClosing(WindowEvent e)
windowClosing in interface WindowListenere - public void windowClosed(WindowEvent ev)
windowClosed in interface WindowListenerpublic void windowOpened(WindowEvent ev)
windowOpened in interface WindowListenerpublic void windowIconified(WindowEvent ev)
windowIconified in interface WindowListenerpublic void windowDeiconified(WindowEvent ev)
windowDeiconified in interface WindowListenerpublic void windowActivated(WindowEvent ev)
windowActivated in interface WindowListenerpublic void windowDeactivated(WindowEvent ev)
windowDeactivated in interface WindowListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||