Package com.smartgwt.client.widgets

Examples of com.smartgwt.client.widgets.HTMLFlow


    /**
     * generate a pane with the authors of this application
     * @return
     */
    private HTMLFlow aboutContent(){
        HTMLFlow htmlFlow = new HTMLFlow();
        htmlFlow.setWidth(230);
        htmlFlow.setStyleName("exampleTextBlock");
        String contents = "<hr/><h1 align=\"center\">"+constants.authors()+":  </h1><br/> <p align=\"center\"> " +
                "<b>Eduardo Rodrigo Contreras</b><br/><b>David Marchante Redondo</b><br/> <b>David Rosillo de Pablos</b><br/><b>José Francisco Vélez Serrano</b>  </p><hr/>";
        htmlFlow.setContents(contents);
        return htmlFlow;
    }
View Full Code Here


        button.setIcon("ok.png");
        return button;
    }

    public final HTMLFlow errorMessage(String error, int type){
        HTMLFlow htmlFlow = new HTMLFlow();
        final int widthFlow = 230;
        htmlFlow.setWidth(widthFlow);
        htmlFlow.setStyleName("exampleTextBlock");
        String contents = "<p><font size=\"2\" face=\"arial\" color=";
        if (type == INFO) {
            contents = contents + "\"green\"";
        else {
             contents = contents + "\"red\"";
        }
        contents = contents +"> " + error + "</font></p>";
        htmlFlow.setContents(contents);
        htmlFlow.setVisible(false);
        final int marginFlow = 3;
        htmlFlow.setMargin(marginFlow);
        return htmlFlow;
    }
View Full Code Here

    public Canvas getViewPanel() {

        Canvas canvas = new Canvas();

        final HTMLFlow htmlFlow = new HTMLFlow();
        htmlFlow.setHeight(45);
        htmlFlow.setWidth(75);
        htmlFlow.setTop(50);
        htmlFlow.setOverflow(Overflow.HIDDEN);
        htmlFlow.setStyleName("exampleTextBlock");
        htmlFlow.setShowEdges(true);

        String contents = "<span class='exampleDropTitle'>Ajax&nbsp;&nbsp;</span> <b>A</b>synchronous <b>J</b>avaScript " +
                "<b>A</b>nd <b>X</b>ML (AJAX) is a Web development technique for creating interactive <b>web applications</b>. " +
                "The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind" +
                " the scenes, so that the entire Web page does not have to be reloaded each time the user makes a change. " +
                "This is meant to increase the Web page's <b>interactivity</b>, <b>speed</b>, and <b>usability</b>. " +
                "(Source: <a href='http://www.wikipedia.org' title='Wikipedia' target='_blank'>Wikipedia</a>)";
        htmlFlow.setContents(contents);

        IButton expandButton = new IButton("Expand");
        expandButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                htmlFlow.resizeBy(235, 150);
            }
        });

        IButton collapseButton = new IButton("Collapse");
        collapseButton.setLeft(120);
        collapseButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                htmlFlow.resizeTo(75, 45);
            }
        });

        canvas.addChild(expandButton);
        canvas.addChild(collapseButton);
