Class ServiceDialogPanel

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.inductiveautomation.factorypmi.application.print.ServiceDialogPanel
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class ServiceDialogPanel extends JDialog implements ActionListener
A class which implements a cross-platform print dialog.

CarlGould: This is pretty much a cut-and-paste job from sun.awt.ServiceDialog. For some reason, when its in my code, it works in full screen mode in Java 6.

See Also:
  • Field Details

    • WAITING

      public static final int WAITING
      Waiting print status (user response pending).
      See Also:
    • APPROVE

      public static final int APPROVE
      Approve print status (user activated "Print" or "OK").
      See Also:
    • CANCEL

      public static final int CANCEL
      Cancel print status (user activated "Cancel");
      See Also:
  • Constructor Details

  • Method Details

    • getStatus

      public int getStatus()
      Returns the current status of the dialog (whether the user has selected the "Print" or "Cancel" button)
    • getAttributes

      public PrintRequestAttributeSet getAttributes()
      Returns an AttributeSet based on whether or not the user cancelled the dialog. If the user selected "Print" we return their new selections, otherwise we return the attributes that were passed in initially.
    • getPrintService

      public PrintService getPrintService()
      Returns a PrintService based on whether or not the user cancelled the dialog. If the user selected "Print" we return the user's selection for the PrintService, otherwise we return null.
    • dispose

      public void dispose(int status)
      Sets the current status flag for the dialog and disposes it (thus returning control of the parent frame back to the user)
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • initResource

      public static void initResource()
      Initialize ResourceBundle
    • getMsg

      public static String getMsg(String key)
      Returns message string from resource
    • showNoPrintService

      public static void showNoPrintService(GraphicsConfiguration gc)
      Creates a pop-up dialog for "no print service"