All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.lotspiech.poker.applet.VideoPokerApplet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----javax.swing.JApplet
                                           |
                                           +----com.lotspiech.poker.applet.VideoPokerApplet

public class VideoPokerApplet
extends JApplet
implements ActionListener, ItemListener
This class runs the GUI for Video Poker.

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 cardback
 o cardPanels
 o club
 o COPYRIGHT
 o credits
 o dealer
 o deck
 o deferredStatus
 o diamond
 o handCards
 o heart
 o ivjCardPanel1
 o ivjCardPanel2
 o ivjCardPanel3
 o ivjCardPanel4
 o ivjCardPanel5
 o ivjCreditLine
 o ivjDealButton
 o ivjHand
 o ivjHandField
 o ivjJAppletContentPane
 o ivjJLabel1
 o ivjJScrollPane1
 o ivjMachines
 o ivjMachinesBasicComboBoxRenderer
 o ivjManualDealButton
 o ivjPayoff
 o ivjPayoffDefaultTableCellRenderer
 o ivjScrollPaneTable
 o ivjScrollPaneTableDefaultTableColumnModel
 o ivjStatusLine
 o machines
 o spade
 o won

Constructor Index

 o VideoPokerApplet()

Method Index

 o actionPerformed(ActionEvent)
Method to handle events for the ActionListener interface.
 o connEtoC1(ItemEvent)
connEtoC1: (Machines.item.itemStateChanged(java.awt.event.ItemEvent) --> PokerApplet.machines_ItemStateChanged(Ljava.awt.event.ItemEvent;)V)
 o connEtoC2(ActionEvent)
connEtoC2: (DealButton.action.actionPerformed(java.awt.event.ActionEvent) --> PokerApplet.dealButton_ActionPerformed(Ljava.awt.event.ActionEvent;)V)
 o connEtoC4()
