Exemplo n.º 1
0
  public WindowBuilder withTestSelectPanel() {

    final ITeeterLayout layout = new DefaultTeeterLayout();
    final JPanel swingPanel = new JPanel(layout.getLayout());
    final JScrollPane scrollPane = new JScrollPane(swingPanel);
    final ITeeterPanel panel = new TestSelectionPanel(swingPanel, scrollPane, layout);
    panel.constructView();
    ((BasicWindow) this.getBasicWindow()).setTestSelectPanel(panel);
    return this;
  }
Exemplo n.º 2
0
  public void test1() {

    final ITeeterButton buttonEnter = new TeeterButton(null, null);
    final ITeeterButton buttonClear = new TeeterButton(null, null);
    final ITeeterButton buttonExit = new TeeterButton(null, null);
    final ITeeterPanel panel = new TeeterPanel();
    panel.addButton(buttonEnter);
    panel.addButton(buttonClear);
    panel.addButton(buttonExit);

    final ITeeterWindow window =
        (new BasicWindow.Builder())
            .withButtons(panel, buttonEnter, buttonClear, buttonExit)
            .build();
  }
Exemplo n.º 3
0
  /**
   * Method withMainPanel.
   *
   * @return PinoWindowBuilder
   */
  public WindowBuilder withMainPanel() {

    this.withTestSelectPanel();
    this.withOutputTextArea();
    this.withInputCommandArea();
    this.withButtonPanel();

    /////////////////////////////////////////
    // Create a new panel
    // with the default layout
    /////////////////////////////////////////
    final ITeeterLayout layout = new DefaultTeeterLayout();
    layout.defaultSettings();

    final JPanel swingPanel = new JPanelResize(layout.getLayout());
    final ITeeterPanel panel =
        new AnalyPanel((IBasicWindow) this.getBasicWindow(), swingPanel, layout);
    panel.constructView();

    ((BasicWindow) this.getBasicWindow()).setWindowPanel(panel);
    return this;
  }
Exemplo n.º 4
0
  /**
   * Method withButtonPanel.
   *
   * @return PinoWindowBuilder
   */
  public WindowBuilder withButtonPanel() {

    final ITeeterButton enterButton = this.createEnterButton();
    final ITeeterButton clearButton = this.createClearButton();
    final ITeeterButton exitButton = this.createExitButton();

    final ITeeterLayout layout = new DefaultTeeterLayout();
    layout.defaultSettings();

    final JPanel swingPanel = new JPanel(layout.getLayout());
    final ITeeterPanel panel =
        new CommandButtonPanel(swingPanel, layout, enterButton, clearButton, exitButton);
    panel.constructView();

    // Set the components on the window //
    ((BasicWindow) this.getBasicWindow()).setButtonEnter(enterButton);
    ((BasicWindow) this.getBasicWindow()).setButtonClear(clearButton);
    ((BasicWindow) this.getBasicWindow()).setButtonExit(exitButton);
    ((BasicWindow) this.getBasicWindow()).setButtonPanel(panel);

    return this;
  }