public class PrintApplicationFileAction extends PrintFileAction
The file name is passed in the action command of the action event.
This action is called when DefaultOSXApplication
receives a print
request from another application. The file name is passed in the action
command of the action event.
If you want this behavior in your application, you have to create an action
with this ID and put it in your ApplicationModel
in method
ApplicationModel.initApplication(org.jhotdraw.app.Application)
. The views created by
ApplicationModel
must implement the PrintableView
interface.
You should also create a PrintFileAction
when you create this action.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
ENABLED_PROPERTY, VIEW_PROPERTY
Constructor and Description |
---|
PrintApplicationFileAction(Application app)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
isEnabled, printJava2D, printJava2DAlternative, printQuartz
getActiveView, getApplication, getPropertyName, installViewListeners, setEnabled, setPropertyName, uninstallViewListeners, updateEnabled, updateView, updateView
public static final java.lang.String ID
public PrintApplicationFileAction(Application app)
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class PrintFileAction