List of usage examples for com.google.gwt.dom.client Style setTextAlign
public void setTextAlign(TextAlign value)
From source file:org.rstudio.studio.client.workbench.views.connections.ui.ConnectionExplorer.java
License:Open Source License
public ConnectionExplorer() { RStudioGinjector.INSTANCE.injectMembers(this); // code/connection panel int codePanelHeight = 80; disconnectedUI_ = new VerticalPanel(); disconnectedUI_.setWidth("100%"); disconnectedUI_.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP); codePanel_ = new ConnectionCodePanel(false); codePanel_.addStyleName(ThemeStyles.INSTANCE.secondaryToolbarPanel()); codePanel_.getElement().getStyle().setPadding(8, Unit.PX); codePanel_.setHeight((codePanelHeight - 5) + "px"); codePanel_.setWidth("100%"); disconnectedUI_.add(codePanel_);/*from ww w . j a va 2s . c o m*/ Label label = new Label("(Not connected)"); Style labelStyle = label.getElement().getStyle(); labelStyle.setColor("#888"); labelStyle.setMarginTop(25, Unit.PX); labelStyle.setTextAlign(TextAlign.CENTER); disconnectedUI_.add(label); disconnectedUI_.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); // object browser panel objectBrowser_ = new ObjectBrowser(); // container panel to enable switching between connected/disconnected ProgressSpinner spin = new ProgressSpinner(ProgressSpinner.COLOR_BLACK); spin.getElement().getStyle().setWidth(32, Unit.PX); spin.getElement().getStyle().setHeight(32, Unit.PX); containerPanel_ = new SimplePanelWithProgress(spin, 50); setConnected(false); initWidget(containerPanel_); eventBus_.addHandler(ConsoleBusyEvent.TYPE, new ConsoleBusyEvent.Handler() { @Override public void onConsoleBusy(ConsoleBusyEvent event) { // clear progress on console becoming unblocked if (!event.isBusy() && containerPanel_.isProgressShowing()) { showActivePanel(); updateObjectBrowser(); } } }); }