List of usage examples for com.google.gwt.language.client.translation BrandingOptions newInstance
private static native BrandingOptions newInstance(String type) ;
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);// ww w. j a v a2s. co 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);/*from w w w . ja v a 2s .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); }