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

Examples of com.google.gwt.user.client.ui.HorizontalPanel


        // Setup the top panel with the title and links
        createTopPanel();
        layout.add(topPanel);

        // Add the main menu
        mainPanel = new HorizontalPanel();
        mainPanel.setSize("100%","100%");

        mainPanel.setSpacing(0);
        mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
        layout.add(mainPanel);
View Full Code Here


        topPanel.setCellSpacing(0);
        topPanel.setStyleName(DEFAULT_STYLE_NAME + "-top");
        FlexCellFormatter formatter = topPanel.getFlexCellFormatter();

        // Setup the links cell
        linksPanel = new HorizontalPanel();
        topPanel.setWidget(0, 0, linksPanel);
        formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-links");
        if (isRTL) {
            formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
        } else {
View Full Code Here

      // Get the title from the internationalized constants
        String pageTitle = "<h1>" + constants.mainTitle() + "</h1><h2>"
            + constants.mainSubTitle() + "</h2>";

        // Add the title and some images to the title bar
        HorizontalPanel titlePanel = new HorizontalPanel();
        titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
        titlePanel.add(images.explorerLogo().createImage());
        titlePanel.add(new HTML(pageTitle));
        explorerPage.setTitleWidget(titlePanel);
    }
View Full Code Here

    /**
     * This method is called when GWT loads the Notes application (as defined in the Notes.gwt.xml).
     */
    public void onModuleLoad() {

        final HorizontalPanel mainpanel = new HorizontalPanel();

        final HTML displayTitle = new HTML("Existing Notes");
        displayTitle.setStyleName("displayTitle");
        final HTML entryTitle = new HTML("Create A Note");
        entryTitle.setStyleName("entryTitle");

        final VerticalPanel displayPanel = new VerticalPanel();
        displayPanel.setVerticalAlignment(VerticalPanel.ALIGN_TOP);
        displayPanel.setStyleName("displayPanel");
        displayPanel.add(displayTitle);

        final VerticalPanel entryPanel = new VerticalPanel();
        entryPanel.setVerticalAlignment(VerticalPanel.ALIGN_TOP);
        entryPanel.setStyleName("entryPanel");
        entryPanel.add(entryTitle);

        displayPanel.add(notesPanel);

        final VerticalPanel form = createForm();
        entryPanel.add(form);

        mainpanel.add(displayPanel);
        mainpanel.add(entryPanel);

        RootPanel.get("notes").add(mainpanel);

        getNotes();
    }
View Full Code Here

    private VerticalPanel createForm() {

        final VerticalPanel form = new VerticalPanel();
        form.setStyleName("formPanel");

        final HorizontalPanel titleLine = new HorizontalPanel();
        final HTML textNoteTitle = new HTML("Title: ");
        textNoteTitle.setWidth("50px");
        titleLine.add(textNoteTitle);
        titleLine.add(inputNoteTitle);

        final HorizontalPanel textLine = new HorizontalPanel();
        final HTML textNoteText = new HTML("Note: ");
        textNoteText.setWidth("50px");
        textLine.add(textNoteText);
        textLine.add(inputNoteText);

        form.add(titleLine);
        form.add(textLine);
        form.add(createButtons());
View Full Code Here

        return form;
    }

    private Panel createButtons() {

        final HorizontalPanel panel = new HorizontalPanel();

        Button save = new Button("Save");
        save.setStyleName("button");
        save.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                if (validateFormInput()) {
                    createNote(inputNoteTitle.getText(), inputNoteText.getText());
                    resetForm();
                }

            }
        });
        Button clear = new Button("Clear");
        save.setStyleName("button");
        clear.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                resetForm();
            }
        });

        panel.add(save);
        panel.add(clear);

        return panel;
    }
View Full Code Here

            public void onSuccess(ArrayList<Note> notesList) {
                for (int i = 0; i < notesList.size(); i++) {
                    final Note note = (Note) notesList.get(i);

                    final HorizontalPanel noteEntry = new HorizontalPanel();
                    noteEntry.setStyleName("noteEntry");

                    final HTML noteTitle = new HTML(note.getTitle());
                    noteTitle.setStyleName("noteTitle");

                    final HTML noteText = new HTML(note.getText());
                    noteText.setStyleName("noteText");

                    final Button delButton = new Button("Delete");
                    delButton.setStyleName("noteControls");
                    delButton.addClickHandler(new ClickHandler() {

                        public void onClick(ClickEvent event) {
                            deleteNote(note.getPath());
                        }
                    });
                    noteEntry.add(noteTitle);
                    noteEntry.add(noteText);
                    noteEntry.add(delButton);

                    notesPanel.add(noteEntry);
                }

                if (notesList.size() == 0) {
View Full Code Here

        }

        mainPanel.setStylePrimaryName("ProConPanel");
        mainPanel.addStyleDependentName(string);

        HorizontalPanel addP = new HorizontalPanel();
        addTextBox = new TextBox();
        Button addB = new Button("Add");
        addB.addClickListener(this);
        addP.add(addTextBox);
        addP.add(addB);
        mainPanel.add(addP);

        initWidget(mainPanel);

    }
View Full Code Here

            SchoolLink link = new SchoolLink(aas.getApplication()
                    .getSchool());

            Label pctL = new Label(pctFormat.format(pct));

            HorizontalPanel hP = new HorizontalPanel();
            hP.setStyleName("TC-DecisionRanked");
            if (i % 2 == 0) {
                hP.addStyleName("TC-DecisionRanked-Even");
            }

            Label rankL = new Label(i + "");
            rankL.addStyleName("TC-DecisionRanked-Rank");
            pctL.addStyleName("TC-DecisionRanked-Pct");

            hP.add(rankL);
            hP.add(link);
            hP.add(pctL);

            rankPanel.add(hP);
            i++;
        }
    }
View Full Code Here

   */
  public PagingOptions(PagingScrollTable<?> table, PagingOptionsImages images) {
    this.table = table;

    // Create the main widget
    HorizontalPanel hPanel = new HorizontalPanel();
    initWidget(hPanel);
    hPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    setStyleName(DEFAULT_STYLENAME);

    // Create the paging image buttons
    createPageButtons(images);

    // Create the current page box
    createCurPageBox();

    // Create the page count label
    numPagesLabel = new HTML();

    // Create the loading image
    loadingImage = new Image("scrollTableLoading.gif");
    loadingImage.setVisible(false);

    // Create the error label
    errorLabel = new HTML();
    errorLabel.setStylePrimaryName("errorMessage");

    // Add the widgets to the panel
    hPanel.add(createSpacer());
    hPanel.add(firstImage);
    hPanel.add(createSpacer());
    hPanel.add(prevImage);
    hPanel.add(createSpacer());
    hPanel.add(curPageBox);
    hPanel.add(createSpacer());
    hPanel.add(numPagesLabel);
    hPanel.add(createSpacer());
    hPanel.add(nextImage);
    hPanel.add(createSpacer());
    hPanel.add(lastImage);
    hPanel.add(createSpacer());
    hPanel.add(loadingImage);
    hPanel.add(errorLabel);

    // Add a listener to the table
    RowPagingListener rowPagingListener = new RowPagingListener() {
      public void onNumPagesChanges(int numPages) {
        if (numPages < 0) {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.HorizontalPanel

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.