Ejemplo n.º 1
0
 /** Build the maximizeButton */
 protected void buildMaximizeButton() {
   maximizeButton = new Button();
   titleBar.addWidget(maximizeButton);
   maximizeButton.addButtonPressedListener(
       new IButtonPressedListener() {
         public void buttonPressed(ButtonPressedEvent e) {
           throw new UnsupportedOperationException("Maximize Window: Not implemented yet");
         }
       });
 }
Ejemplo n.º 2
0
 /** Build the closeButton */
 protected void buildCloseButton() {
   closeButton = new Button();
   titleBar.addWidget(closeButton);
   closeButton.setText("X");
   closeButton.addButtonPressedListener(
       new IButtonPressedListener() {
         public void buttonPressed(ButtonPressedEvent e) {
           fireWindowClosedEvent();
           // close();
         }
       });
   closeButton.setTraversable(false);
 }
Ejemplo n.º 3
0
  /**
   * Constructs the title bar.
   *
   * @param closeBtn flag indicating the existence of a close button
   * @param maximizeBtn flag indicating the existence of a maximize button
   * @param minimizeBtn flag indicating the existence of a minimize button
   */
  protected void buildTitleBar(boolean closeBtn, boolean maximizeBtn, boolean minimizeBtn) {
    titleBar.setLayoutManager(new RowLayout(true));

    title = new Label();
    titleBar.addWidget(title);
    title.setText("Frame");

    if (minimizeBtn) {
      buildMinimizeButton();
    }

    if (maximizeBtn) {
      buildMaximizeButton();
    }

    if (closeBtn) {
      buildCloseButton();
    }
  }