connEtoC4: (ManualDealButton.action.
 o connPtoP1SetTarget()
connPtoP1SetTarget: (JScrollPane1.background <--> ScrollPaneTable.background)
 o connPtoP2SetTarget()
connPtoP2SetTarget: (PokerApplet.background <--> JAppletContentPane.background)
 o dealButton_ActionPerformed(ActionEvent)
Comment
 o executeButton_ActionPerformed(ActionEvent)
This is called after pressing the Manual Deal button.
 o getAppletInfo()
Gets the applet information.
 o getCardPanel1()
Return the CardComponent1 property value.
 o getCardPanel2()
Return the CardComponent2 property value.
 o getCardPanel3()
Return the CardComponent3 property value.
 o getCardPanel4()
Return the CardComponent4 property value.
 o getCardPanel5()
Return the CardComponent5 property value.
 o getCreditLine()
Return the CreditLine property value.
 o getDealButton()
Return the DealButton property value.
 o getHand()
Return the TableColumn1 property value.
 o getHandField()
Return the JTextField1 property value.
 o getJAppletContentPane()
Return the JAppletContentPane property value.
 o getJLabel1()
Return the JLabel1 property value.
 o getJScrollPane1()
Return the JScrollPane1 property value.
 o getMachines()
Return the Machines property value.
 o getMachinesBasicComboBoxRenderer()
Return the MachinesBasicComboBoxRenderer property value.
 o getManualDealButton()
Return the ManualDealButton property value.
 o getPayoff()
Return the TableColumn2 property value.
 o getPayoffDefaultTableCellRenderer()
Return the PayoffDefaultTableCellRenderer property value.
 o getResourceAsBytes(String)
Get a resource out of the jar file.
 o getResourceAsStream(String)
Get a resource out of the jar file.
 o getScrollPaneTable()
Return the ScrollPaneTable property value.
 o getScrollPaneTableDefaultTableColumnModel()
Return the ScrollPaneTableDefaultTableColumnModel property value.
 o getStatusLine()
Return the StatusLine property value.
 o handleException(Throwable)
Called whenever the part throws an exception.
 o init()
Handle the Applet init method.
 o initConnections()
Initializes connections
 o itemStateChanged(ItemEvent)
Method to handle events for the ItemListener interface.
 o machines_ItemStateChanged(ItemEvent)
Comment
 o main(String[])
main entrypoint - starts the part when it is run as an application
 o pokerApplet_Init()
Comment
 o showCredits()
This method was created in VisualAge.

Variables

 o COPYRIGHT
 private static final String COPYRIGHT
 o dealer
 private DealerThread dealer
 o machines
 private Machines machines
 o credits
 private int credits
 o deferredStatus
 private String deferredStatus
 o won
 private boolean won
 o ivjJAppletContentPane
 private JPanel ivjJAppletContentPane
 o ivjJLabel1
 private JLabel ivjJLabel1
 o ivjJScrollPane1
 private JScrollPane ivjJScrollPane1
 o ivjScrollPaneTable
 private JTable ivjScrollPaneTable
 o ivjMachines
 private JComboBox ivjMachines
 o ivjHandField
 private JTextField ivjHandField
 o ivjScrollPaneTableDefaultTableColumnModel
 private DefaultTableColumnModel ivjScrollPaneTableDefaultTableColumnModel
 o ivjStatusLine
 private JLabel ivjStatusLine
 o ivjMachinesBasicComboBoxRenderer
 private BasicComboBoxRenderer ivjMachinesBasicComboBoxRenderer
 o ivjHand
 private TableColumn ivjHand
 o ivjPayoff
 private TableColumn ivjPayoff
 o ivjPayoffDefaultTableCellRenderer
 private DefaultTableCellRenderer ivjPayoffDefaultTableCellRenderer
 o ivjDealButton
 private JButton ivjDealButton
 o handCards
 private Card handCards[]
 o cardPanels
 private CardPanel cardPanels[]
 o deck
 Deck deck
 o ivjCardPanel1
 private CardPanel ivjCardPanel1
 o ivjCardPanel2
 private CardPanel ivjCardPanel2
 o ivjCardPanel3
 private CardPanel ivjCardPanel3
 o ivjCardPanel4
 private CardPanel ivjCardPanel4
 o ivjCardPanel5
 private CardPanel ivjCardPanel5
 o ivjCreditLine
 private JLabel ivjCreditLine
 o ivjManualDealButton
 private JButton ivjManualDealButton
 o heart
 public static Image heart
 o spade
 public static Image spade
 o diamond
 public static Image diamond
 o club
 public static Image club
 o cardback
 public static Image cardback

Constructors

 o VideoPokerApplet
 public VideoPokerApplet()

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(ItemEvent arg1)
connEtoC1: (Machines.item.itemStateChanged(java.awt.event.ItemEvent) --> PokerApplet.machines_ItemStateChanged(Ljava.awt.event.ItemEvent;)V)

Parameters:
arg1 - java.awt.event.ItemEvent
 o connEtoC2
 private void connEtoC2(ActionEvent arg1)
connEtoC2: (DealButton.action.actionPerformed(java.awt.event.ActionEvent) --> PokerApplet.dealButton_ActionPerformed(Ljava.awt.event.ActionEvent;)V)

Parameters:
arg1 - java.awt.event.ActionEvent
 o connEtoC4
 private void connEtoC4()
connEtoC4: (ManualDealButton.action. --> VideoPokerApplet.executeButton_ActionPerformed(Ljava.awt.event.ActionEvent;)V)

 o connPtoP1SetTarget
 private void connPtoP1SetTarget()
connPtoP1SetTarget: (JScrollPane1.background <--> ScrollPaneTable.background)

 o connPtoP2SetTarget
 private void connPtoP2SetTarget()
connPtoP2SetTarget: (PokerApplet.background <--> JAppletContentPane.background)

 o getResourceAsStream
 public static InputStream getResourceAsStream(String name)
Get a resource out of the jar file. We are using getResourceAsStream here instead of GetResource, which would be easier, to avoid a Netscape 4.x limitation.

 o getResourceAsBytes
 public static byte[] getResourceAsBytes(String name)
Get a resource out of the jar file.

 o dealButton_ActionPerformed
 public void dealButton_ActionPerformed(ActionEvent actionEvent)
Comment

 o executeButton_ActionPerformed
 public void executeButton_ActionPerformed(ActionEvent actionEvent)
This is called after pressing the Manual Deal button.

 o getAppletInfo
 public String getAppletInfo()
Gets the applet information.

Returns:
java.lang.String
Overrides:
getAppletInfo in class Applet
 o getCardPanel1
 private CardPanel getCardPanel1()
Return the CardComponent1 property value.

Returns:
com.lotspiech.poker.CardPanel
 o getCardPanel2
 private CardPanel getCardPanel2()
Return the CardComponent2 property value.

Returns:
com.lotspiech.poker.CardPanel
 o getCardPanel3
 private CardPanel getCardPanel3()
Return the CardComponent3 property value.

Returns:
com.lotspiech.poker.CardPanel
 o getCardPanel4
 private CardPanel getCardPanel4()
Return the CardComponent4 property value.

Returns:
com.lotspiech.poker.CardPanel
 o getCardPanel5
 private CardPanel getCardPanel5()
Return the CardComponent5 property value.

Returns:
com.lotspiech.poker.CardPanel
 o getCreditLine
 private JLabel getCreditLine()
Return the CreditLine property value.

Returns:
javax.swing.JLabel
 o getDealButton
 private JButton getDealButton()
Return the DealButton property value.

Returns:
javax.swing.JButton
 o getHand
 private TableColumn getHand()
Return the TableColumn1 property value.

Returns:
javax.swing.table.TableColumn
 o getHandField
 private JTextField getHandField()
Return the JTextField1 property value.

Returns:
javax.swing.JTextField
 o getJAppletContentPane
 private JPanel getJAppletContentPane()
Return the JAppletContentPane property value.

Returns:
javax.swing.JPanel
 o getJLabel1
 private JLabel getJLabel1()
Return the JLabel1 property value.

Returns:
javax.swing.JLabel
 o getJScrollPane1
 private JScrollPane getJScrollPane1()
Return the JScrollPane1 property value.

Returns:
javax.swing.JScrollPane
 o getMachines
 private JComboBox getMachines()
Return the Machines property value.

Returns:
javax.swing.JComboBox
 o getMachinesBasicComboBoxRenderer
 private BasicComboBoxRenderer getMachinesBasicComboBoxRenderer()
Return the MachinesBasicComboBoxRenderer property value.

Returns:
javax.swing.plaf.basic.BasicComboBoxRenderer
 o getManualDealButton
 private JButton getManualDealButton()
Return the ManualDealButton property value.

Returns:
javax.swing.JButton
 o getPayoff
 private TableColumn getPayoff()
Return the TableColumn2 property value.

Returns:
javax.swing.table.TableColumn
 o getPayoffDefaultTableCellRenderer
 private DefaultTableCellRenderer getPayoffDefaultTableCellRenderer()
Return the PayoffDefaultTableCellRenderer property value.

Returns:
javax.swing.table.DefaultTableCellRenderer
 o getScrollPaneTable
 private JTable getScrollPaneTable()
Return the ScrollPaneTable property value.

Returns:
javax.swing.JTable
 o getScrollPaneTableDefaultTableColumnModel
 private DefaultTableColumnModel getScrollPaneTableDefaultTableColumnModel()
Return the ScrollPaneTableDefaultTableColumnModel property value.

Returns:
javax.swing.table.DefaultTableColumnModel
 o getStatusLine
 private JLabel getStatusLine()
Return the StatusLine property value.

Returns:
javax.swing.JLabel
 o handleException
 private void handleException(Throwable exception)
Called whenever the part throws an exception.

Parameters:
exception - java.lang.Throwable
 o init
 public void init()
Handle the Applet init method.

Overrides:
init in class Applet
 o initConnections
 private void initConnections()
Initializes connections

 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
Method to handle events for the ItemListener interface.

Parameters:
e - java.awt.event.ItemEvent
 o machines_ItemStateChanged
 public void machines_ItemStateChanged(ItemEvent itemEvent)
Comment

 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 pokerApplet_Init
 public void pokerApplet_Init()
Comment

 o showCredits
 public void showCredits()
This method was created in VisualAge.


All Packages  Class Hierarchy  This Package  Previous  Next  Index