示例#1
0
  @Override
  public void start(Stage primaryStage) {
    this.primaryStage = primaryStage;
    BrowseSelectUIControl.INSTANCE.setPrimaryStage(primaryStage, getReturnMessageCallback());

    // used for Back button
    ViewOrdersUIControl.INSTANCE.setPrimaryStage(primaryStage, getReturnMessageCallback());

    // used for Back button
    ManageProductsUIControl.INSTANCE.setPrimaryStage(primaryStage, getReturnMessageCallback());
    primaryStage.setTitle("E-Bazaar Welcome Page");
    VBox topContainer = new VBox();
    // create components
    HBox embeddedText = createLabelBox();
    HBox messageBarBox = createMessageBarBox();
    MenuBar menuBar = createMenuBar();
    // add components to container
    topContainer.getChildren().add(menuBar);
    topContainer.getChildren().add(embeddedText);
    topContainer.getChildren().add(messageBarBox);

    // place into scene and into stage
    primaryStage.setScene(new Scene(topContainer, 500, 200));
    primaryStage.show();
  }
示例#2
0
 private MenuItem onlinePurchase() {
   messageBar.setText("");
   MenuItem retval = new MenuItem("Online Purchase");
   retval.setOnAction(BrowseSelectUIControl.INSTANCE.getOnlinePurchaseHandler());
   return retval;
 }
示例#3
0
 private MenuItem retrieveCart() {
   messageBar.setText("");
   MenuItem retval = new MenuItem("Retrieve Saved Cart");
   retval.setOnAction(BrowseSelectUIControl.INSTANCE.getRetrieveSavedCartHandler());
   return retval;
 }