View Full Code Here

        button.setIcon("ok.png");
        return button;
    }

    public final HTMLFlow errorMessage(String error, int type){
        HTMLFlow htmlFlow = new HTMLFlow();
        final int widthFlow = 230;
        htmlFlow.setWidth(widthFlow);
        htmlFlow.setStyleName("exampleTextBlock");
        String contents = "<p><font size=\"2\" face=\"arial\" color=";
        if (type == INFO) {
            contents = contents + "\"green\"";
        else {
             contents = contents + "\"red\"";
        }
        contents = contents +"> " + error + "</font></p>";
        htmlFlow.setContents(contents);
        htmlFlow.setVisible(false);
        final int marginFlow = 3;
        htmlFlow.setMargin(marginFlow);
        return htmlFlow;
    }
View Full Code Here

    /**
     * generate a pane with the authors of this application
     * @return
     */
    private HTMLFlow aboutContent(){
        HTMLFlow htmlFlow = new HTMLFlow();
        htmlFlow.setWidth(230);
        htmlFlow.setStyleName("exampleTextBlock");
        String contents = "<hr/><h1 align=\"center\">"+constants.authors()+":  </h1><br/> <p align=\"center\"> " +
                "<b>Eduardo Rodrigo Contreras</b><br/><b>David Marchante Redondo</b><br/> <b>David Rosillo de Pablos</b><br/><b>José Francisco Vélez Serrano</b>  </p><hr/>";
        htmlFlow.setContents(contents);
        return htmlFlow;
    }
View Full Code Here

        ListGridField statusField = new ListGridField("status");
        listGrid.setFields(commonNameField2, lifeSpanField, statusField);

        VLayout vLayout = new VLayout(20);
        vLayout.setMargin(10);
        vLayout.addMember(new HTMLFlow(DESCRIPTION));

        HLayout hLayout = new HLayout(10);
        hLayout.addMember(listGrid);
        hLayout.addMember(tileGrid);
View Full Code Here

        }
    }         

    public Canvas getViewPanel() {
       
        final HTMLFlow textBox = new HTMLFlow(EXAMPLE_TEXT);
        textBox.setLeft(100);
        textBox.setWidth(300);
        textBox.setStyleName("exampleStyleOnline");
       
        LinkedHashMap<String, String> styleMap = new LinkedHashMap<String, String>();
        styleMap.put("exampleStyleOnline", "Online");
        styleMap.put("exampleStyleLegal", "Legal");
        styleMap.put("exampleStyleCode", "Code");
        styleMap.put("exampleStyleInformal", "Informal");
       
        RadioGroupItem style = new RadioGroupItem();
        style.setDefaultValue("exampleStyleOnline");
        style.setShowTitle(false);
        style.setValueMap(styleMap);
        style.addChangedHandler(new ChangedHandler() {
            public void onChanged(ChangedEvent event) {
                textBox.setStyleName((String)event.getValue());
                textBox.markForRedraw();
            }
        });
       
        DynamicForm controls = new DynamicForm();
        controls.setFields(style);
View Full Code Here

        final String webapp = "<hr><span class='exampleDropTitle'>Web App&nbsp;&nbsp;</span> " +
                "In software engineering, a <b>web application</b> is an application that is " +
                "<b>accessed with a web browser</b> over a network such as the Internet or an intranet.<hr>";


        final HTMLFlow htmlFlow = new HTMLFlow();
        htmlFlow.setTop(40);
        htmlFlow.setWidth(280);
        htmlFlow.setStyleName("exampleTextBlock");
        htmlFlow.setContents(ajax);

        HLayout hLayout = new HLayout();
        hLayout.setMembersMargin(5);

        IButton ajaxButton = new IButton("Ajax");
        ajaxButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                htmlFlow.setContents(ajax);
            }
        });
        hLayout.addMember(ajaxButton);

        IButton riaButton = new IButton("RIA");
        riaButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                htmlFlow.setContents(ria);
            }
        });
        hLayout.addMember(riaButton);

        IButton webAppButton = new IButton("Web App");
        webAppButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                htmlFlow.setContents(webapp);
            }
        });
        hLayout.addMember(webAppButton);

        layout.addMember(hLayout);
View Full Code Here

            return DESCRIPTION;
        }
    }

    public Canvas getViewPanel() {
        HTMLFlow htmlFlow = new HTMLFlow();
        htmlFlow.setOverflow(Overflow.AUTO);
        htmlFlow.setPadding(10);

        String contents = "<b>Severity 1</b> - Critical problem<br>System is unavailable in production or " +
                "is corrupting data, and the error severely impacts the user's operations." +
                "<br><br><b>Severity 2</b> - Major problem<br>An important function of the system " +
                "is not available in production, and the user's operations are restricted." +
                "<br><br><b>Severity 3</b> - Minor problem<br>Inability to use a function of the " +
                "system occurs, but it does not seriously affect the user's operations.";

        htmlFlow.setContents(contents);

        final SectionStack sectionStack = new SectionStack();
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setCanReorderSections(true);
        sectionStack.setCanResizeSections(false);
View Full Code Here

  public Canvas getViewPanel() {

        VLayout layout = new VLayout();
    layout.setMembersMargin(10);

    final HTMLFlow flow = new HTMLFlow();     
    flow.setID("messageBox");
    flow.setContents("<span class='exampleDropTitle'>Ajax&nbsp;&nbsp;</span> <b>A</b>synchronous <b>J</b>avaScript <b>A</b>nd <b>X</b>ML (AJAX) is a Web development technique for creating interactive <b>web applications</b>. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire Web page does not have to be reloaded each time the user makes a change. This is meant to increase the Web page's <b>interactivity</b>, <b>speed</b>, and <b>usability</b>. (Source: <a href='http://www.wikipedia.org' title='Wikipedia' target='_blank'>Wikipedia</a>)");
    flow.setStyleName("exampleTextBlock");
    flow.setOverflow(Overflow.HIDDEN);
    flow.setShowEdges(true);
    flow.setPadding(5);
    flow.setWidth(75);
    flow.setHeight(45);
    flow.setTop(50);
    flow.setAnimateTime(800); //in milliseconds

    final IButton expandButton = new IButton();
    expandButton.setTitle("Expand");
    expandButton.setLeft(40);
   
    final IButton collapseButton = new IButton();
    collapseButton.setTitle("Collapse");
    collapseButton.setDisabled(true);
   
    expandButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        expandButton.setDisabled(true);
        flow.animateResize(310,45, new AnimationCallback() {
          public void execute(boolean earlyFinish) {
            flow.animateResize(310,195);           
          }
         
        });
       
        collapseButton.setDisabled(false);
      }
    });

    collapseButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        collapseButton.setDisabled(true);
        flow.animateResize(310,45, new AnimationCallback() {
          public void execute(boolean earlyFinish) {
            flow.animateResize(75,45);           
          }         
        });       
        expandButton.setDisabled(false);
      }
    });
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.HTMLFlow

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.