All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.samples.dips.print.PrintButtonFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----com.ibm.beans.samples.dips.print.PrintButtonFrame

public class PrintButtonFrame
extends Frame
implements ActionListener, ComponentListener, WindowListener

This class is a support class used by the Print Dip. This class implements a small dialog that contains a Print button. When the button is clicked, a callback to the dip is made which causes the dippable bean to be printed.

This class is basically the view side of the dip. The model is primarily in the PrintDip class.

See Also:
PrintDip

Constructor Index

 o PrintButtonFrame(PrintDip, String, String)
Constructs a new Print button dialog.

Method Index

 o actionPerformed(ActionEvent)
Responds to the Print button being pressed.
 o componentHidden(ComponentEvent)
Notification that the Print button frame has been hidden.
 o componentMoved(ComponentEvent)
Notification that the Print button frame has been moved.
 o componentResized(ComponentEvent)
Notification that the Print button frame has been resized.
 o componentShown(ComponentEvent)
Notification that the Print button frame has been shown.
 o doLayout()
Sizes and positions the Print button within the frame.
 o getPrintButton()
Provides access to the Print button within this frame.
 o windowActivated(WindowEvent)
Notification that the Print button frame has been activated.
 o windowClosed(WindowEvent)
Notification that the Print button frame has been destroyed.
 o windowClosing(WindowEvent)
Notification that the Print button frame is being closed.
 o windowDeactivated(WindowEvent)
Notification that the Print button frame has been de-activated.
 o windowDeiconified(WindowEvent)
Notification that the Print button frame has been restored from minimized state.
 o windowIconified(WindowEvent)
Notification that the Print button frame has been minimized.
 o windowOpened(WindowEvent)
Notification that the Print button frame has been created.

Constructors

 o PrintButtonFrame
 public PrintButtonFrame(PrintDip dip,
                         String title,
                         String buttonText)
Constructs a new Print button dialog. The dialog's listeners are attached and the Print button is created and wired to deliver events to the dialog. It is the caller's responsibility to size, position, and show the dialog.

Parameters:
dip - The dip to which this frame belongs.
title - The text to appear in the frame's title bar.
buttonText - The label for the Print button.
See Also:
createPrintButtonFrame

Methods

 o doLayout
 public void doLayout()
Sizes and positions the Print button within the frame. If the frame is resized, the button dynamically resizes itself to be 5 pels from each edge.

Overrides:
doLayout in class Container
 o getPrintButton
 public Button getPrintButton()
Provides access to the Print button within this frame. The dip uses this method to access the Print button in order to modify button-related properties.

Returns:
The Print button.
 o actionPerformed
 public void actionPerformed(ActionEvent evt)
Responds to the Print button being pressed. This method calls the printDippableBean method of the dip.

Parameters:
evt - Describes the action that occurred.
See Also:
printDippableBean
 o componentMoved
 public void componentMoved(ComponentEvent evt)
Notification that the Print button frame has been moved. The Print Dip is notified by setting its printButtonFrameXPos and/or printButtonFrameYPos properties. Each property is only set if it actually changed.

Parameters:
evt - Describes the event that occurred.
See Also:
setPrintButtonFrameXPos, setPrintButtonFrameYPos
 o componentResized
 public void componentResized(ComponentEvent evt)
Notification that the Print button frame has been resized. The Print Dip is notified by setting its printButtonFrameWidth and/or printButtonFrameHeight properties. Each property is only set if it actually changed.

Parameters:
evt - Describes the event that occurred.
See Also:
setPrintButtonFrameWidth, setPrintButtonFrameHeight
 o componentShown
 public void componentShown(ComponentEvent evt)
Notification that the Print button frame has been shown. No action is taken; the ComponentListener interface requires this method.

Parameters:
evt - Describes the event that occurred.
 o componentHidden
 public void componentHidden(ComponentEvent evt)
Notification that the Print button frame has been hidden. No action is taken; the ComponentListener interface requires this method.

Parameters:
evt - Describes the event that occurred.
 o windowClosing
 public void windowClosing(WindowEvent evt)
Notification that the Print button frame is being closed. This event is fired in response to the title bar Close button being pressed (or Close being chosen from the frame's system menu). Rather than actually closing the window, it is simply hidden (so that it can be shown again if requested). Also, rather than directly hiding it, the showPrintButtonFrame property of the PrintDip is set to false (deferring the implementation of what to do when this property is modified to the dip).

Parameters:
evt - Describes the action that occurred.
See Also:
setShowPrintButtonFrame
 o windowOpened
 public void windowOpened(WindowEvent evt)
Notification that the Print button frame has been created. No action is taken; the WindowListener interface requires this method.

Parameters:
evt - Describes the event that occurred.
 o windowClosed
 public void windowClosed(WindowEvent evt)
Notification that the Print button frame has been destroyed. No action is taken; the WindowListener interface requires this method.

Parameters:
evt - Describes the event that occurred.
 o windowActivated
 public void windowActivated(WindowEvent evt)
Notification that the Print button frame has been activated. No action is taken; the WindowListener interface requires this method.

Parameters:
evt - Describes the event that occurred.
 o windowDeactivated
 public void windowDeactivated(WindowEvent evt)
Notification that the Print button frame has been de-activated. No action is taken; the WindowListener interface requires this method.

Parameters:
evt - Describes the event that occurred.
 o windowIconified
 public void windowIconified(WindowEvent evt)
Notification that the Print button frame has been minimized. No action is taken; the WindowListener interface requires this method.

Parameters:
evt - Describes the event that occurred.
 o windowDeiconified
 public void windowDeiconified(WindowEvent evt)
Notification that the Print button frame has been restored from minimized state. No action is taken; the WindowListener interface requires this method.

Parameters:
evt - Describes the event that occurred.

All Packages  Class Hierarchy  This Package  Previous  Next  Index