Documentation of 'org.jhotdraw.app.action.file.PrintFileAction' Java class
PrintFileAction
org.jhotdraw.app.action.file

Class PrintFileAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
    Direct Known Subclasses:
    PrintApplicationFileAction


    public class PrintFileAction
    extends AbstractViewAction
    Presents a printer chooser to the user and then prints the View.

    This action requires that the view implements the PrintableView interface.

    This action is called when the user selects the Print item in the File menu. The menu item is automatically created by the application.

    If you want this behavior in your application, you have to create it and put it in your ApplicationModel in method ApplicationModel.initApplication(org.jhotdraw.app.Application).

    You should also create a PrintFileAction when you create this action.


    Design Patterns

    Framework
    The interfaces and classes listed below define together the contracts of a smaller framework inside of the JHotDraw framework for document oriented applications.
    Contract: PrintableView.
    Client: PrintFileAction.


    See Also:
    Serialized Form
    • Method Detail

      • actionPerformed

        public void actionPerformed(java.awt.event.ActionEvent evt)
      • printJava2DAlternative

        public void printJava2DAlternative(PrintableView v)
      • printQuartz

        public void printQuartz(PrintableView v)
        On Mac OS X with the Quartz rendering engine, the following code achieves the best results.
      • isEnabled

        public boolean isEnabled()
        Returns true if the action is enabled. The enabled state of the action depends on the state that has been set using setEnabled() and on the enabled state of the application.
        Specified by:
        isEnabled in interface javax.swing.Action
        Overrides:
        isEnabled in class AbstractViewAction
        Returns:
        true if the action is enabled, false otherwise
        See Also:
        Action.isEnabled()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.