public class PrintActionListener extends Object implements ActionListener
DisplayImpl di = new DisplayImpl(...); ... JButton pb = new JButton("Print Me"); pb.addActionListener(new PrintActionListener(di));
Constructor and Description |
---|
PrintActionListener(DisplayImpl dim)
ActionListener for printing the contents of the VisAD display
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(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
|
public PrintActionListener(DisplayImpl dim)
dim
- the DisplayImpl to print when the actionPerformed is
calledpublic void setShowDialog(boolean value)
value
- set to 'true' to use PrintDialog or to
'false' to supress the dialog and just print. The
default is 'true'.public boolean getShowDialog()
public void setDisplay(DisplayImpl dim)
dim
- DisplayImpl to be printedpublic DisplayImpl getDisplay()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- the ActionEvent which is ignored...Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.