All Packages Class Hierarchy This Package Previous Next Index
Class COM.BSNumberTextFieldsSampleApplets.BSPriceCalculationApplet
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----COM.BSNumberTextFieldsSampleApplets.BSPriceCalculationApplet
- public class BSPriceCalculationApplet
- extends Applet
- implements ActionListener
A sample Applet for testing BSNumberTextFields.
This Applet allows you to calculate the extended price for any item,
given its unit price and quantity.
The unit price and extension price are of type BSDoubleTextField, the
quantity is of type BSIntegerTextField. The prefixString properties have
been exploited in this sample applet to show how the BSDoubleTextField can
be used to display currency.
-
ivjButton1
-
-
ivjExtendedPriceBSDoubleTextField
-
-
ivjLabel1
-
-
ivjLabel2
-
-
ivjLabel3
-
-
ivjLabel4
-
-
ivjQuantityBSIntegerTextField
-
-
ivjUnitPriceBSDoubleTextField
-
-
BSPriceCalculationApplet()
-
-
actionPerformed(ActionEvent)
- Method to handle events for the ActionListener interface.
-
calculateExtendedPrice(Double, Long)
- This method was calculates the extended price by multiplying p (price) and
q (quantity).
-
conn0(ActionEvent)
- conn0
-
conn3(String)
- conn3
-
conn4()
- conn4
-
getAppletInfo()
- Gets the applet information.
-
getButton1()
- Return the Button1 property value.
-
getExtendedPriceBSDoubleTextField()
- Return the ExtendedPriceBSDoubleTextField property value.
-
getLabel1()
- Return the Label1 property value.
-
getLabel2()
- Return the Label2 property value.
-
getLabel3()
- Return the Label3 property value.
-
getLabel4()
- Return the Label4 property value.
-
getQuantityBSIntegerTextField()
- Return the QuantityBSIntegerTextField property value.
-
getUnitPriceBSDoubleTextField()
- Return the UnitPriceBSDoubleTextField property value.
-
handleException(Throwable)
- Called whenever the part throws an exception.
-
init()
- Handle the Applet init method.
-
initConnections()
- Initializes connections
-
main(String[])
- main entrypoint - starts the part when it is run as an application
-
start()
- Method to handle events for the Applet interface.
ivjButton1
private Button ivjButton1
ivjExtendedPriceBSDoubleTextField
private BSDoubleTextField ivjExtendedPriceBSDoubleTextField
ivjLabel1
private Label ivjLabel1
ivjLabel2
private Label ivjLabel2
ivjLabel3
private Label ivjLabel3
ivjLabel4
private Label ivjLabel4
ivjQuantityBSIntegerTextField
private BSIntegerTextField ivjQuantityBSIntegerTextField
ivjUnitPriceBSDoubleTextField
private BSDoubleTextField ivjUnitPriceBSDoubleTextField
BSPriceCalculationApplet
public BSPriceCalculationApplet()
actionPerformed
public void actionPerformed(ActionEvent e)
- Method to handle events for the ActionListener interface.
- Parameters:
- e - java.awt.event.ActionEvent
calculateExtendedPrice
private String calculateExtendedPrice(Double p,
Long q)
- This method was calculates the extended price by multiplying p (price) and
q (quantity). The result is returned as a String.
- Parameters:
- p - Double
- q - Long
- Returns:
- java.lang.String
conn0
private String conn0(ActionEvent arg1)
- conn0
- Parameters:
- arg1 - java.awt.event.ActionEvent
- Returns:
- java.lang.String
conn3
private void conn3(String result)
- conn3
- Parameters:
- result - java.lang.String
conn4
private void conn4()
- conn4
getAppletInfo
public String getAppletInfo()
- Gets the applet information.
- Returns:
- java.lang.String
- Overrides:
- getAppletInfo in class Applet
getButton1
private Button getButton1()
- Return the Button1 property value.
- Returns:
- java.awt.Button
getExtendedPriceBSDoubleTextField
private BSDoubleTextField getExtendedPriceBSDoubleTextField()
- Return the ExtendedPriceBSDoubleTextField property value.
- Returns:
- COM.BSNumberTextFields.BSDoubleTextField
getLabel1
private Label getLabel1()
- Return the Label1 property value.
- Returns:
- java.awt.Label
getLabel2
private Label getLabel2()
- Return the Label2 property value.
- Returns:
- java.awt.Label
getLabel3
private Label getLabel3()
- Return the Label3 property value.
- Returns:
- java.awt.Label
getLabel4
private Label getLabel4()
- Return the Label4 property value.
- Returns:
- java.awt.Label
getQuantityBSIntegerTextField
private BSIntegerTextField getQuantityBSIntegerTextField()
- Return the QuantityBSIntegerTextField property value.
- Returns:
- COM.BSNumberTextFields.BSIntegerTextField
getUnitPriceBSDoubleTextField
private BSDoubleTextField getUnitPriceBSDoubleTextField()
- Return the UnitPriceBSDoubleTextField property value.
- Returns:
- COM.BSNumberTextFields.BSDoubleTextField
handleException
private void handleException(Throwable exception)
- Called whenever the part throws an exception.
- Parameters:
- exception - java.lang.Throwable
init
public void init()
- Handle the Applet init method.
- Overrides:
- init in class Applet
initConnections
private void initConnections()
- Initializes connections
main
public static void main(String args[])
- main entrypoint - starts the part when it is run as an application
- Parameters:
- args - java.lang.String[]
start
public void start()
- Method to handle events for the Applet interface.
- Overrides:
- start in class Applet
All Packages Class Hierarchy This Package Previous Next Index