Example usage for com.google.gwt.language.client.translation Translation createBrandingWidget

List of usage examples for com.google.gwt.language.client.translation Translation createBrandingWidget

Introduction

In this page you can find the example usage for com.google.gwt.language.client.translation Translation createBrandingWidget.

Prototype

public static Widget createBrandingWidget(BrandingOptions options) 

Source Link

Document

Creates a widget with Google branding.

Usage

From source file:com.google.gwt.language.sample.hellolanguage.client.LanguageDetectionDemo.java

License:Apache License

public LanguageDetectionDemo() {
    inputTextArea.setStyleName(Styles.DEMO_TEXTAREA_STYLE);
    outputDiv.setStyleName(Styles.LANG_DET_OUTPUT_DIV_STYLE);

    VerticalPanel demoPanel = createDemoPanel();

    VerticalPanel wrapperPanel = new VerticalPanel();
    wrapperPanel.setWidth("100%");
    wrapperPanel.add(demoPanel);//www.  ja  va2s. c  o  m
    wrapperPanel.setCellHorizontalAlignment(demoPanel, HasHorizontalAlignment.ALIGN_CENTER);

    Widget branding = Translation
            .createBrandingWidget(BrandingOptions.newInstance(BrandingOptions.Type.VERTICAL));
    wrapperPanel.add(branding);
    wrapperPanel.setCellHorizontalAlignment(branding, HasHorizontalAlignment.ALIGN_RIGHT);

    initWidget(wrapperPanel);
}

From source file:com.google.gwt.language.sample.hellolanguage.client.TranslationDemo.java

License:Apache License

public TranslationDemo() {
    inputTextArea.setStyleName(Styles.DEMO_TEXTAREA_STYLE);
    outputDiv.setStyleName(Styles.TRANS_OUTPUT_DIV_STYLE);

    VerticalPanel wrapperPanel = new VerticalPanel();
    wrapperPanel.setWidth("100%");

    VerticalPanel demoPanel = getDemoPanel();
    wrapperPanel.add(demoPanel);/* www. j  a  v  a2  s  .com*/
    wrapperPanel.setCellHorizontalAlignment(demoPanel, HasHorizontalAlignment.ALIGN_CENTER);

    Widget branding = Translation
            .createBrandingWidget(BrandingOptions.newInstance(BrandingOptions.Type.VERTICAL));
    wrapperPanel.add(branding);
    wrapperPanel.setCellHorizontalAlignment(branding, HasHorizontalAlignment.ALIGN_RIGHT);

    initWidget(wrapperPanel);
}