| |
|
| java.lang.Object olstore.client.OlstoreSwingClient
OlstoreSwingClient | public class OlstoreSwingClient implements ActionListener(Code) | | A GUI client that allows to use some of the functionality of the OLStore
example by connecting to its web service endpoint.
|
Constructor Summary | |
public | OlstoreSwingClient() The constructor which creates the components and places them into the
appropriate layouts. |
Method Summary | |
public void | actionPerformed(ActionEvent event) | public void | createMenu() Creates a menu bar and adds an 'Exit' menu item. | public void | doCheckout() Prompts the user for a username and password, and sends the login
information and cart contents (item IDs and the corresponding quantities)
to the server via web services. | public static void | main(String[] args) Creates and displays a new olstore client. | public void | setPrice(BigDecimal priceValue) Sets the price label to the given price. | public void | updatePrice(BigDecimal price) Updates the price value and price field by adding the given price to the
current total. |
buttonColor | final public static Color buttonColor(Code) | | The colour of buttons.
|
itemColor1 | final public static Color itemColor1(Code) | | The primary item colour
|
itemColor2 | final public static Color itemColor2(Code) | | The secondary item colour
|
OlstoreSwingClient | public OlstoreSwingClient()(Code) | | The constructor which creates the components and places them into the
appropriate layouts.
|
createMenu | public void createMenu()(Code) | | Creates a menu bar and adds an 'Exit' menu item.
|
doCheckout | public void doCheckout() throws Exception(Code) | | Prompts the user for a username and password, and sends the login
information and cart contents (item IDs and the corresponding quantities)
to the server via web services. If the login information is accepted the
cart contents are added to a server side, user specific, shopping cart
and the order is created and completed. If the login information is
incorrect, then the user is prompted to try again.
throws: Exception - If the call fails. |
main | public static void main(String[] args)(Code) | | Creates and displays a new olstore client.
Parameters: args - The program's arguments. |
setPrice | public void setPrice(BigDecimal priceValue)(Code) | | Sets the price label to the given price.
Parameters: priceValue - The value to set the price label to. |
updatePrice | public void updatePrice(BigDecimal price)(Code) | | Updates the price value and price field by adding the given price to the
current total.
Parameters: price - The amount to add to the current total. |
|
|
|