com.sun.java.help.impl
public class JHelpPrintHandler extends java.lang.Object implements java.awt.event.ActionListener
Modifier and Type | Class and Description |
---|---|
class |
JHelpPrintHandler.JHPageable |
Modifier and Type | Field and Description |
---|---|
protected javax.swing.event.SwingPropertyChangeSupport |
changeSupport
If any
PropertyChangeListeners have been registered, the
changeSupport field describes them. |
static java.lang.String |
PAGE_SETUP_BUTTON_NAME |
static java.lang.String |
PRINT_BUTTON_NAME |
static java.lang.String |
PRINT_LATER_BUTTON_NAME |
Constructor and Description |
---|
JHelpPrintHandler(JHelp help) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
ActionListener to perform printing.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a
PropertyChangeListener to the listener list. |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Supports reporting bound property changes.
|
HelpModel |
getHelpModel()
Getter for property model.
|
static JHelpPrintHandler |
getJHelpPrintHandler(JHelp help) |
java.awt.print.PageFormat |
getPageFormat()
Getter for property pageFormat.
|
java.awt.print.PageFormat |
getPF()
Deprecated.
As of JavaHelp version 2.0,
replaced by
getPageFormat() . |
java.awt.print.PrinterJob |
getPrinterJob() |
protected static java.awt.Rectangle |
getViewRec(javax.swing.text.View rootview,
float width,
float height)
Setups size of editor and return its optimal width.
|
void |
handlePageSetup(java.awt.Component psComp)
Sets the PrintHandler to handle pageSetup as a separate action from
printing.
|
boolean |
isEnabled()
Returns true if the action is enabled.
|
void |
print(java.net.URL url) |
void |
print(java.net.URL[] urls) |
void |
printSetup() |
protected static void |
processException(java.lang.Exception e) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a
PropertyChangeListener from the listener list. |
void |
setEnabled(boolean newValue)
Enables or disables the action.
|
void |
setHelpModel(HelpModel helpModel) |
void |
setPageFormat(java.awt.print.PageFormat pageFormat)
Setter for property pageFormat.
|
void |
setPF(java.awt.print.PageFormat pf)
Deprecated.
As of JDK version 2.0,
replaced by
setPageFormat(pageFormat) . |
public static final java.lang.String PRINT_BUTTON_NAME
public static final java.lang.String PAGE_SETUP_BUTTON_NAME
public static final java.lang.String PRINT_LATER_BUTTON_NAME
protected javax.swing.event.SwingPropertyChangeSupport changeSupport
PropertyChangeListeners
have been registered, the
changeSupport
field describes them.public JHelpPrintHandler(JHelp help)
public static JHelpPrintHandler getJHelpPrintHandler(JHelp help)
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
PropertyChangeEvent
to any registered
PropertyChangeListeners
.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
to the listener list.
The listener is registered for all properties.
A PropertyChangeEvent
will get fired in response to setting
a bound property, e.g. setFont
, setBackground
,
or setForeground
.
Note that if the current component is inheriting its foreground,
background, or font from its container, then no event will be
fired in response to a change in the inherited property.
listener
- The PropertyChangeListener
to be addedAction.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChangeListener
from the listener list.
This removes a PropertyChangeListener
that was registered
for all properties.listener
- the PropertyChangeListener
to be removedAction.removePropertyChangeListener(java.beans.PropertyChangeListener)
public boolean isEnabled()
Action.isEnabled()
public void setEnabled(boolean newValue)
newValue
- true to enable the action, false to
disable itAction.setEnabled(boolean)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void printSetup()
public void print(java.net.URL url)
public void print(java.net.URL[] urls)
public java.awt.print.PageFormat getPageFormat()
public java.awt.print.PageFormat getPF()
getPageFormat()
.public void setPageFormat(java.awt.print.PageFormat pageFormat)
pageFormat
- New value of property pageFormat.public void setPF(java.awt.print.PageFormat pf)
setPageFormat(pageFormat)
.public java.awt.print.PrinterJob getPrinterJob()
public void handlePageSetup(java.awt.Component psComp)
public void setHelpModel(HelpModel helpModel)
public HelpModel getHelpModel()
protected static java.awt.Rectangle getViewRec(javax.swing.text.View rootview, float width, float height)
protected static void processException(java.lang.Exception e)