Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.DockPanel$DockLayoutConstant


   *            The text this header should show as a title.
   */
  public HeaderPane(String titleText, ClientState clientState,
      ServiceRegistry serviceRegistry) {
    super(clientState, serviceRegistry);
    main = new DockPanel();
    main.add(new Label("Brodkin's GWT Sample App"), DockPanel.CENTER);
    reset();
    initWidget(main);
    setStyleName("HeaderPane");
  }
View Full Code Here


  public void onModuleLoad() {

    //Create a new JsonRpc instance
    jsonRpc = new JsonRpc();
   
    mainPanel = new DockPanel();
    mainPanel.addStyleName("calc");

    // display
    display = new Label("0");
    display.addStyleName("display");
View Full Code Here

  private TextBox _textBox;
  private TextArea _textArea;
 
  public MessageBox() {
    super(false, true);
    _dockPanel = new DockPanel();
    _buttonPanel = new HorizontalPanel();
    _buttonPanel.setSpacing(5);
    _dockPanel.add(_buttonPanel, DockPanel.SOUTH);
    _dockPanel.setCellHorizontalAlignment(_buttonPanel,  HasHorizontalAlignment.ALIGN_CENTER);
    setWidget(_dockPanel);
View Full Code Here

  private final Label closeIconElement;
  private final DockPanel outerElement;
  private final Label textElement;

  private WarningPane(Resources resources) {
    this.outerElement = new DockPanel();
    this.textElement = new Label();
    this.closeIconElement = new Label();

    createUi(resources);
    RootPanel.get().add(outerElement);
View Full Code Here

  private void createUi(Resources resources) {
    Css css = resources.warningPaneCss();
    outerElement.addStyleName(css.warningPaneOuter());
    outerElement.setVisible(false);

    DockPanel innerElement = new DockPanel();
    innerElement.addStyleName(css.warningPaneInner());
    outerElement.add(innerElement, DockPanel.NORTH);

    textElement.addStyleName(css.warningPaneText());
    innerElement.add(textElement, DockPanel.CENTER);

    // Create the close icon
    closeIconElement.setStyleName(css.warningCloseIcon());
    closeIconElement.setText("x");
    closeIconElement.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        hide();
      }
    });
    innerElement.add(closeIconElement, DockPanel.EAST);
  }
View Full Code Here

    panel_1.setSize("5cm", "3cm");

    SimplePanel simplePanel_1 = new SimplePanel();
    rootPanel.add(simplePanel_1);

    DockPanel dockPanel = new DockPanel();
    rootPanel.add(dockPanel);
    dockPanel.setSize("533px", "307px");

    final DataGrid<Employee> dataGrid = new DataGrid<Employee>();
    dockPanel.add(dataGrid, DockPanel.CENTER);
    dataGrid.setWidth("250px");
    dataGrid.setHeight("200px");

    TextColumn<Employee> textColumn = new TextColumn<Employee>() {
      @Override
      public String getValue(Employee employee) {
        return employee.getFirstname() ;
      }
    };
    dataGrid.addColumn(textColumn, "First name");
    textColumn.getFieldUpdater();
    TextColumn<Employee> textColumn_1 = new TextColumn<Employee>() {
      @Override
      public String getValue(Employee object) {
        return object.getLastName();
      }
    };
    dataGrid.addColumn(textColumn_1, "Last Name");
    textColumn_1.getFieldUpdater();
    Button btnAddName = new Button("Add Name");
    btnAddName.addClickHandler(new ClickHandler() {
       public void onClick(ClickEvent event) {
        EMPLOYEES.add(new Employee("JKkabes","Ofbekfast"));   
        dataGrid.setRowCount(EMPLOYEES.size(), true);
        dataGrid.setRowData(0, EMPLOYEES);
       
      }
    });
    dockPanel.add(btnAddName, DockPanel.WEST);
    dataGrid.setRowCount(EMPLOYEES.size(), true);
    dataGrid.setRowData(0, EMPLOYEES);
   
  }
View Full Code Here

    public RepoConfigManager() {    
        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader( GuvnorImages.INSTANCE.Config(),
                        new HTML( constants.ManageRepositoryConfig() ) );
       
        DockPanel dock = new DockPanel();
        dock.setSpacing( 4 );
        dock.setHorizontalAlignment( DockPanel.ALIGN_CENTER );
        HorizontalPanel hPanel1 = new HorizontalPanel();
        hPanel1.add(getDbTypePanel());
        VerticalPanel dataInputPanel = new VerticalPanel();
        dataInputPanel.add(hPanel1);
        SimplePanel divider = new SimplePanel();
        divider.setSize( "100px",
                         "30px" );
        vPanel2.add( divider );
        vPanel2.add( noJndiInfo );
        vPanel2.add( jndiInfo );
        vPanel2.setVisible( false );
        dataInputPanel.add(vPanel2);
        dock.add(dataInputPanel,
                  DockPanel.WEST );

        repoDisplayArea.setSize( "740px",
                                 "470px" );
        repoDisplayArea.setTitle( "repository.xml" );
        repoDisplayArea.setVisible( false );

        DockPanel idock = new DockPanel();
        idock.setSpacing( 4 );
        idock.setHorizontalAlignment( DockPanel.ALIGN_CENTER );
        idock.add( repoDisplayArea,
                   DockPanel.WEST );

        final Button saveButton = new Button( constants.SaveRepo() );
        saveButton.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                String name = rdbmsConf.getDbType() + "-repository";
                if ( rdbmsConf.isJndi() ) name += "-jndi";
                hiddenRepoConfig.setValue( repoDisplayArea.getText() );
                saveRepoConfigForm.submit();
            }
        } );

        saveRepoConfigForm.setEncoding( FormPanel.ENCODING_URLENCODED );
        saveRepoConfigForm.setMethod( FormPanel.METHOD_POST );
        saveRepoConfigForm.setAction( GWT.getModuleBaseURL() + "backup" );

        VerticalPanel formHolder = new VerticalPanel();
        HorizontalPanel saveInfoHolder = new HorizontalPanel();
        saveInfoHolder.add( saveButton );
        saveInfoHolder.add( new InfoPopup( constants.SaveRepo(),
                                           constants.SaveRepoInfo() ) );
        formHolder.add( saveInfoHolder );
        formHolder.add( hiddenRepoConfig );

        saveRepoConfigForm.add( formHolder );
        saveRepoConfigForm.setVisible( false );

        idock.add( saveRepoConfigForm,
                   DockPanel.EAST );

        dock.add( idock,
                  DockPanel.EAST );
