visad.util
Class PrintActionListener
- java.lang.Object
-
- visad.util.PrintActionListener
-
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public class PrintActionListener extends java.lang.Object implements java.awt.event.ActionListenerPrintActionListener 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 voidactionPerformed(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.DisplayImplgetDisplay()Return the displaybooleangetShowDialog()get the value of the showDialog statevoidsetDisplay(DisplayImpl dim)Set the display to which this action will listenvoidsetShowDialog(boolean value)set whether the PrintDialog should be used or not
-
-
-
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:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
e- the ActionEvent which is ignored...
-
-
DMelt 3.0 © DataMelt by jWork.ORG