List of usage examples for com.google.gwt.user.client.ui HTMLPanel HTMLPanel
private HTMLPanel(Element elem)
From source file:com.agnie.gwt.common.client.widget.TabBar.java
License:Open Source License
/** * Creates an empty tab bar./* w ww . ja v a2s . c o m*/ */ public TabBar(String styleClassName) { container = new SimplePanel(); panel = new HTMLPanel(""); initWidget(container); sinkEvents(Event.ONCLICK); mainStyleName = styleClassName; container.addStyleName(mainStyleName); panel.addStyleName(resource.css().tabs()); container.add(panel); }
From source file:com.agnie.gwt.common.client.widget.WizardBar.java
License:Open Source License
/** * Creates an empty Wizard bar./*from w w w . j a v a2s .c o m*/ */ public WizardBar(String styleClassName) { panel = new HTMLPanel(""); initWidget(panel); panel.addStyleName(styleClassName); }
From source file:com.akjava.gwt.subplayer.client.SubPlayer.java
License:Apache License
@Override public void onModuleLoad() { //pre load resource ImageResource icon = Binder.INSTANCE.loadanime(); loadImg = new Image(icon); loadImg.setVisible(false);//from w w w . j a v a 2 s . c o m loadImg.addLoadHandler(new LoadHandler() { @Override public void onLoad(LoadEvent event) { RootPanel.get().remove(loadImg); loadImg.setVisible(true); } }); RootPanel.get().add(loadImg); preference = new SubPlayerPreference(); preference.initialize(); tab = new TabLayoutPanel(2, Unit.EM); tab.setHeight("500px"); VerticalPanel root = new VerticalPanel(); root.setWidth("100%"); root.setHeight("100%"); //root.setHeight("200px"); DockLayoutPanel doc = new DockLayoutPanel(Unit.PX); doc.addSouth(new HTMLPanel( "<div align='center'>Subtitle TTS Player by <a href='http://www.akjava.com'>akjava.com</a></div>"), 40); doc.add(tab); RootLayoutPanel.get().add(doc); //RootLayoutPanel.get().add(new Label("hello")); tab.add(root, "PLAY"); noSubtitle = new Label("Subtitle is empty.load from Load tab"); noSubtitle.setStyleName("nosubtitle"); root.add(noSubtitle); loadPanel = new LoadPanel(); loadPanel.setWidth("100%"); loadPanel.setHeight("100%"); tab.add(loadPanel, "LOAD"); loadPanel.setText(preference.getSrtText()); itemPanel = new VerticalPanel(); itemPanel.setSpacing(8); itemPanelScroll = new ScrollPanel(itemPanel); itemPanelScroll.setWidth("100%"); itemPanelScroll.setHeight("350px"); root.add(itemPanelScroll); /* for(int i=0;i<5;i++){ String text=i+" hello world\n"; for(int j=0;j<i;j++){ text+="line\n"; } HTMLPanel label=new HTMLPanel(text.replace("\n", "<br/>")); FocusPanel panel=new FocusPanel(label); panel.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { unselectAll(); setlectWidget((Widget) event.getSource()); } }); //label.setHeight("100px"); itemPanel.add(panel); }*/ playerWidget = new PlayerWidget(this); root.add(playerWidget); DisclosurePanel ds = new DisclosurePanel("show subtitle time [start] - [end]"); timeLabel = new Label(); ds.add(timeLabel); //ds.add(new Label("0:0:0 - 0:0:12")); root.add(ds); selectWidgetHandler = new ClickHandler() { @Override public void onClick(ClickEvent event) { unselectAll(); setlectWidget((Widget) event.getSource()); } }; DisclosurePanel vs = new DisclosurePanel("Voice Settings"); root.add(vs); voiceSettings = new VoiceSettings(); vs.add(voiceSettings); //load data from preferences //if empty load mode. if (!loadPanel.getText().isEmpty()) { loadSrt(preference.getSrtSelectIndex()); } else { tab.selectTab(1); } }
From source file:com.akjava.gwt.threetest.client.MainWidget.java
License:Apache License
public MainWidget() { initWidget(uiBinder.createAndBindUi(this)); renderer = THREE.WebGLRenderer();/*from www. ja va2s . c o m*/ renderer.setSize(width, height); GWT.log("element:" + renderer.getDomElement()); HTMLPanel div = new HTMLPanel(""); div.getElement().appendChild(renderer.getDomElement()); focusPanel = new FocusPanel(); focusPanel.add(div); getMain().add(focusPanel); for (int i = 0; i < demos.length; i++) { DemoButton demoButton = new DemoButton(demos[i]); side.add(demoButton); if (i == 0) { demoButton.startDemo(); } } }
From source file:com.akjava.gwt.ttstest.client.Chrome_tts_gwtwrap.java
License:Apache License
public void onModuleLoad() { if (!ChromeTts.isAvaialbe()) { HTMLPanel panel = new HTMLPanel( "TTS not supported,access this page as extension.\nload manifest.json from extension setting page"); RootPanel.get().add(panel);//from w w w. j a va2 s . com return; } MainWidget main = new MainWidget(); RootPanel.get().add(main); }
From source file:com.akjava.gwt.ttstest.client.EventLogger.java
License:Apache License
public void add(String line) { add(new HTMLPanel(line)); }
From source file:com.akjava.gwt.ttstest.client.EventLogger.java
License:Apache License
public HTMLPanel createAddLog(TtsEvent event) { String log = "TYPE:" + event.getType(); log += ",index:" + event.getCharIndex(); log += ",error:" + event.getErrorMessage(); return new HTMLPanel(log); }
From source file:com.arcbees.gquery.tooltip.client.TooltipDocumentation.java
License:Apache License
private void setupWidgetTooltip() { HTMLPanel htmlPanel = new HTMLPanel("<b>Hover here to show a widget</b>"); RootPanel.get("widget").add(htmlPanel); ContactDatabase contactDatabase = ContactDatabase.get(); ContactCellList ccl = new ContactCellList(contactDatabase); TooltipOptions options = new TooltipOptions(); options.withContent(ccl);/*from w w w . j a v a 2 s. c om*/ options.withPlacement(TooltipPlacement.LEFT); options.withResources(WidgetTooltipResources.INSTANCE); options.withContainer("element"); $(htmlPanel).as(Tooltip).tooltip(options); }
From source file:com.binomed.cineshowtime.client.ui.dialog.AboutDialog.java
License:Open Source License
public AboutDialog() { setText("CineShowTime " + CineshowtimeDbCst.APP_VERSION); setAnimationEnabled(true);/*from w w w . j av a 2 s. c o m*/ setGlassEnabled(true); setSize(WIDTH, HEIGHT); setAutoHideEnabled(true); ScrollPanel scrollPanel = new ScrollPanel(); scrollPanel.setSize(WIDTH, HEIGHT); String strContent = I18N.instance.msgDevelopped() + " " + "<A HREF='http://blog.binomed.fr'>Binomed</A><br>"// + I18N.instance.msgTraductorName() + "<br>" // + " 2010 - Binomed <br>"// + "GNU General Public License v2<br>"// + "Use of Google Analytics Service"; HTMLPanel content = new HTMLPanel(strContent); scrollPanel.add(content); setWidget(scrollPanel); // setWidget(content); }
From source file:com.codenvy.redhat.plugin.quick.start.ide.panel.DocsViewPartImpl.java
License:Open Source License
private Widget createSafeHtmlWidget(String htmlText) { SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder().appendHtmlConstant(htmlText); return new HTMLPanel(safeHtmlBuilder.toSafeHtml()); }