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
-
PrintButtonFrame(PrintDip, String, String)
- Constructs a new Print button dialog.
-
actionPerformed(ActionEvent)
- Responds to the Print button being pressed.
-
componentHidden(ComponentEvent)
- Notification that the Print button frame has been hidden.
-
componentMoved(ComponentEvent)
- Notification that the Print button frame has been moved.
-
componentResized(ComponentEvent)
- Notification that the Print button frame has been resized.
-
componentShown(ComponentEvent)
- Notification that the Print button frame has been shown.
-
doLayout()
- Sizes and positions the Print button within the frame.
-
getPrintButton()
- Provides access to the Print button within this frame.
-
windowActivated(WindowEvent)
- Notification that the Print button frame has been activated.
-
windowClosed(WindowEvent)
- Notification that the Print button frame has been destroyed.
-
windowClosing(WindowEvent)
- Notification that the Print button frame is being closed.
-
windowDeactivated(WindowEvent)
- Notification that the Print button frame has been de-activated.
-
windowDeiconified(WindowEvent)
- Notification that the Print button frame has been restored from minimized state.
-
windowIconified(WindowEvent)
- Notification that the Print button frame has been minimized.
-
windowOpened(WindowEvent)
- Notification that the Print button frame has been created.
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
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
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.
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
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
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
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.
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.
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
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.
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.
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.
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.
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.
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