View Full Code Here

  @Inject private RootPanel rootPanel;
  @Inject private FooterPanel footer;

  @PostConstruct
  private void init() {
    DockPanel panel = new DockPanel();
    panel.add(navigation.getContentPanel(), DockPanel.CENTER);
    panel.add(footer, DockPanel.SOUTH);
    panel.setWidth("100%");
    rootPanel.add(panel);
  }
View Full Code Here

    public RepoConfigManager() {
        PrettyFormLayout form = new PrettyFormLayout();
        form.addHeader( images.config(),
                        new HTML( constants.ManageRepositoryConfig() ) );

        DockPanel dock = new DockPanel();
        dock.setSpacing( 4 );
        dock.setHorizontalAlignment( DockPanel.ALIGN_CENTER );
        HorizontalPanel hPanel1 = new HorizontalPanel();
        hPanel1.add(getDbTypePanel());
        VerticalPanel dataInputPanel = new VerticalPanel();
        dataInputPanel.add(hPanel1);
        SimplePanel divider = new SimplePanel();
        divider.setSize( "100px",
                         "30px" );
        vPanel2.add( divider );
        vPanel2.add( noJndiInfo );
        vPanel2.add( jndiInfo );
        vPanel2.setVisible( false );
        dataInputPanel.add(vPanel2);
        dock.add(dataInputPanel,
                  DockPanel.WEST );

        repoDisplayArea.setSize( "740px",
                                 "470px" );
        repoDisplayArea.setTitle( "repository.xml" );
        repoDisplayArea.setVisible( false );

        DockPanel idock = new DockPanel();
        idock.setSpacing( 4 );
        idock.setHorizontalAlignment( DockPanel.ALIGN_CENTER );
        idock.add( repoDisplayArea,
                   DockPanel.WEST );

        final Button saveButton = new Button( constants.SaveRepo() );
        saveButton.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                String name = rdbmsConf.getDbType() + "-repository";
                if ( rdbmsConf.isJndi() ) name += "-jndi";
                hiddenRepoConfig.setValue( repoDisplayArea.getText() );
                saveRepoConfigForm.submit();
            }
        } );

        saveRepoConfigForm.setEncoding( FormPanel.ENCODING_URLENCODED );
        saveRepoConfigForm.setMethod( FormPanel.METHOD_POST );
        saveRepoConfigForm.setAction( GWT.getModuleBaseURL() + "backup" );

        VerticalPanel formHolder = new VerticalPanel();
        HorizontalPanel saveInfoHolder = new HorizontalPanel();
        saveInfoHolder.add( saveButton );
        saveInfoHolder.add( new InfoPopup( constants.SaveRepo(),
                                           constants.SaveRepoInfo() ) );
        formHolder.add( saveInfoHolder );
        formHolder.add( hiddenRepoConfig );

        saveRepoConfigForm.add( formHolder );
        saveRepoConfigForm.setVisible( false );

        idock.add( saveRepoConfigForm,
                   DockPanel.EAST );

        dock.add( idock,
                  DockPanel.EAST );
View Full Code Here

    setTotalRowsCleared(0);
    nextPiece = new Piece();
  }
 
  public void initialize() {   
    DockPanel panel = new DockPanel();
    parentContainer.add(panel);
    panel.add(surface, DockPanel.LINE_START);
    final Button resetButton = new Button("Reset", new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        currPiece = null;
        nextPiece = new Piece();
        matrix = new TetrisMatrix(DEFAULT_NUM_ROWS, DEFAULT_NUM_COLS);
        setLevel(getLevelFromRowsCleared());
        setTotalRowsCleared(0);
        surface.setFocus(true);
      }
    });
    Button previousLevelButton = new Button("Previous level", new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        levelOffset = Math.max(1, levelOffset - 1);
        resetButton.click();
      }
    });
    Button nextLevelButton = new Button("Next level", new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        levelOffset++;
        resetButton.click();
      }
    });
   
    Panel nextPiecePanel = createPanel(
        createPanel(createHeaderLabel("Next Piece"), nextPieceSurface),
        createPanel(createHeaderLabel("Lines Cleared"), rowsClearedLabel),
        createPanel(createHeaderLabel("Level"), levelLabel),
        createPanel(resetButton),
        createPanel(previousLevelButton),
        createPanel(nextLevelButton));
    nextPiecePanel.setStyleName("sidePanel");
    nextPiecePanel.setHeight(surface.getHeight() + "px");
    panel.add(nextPiecePanel, DockPanel.LINE_END);
   
    nextPieceSurface.fillBackground(KnownColor.BLACK);
   
    surface.setFocus(true);
    surface.fillBackground(KnownColor.BLACK);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.DockPanel$DockLayoutConstant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.