예제 #1
0
파일: Window.java 프로젝트: jeffedlund/JF3d
 /** 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");
         }
       });
 }
예제 #2
0
파일: Window.java 프로젝트: jeffedlund/JF3d
 /** 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);
 }
예제 #3
0
파일: Window.java 프로젝트: jeffedlund/JF3d
  /**
   * 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();
    }
  }