Documentation of 'visad.util.PrintActionListener' Java class
PrintActionListener
visad.util

Class PrintActionListener

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener


    public class PrintActionListener
    extends java.lang.Object
    implements java.awt.event.ActionListener
    PrintActionListener is an ActionListener which is used to print the contents of the VisAD DisplayImpl. A simple way to use this is:
      DisplayImpl di = new DisplayImpl(...);
      ...
      JButton pb = new JButton("Print Me");
      pb.addActionListener(new PrintActionListener(di));
    
    • Constructor Summary

      Constructors 
      Constructor and Description
      PrintActionListener(DisplayImpl dim)
      ActionListener for printing the contents of the VisAD display
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void actionPerformed(java.awt.event.ActionEvent e)
      cause the printout of the DisplayImpl; if the dialog is enabled, it will pop up to solicit information from the user.
      DisplayImpl getDisplay()
      Return the display
      boolean getShowDialog()
      get the value of the showDialog state
      void setDisplay(DisplayImpl dim)
      Set the display to which this action will listen
      void setShowDialog(boolean value)
      set whether the PrintDialog should be used or not
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrintActionListener

        public PrintActionListener(DisplayImpl dim)
        ActionListener for printing the contents of the VisAD display
        Parameters:
        dim - the DisplayImpl to print when the actionPerformed is called
    • Method Detail

      • setShowDialog

        public void setShowDialog(boolean value)
        set whether the PrintDialog should be used or not
        Parameters:
        value - set to 'true' to use PrintDialog or to 'false' to supress the dialog and just print. The default is 'true'.
      • getShowDialog

        public boolean getShowDialog()
        get the value of the showDialog state
        Returns:
        'true' is PrintDialog will be used; 'false' if supressed.
      • setDisplay

        public void setDisplay(DisplayImpl dim)
        Set the display to which this action will listen
        Parameters:
        dim - DisplayImpl to be printed
      • getDisplay

        public DisplayImpl getDisplay()
        Return the display
        Returns:
        the display associated with this ActionListener
      • actionPerformed

        public void actionPerformed(java.awt.event.ActionEvent e)
        cause the printout of the DisplayImpl; if the dialog is enabled, it will pop up to solicit information from the user. If the dialog is disabled, just print...
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Parameters:
        e - the ActionEvent which is ignored...

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.