gov.nih.nlm.util
Class PrintPreviewAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bygov.nih.nlm.util.PrintPreviewAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable, WindowListener

public class PrintPreviewAction
extends AbstractAction
implements WindowListener

Frame for previewing stuff to print

See Also:
Serialized Form

Field Summary
protected  JFrame frame
           
protected  JLabel page_ct_label
           
protected  int page_height
           
protected  int page_index
           
protected  int page_width
           
protected  gov.nih.nlm.util.PrintPreviewAction.PreviewContainer preview_container
           
protected  Action print_action
           
protected  Printable printable
           
protected  JScrollPane ps
           
protected  int scale
           
protected  JComboBox scale_box
           
protected  int selected_page_index
           
protected  String title
           
protected  Cursor zoom_cursor
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
PrintPreviewAction(String icon_path, Action print_action)
          Instantiates a PrintPreviewAction from the specified info.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Handles action.
protected  void createComponents()
           
 void setPrintable(Printable printable)
          Sets the Printable to preview.
 void setTitle(String title)
          Sets the title.
 void windowActivated(WindowEvent we)
           
 void windowClosed(WindowEvent we)
           
 void windowClosing(WindowEvent we)
           
 void windowDeactivated(WindowEvent we)
           
 void windowDeiconified(WindowEvent we)
           
 void windowIconified(WindowEvent we)
           
 void windowOpened(WindowEvent we)
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

page_width

protected int page_width

page_height

protected int page_height

scale

protected int scale

scale_box

protected JComboBox scale_box

preview_container

protected gov.nih.nlm.util.PrintPreviewAction.PreviewContainer preview_container

frame

protected JFrame frame

title

protected String title

page_ct_label

protected JLabel page_ct_label

page_index

protected int page_index

selected_page_index

protected int selected_page_index

printable

protected Printable printable

print_action

protected Action print_action

ps

protected JScrollPane ps

zoom_cursor

protected Cursor zoom_cursor
Constructor Detail

PrintPreviewAction

public PrintPreviewAction(String icon_path,
                          Action print_action)
Instantiates a PrintPreviewAction from the specified info.

Parameters:
icon_path - path to the icon
print_action - the print action
Method Detail

setTitle

public void setTitle(String title)
Sets the title.

Parameters:
title - the title

setPrintable

public void setPrintable(Printable printable)
Sets the Printable to preview.

Parameters:
printable - the Printable to preview

actionPerformed

public void actionPerformed(ActionEvent ae)
Handles action.

Specified by:
actionPerformed in interface ActionListener
Parameters:
ae - the ActionEvent

createComponents

protected void createComponents()

windowActivated

public void windowActivated(WindowEvent we)
Specified by:
windowActivated in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent we)
Specified by:
windowDeactivated in interface WindowListener

windowClosed

public void windowClosed(WindowEvent we)
Specified by:
windowClosed in interface WindowListener

windowClosing

public void windowClosing(WindowEvent we)
Specified by:
windowClosing in interface WindowListener

windowOpened

public void windowOpened(WindowEvent we)
Specified by:
windowOpened in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent we)
Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent we)
Specified by:
windowIconified in interface WindowListener


Copyright ©2005