All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.lotspiech.poker.applet.CardPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----javax.swing.JComponent
                           |
                           +----javax.swing.JPanel
                                   |
                                   +----com.lotspiech.poker.applet.CardPanel

public class CardPanel
extends JPanel
implements ActionListener, ImageObserver
This bean holds a card image, and the associated hold button.

Copyright 2001, 2002 by Jeffrey B. Lotspiech. This program is open source; it is licensed under the Common Public License Version 0.5.

Author:
Jeffrey B. Lotspiech

Variable Index

 o bottomMargin
 o card
 o cardback
 o club
 o COPYRIGHT
 o diamond
 o discarded
 o heart
 o ivjHeldLabel
 o ivjHold
 o metrics
 o red
 o spade
 o topMargin

Constructor Index

 o CardPanel()
Constructor
 o CardPanel(boolean)
CardComponent constructor comment.
 o CardPanel(LayoutManager)
CardComponent constructor comment.
 o CardPanel(LayoutManager, boolean)
CardComponent constructor comment.

Method Index

 o actionPerformed(ActionEvent)
Method to handle events for the ActionListener interface.
 o connEtoC1(ActionEvent)
connEtoC1: (Hold.action.actionPerformed(java.awt.event.ActionEvent) --> CardComponent.hold_ActionPerformed(Ljava.awt.event.ActionEvent;)V)
 o getHeldLabel()
Return the HeldLabel property value.
 o getHold()
Return the Hold property value.
 o getImages(JApplet)
This method was created in VisualAge.
 o handleException(Throwable)
Called whenever the part throws an exception.
 o hold_ActionPerformed(ActionEvent)
Comment
 o imageUpdate(Image, int, int, int, int, int)
imageUpdate method comment.
 o initConnections()
Initializes connections
 o initialize()
Initialize the class.
 o isDiscarded()
This method was created in VisualAge.
 o main(String[])
main entrypoint - starts the part when it is run as an application
 o paintComponent(Graphics)
This method was created in VisualAge.
 o paintWild(Graphics, Rectangle)
This method was created in VisualAge.
 o setCard(Card)
This method was created in VisualAge.

Variables

 o COPYRIGHT
 private static final String COPYRIGHT
 o topMargin
 private static final int topMargin
 o bottomMargin
 private static final int bottomMargin
 o heart
 private static Image heart
 o diamond
 private static Image diamond
 o spade
 private static Image spade
 o club
 private static Image club
 o cardback
 private static Image cardback
 o red
 private static Color red
 o card
 private Card card
 o metrics
 private FontMetrics metrics
 o discarded
 private boolean discarded
 o ivjHold
 private JButton ivjHold
 o ivjHeldLabel
 private JLabel ivjHeldLabel

Constructors

 o CardPanel
 public CardPanel()
Constructor

 o CardPanel
 public CardPanel(LayoutManager layout)
CardComponent constructor comment.

Parameters:
layout - java.awt.LayoutManager
 o CardPanel
 public CardPanel(LayoutManager layout,
                  boolean isDoubleBuffered)
CardComponent constructor comment.

Parameters:
layout - java.awt.LayoutManager
isDoubleBuffered - boolean
 o CardPanel
 public CardPanel(boolean isDoubleBuffered)
CardComponent constructor comment.

Parameters:
isDoubleBuffered - boolean

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Method to handle events for the ActionListener interface.

Parameters:
e - java.awt.event.ActionEvent
 o connEtoC1
 private void connEtoC1(ActionEvent arg1)
connEtoC1: (Hold.action.actionPerformed(java.awt.event.ActionEvent) --> CardComponent.hold_ActionPerformed(Ljava.awt.event.ActionEvent;)V)

Parameters:
arg1 - java.awt.event.ActionEvent
 o getHeldLabel
 private JLabel getHeldLabel()
Return the HeldLabel property value.

Returns:
javax.swing.JLabel
 o getHold
 private JButton getHold()
Return the Hold property value.

Returns:
javax.swing.JButton
 o getImages
 public static void getImages(JApplet applet)
This method was created in VisualAge.

 o handleException
 private void handleException(Throwable exception)
Called whenever the part throws an exception.

Parameters:
exception - java.lang.Throwable
 o hold_ActionPerformed
 public void hold_ActionPerformed(ActionEvent actionEvent)
Comment

 o imageUpdate
 public boolean imageUpdate(Image img,
                            int infoflags,
                            int x,
                            int y,
                            int width,
                            int height)
imageUpdate method comment.

Overrides:
imageUpdate in class Component
 o initConnections
 private void initConnections()
Initializes connections

 o initialize
 private void initialize()
Initialize the class.

 o isDiscarded
 public boolean isDiscarded()
This method was created in VisualAge.

Returns:
boolean
 o main
 public static void main(String args[])
main entrypoint - starts the part when it is run as an application

Parameters:
args - java.lang.String[]
 o paintComponent
 public void paintComponent(Graphics g)
This method was created in VisualAge.

Parameters:
card - com.lotspiech.poker.Card
Overrides:
paintComponent in class JComponent
 o paintWild
 public void paintWild(Graphics g,
                       Rectangle R)
This method was created in VisualAge.

Parameters:
g - java.awt.Graphics
R - java.awt.Rectangle
 o setCard
 public void setCard(Card card)
This method was created in VisualAge.

Parameters:
card - com.lotspiech.poker.Card

All Packages  Class Hierarchy  This Package  Previous  Next  Index