use of com.google.gwt.dom.client.Style in project opennms by OpenNMS.
the class NodeMapWidget method addSearchControl.
private void addSearchControl() {
LOG.info("NodeMapWidget.addSearchControl()");
m_searchControl = new SearchControl(m_markerContainer, this, m_eventManager, m_componentTracker);
final String id = m_searchControl.getElement().getId();
if (id == null || "".equals(id)) {
m_searchControl.getElement().setId("search-control");
} else {
LOG.info("NodeMapWidget.addSearchControl(): id = " + id);
}
final HTMLPanel mapParent = HTMLPanel.wrap(m_mapPanel.getParent().getElement());
final Style searchStyle = m_searchControl.getElement().getStyle();
searchStyle.setPosition(Position.ABSOLUTE);
searchStyle.setTop(5, Unit.PX);
searchStyle.setLeft(5, Unit.PX);
searchStyle.setZIndex(1000);
mapParent.add(m_searchControl);
}
use of com.google.gwt.dom.client.Style in project rstudio by rstudio.
the class FadeOutAnimation method onComplete.
@Override
protected void onComplete() {
for (Widget w : widgets_) {
Style style = w.getElement().getStyle();
style.setDisplay(Style.Display.NONE);
style.setOpacity(1.0);
}
if (callback_ != null)
callback_.execute();
}
use of com.google.gwt.dom.client.Style in project rstudio by rstudio.
the class PreferencesDialogPaneBase method checkBoxWithHelp.
protected HorizontalPanel checkBoxWithHelp(CheckBox checkBox, String topic) {
HorizontalPanel panel = new HorizontalPanel();
panel.add(checkBox);
HelpButton helpButton = new HelpButton(topic, false);
Style helpStyle = helpButton.getElement().getStyle();
helpStyle.setMarginTop(1, Unit.PX);
helpStyle.setMarginLeft(6, Unit.PX);
panel.add(helpButton);
return panel;
}
use of com.google.gwt.dom.client.Style in project rstudio by rstudio.
the class ShinyGadgetDialog method addCaptionWithCloseButton.
private void addCaptionWithCloseButton(String caption) {
final Image closeIcon = new Image(new ImageResource2x(ThemeResources.INSTANCE.closeDialog2x()));
Style closeIconStyle = closeIcon.getElement().getStyle();
closeIconStyle.setCursor(Style.Cursor.POINTER);
closeIconStyle.setMarginTop(2, Unit.PX);
FlexTable captionLayoutTable = new FlexTable();
captionLayoutTable.setWidth("100%");
captionLayoutTable.setText(0, 0, caption);
captionLayoutTable.setWidget(0, 1, closeIcon);
captionLayoutTable.getCellFormatter().setHorizontalAlignment(0, 1, HasHorizontalAlignment.HorizontalAlignmentConstant.endOf(Direction.LTR));
HTML captionWidget = (HTML) getCaption();
captionWidget.getElement().appendChild(captionLayoutTable.getElement());
captionWidget.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
EventTarget target = event.getNativeEvent().getEventTarget();
Element targetElement = (Element) target.cast();
if (targetElement == closeIcon.getElement()) {
closeIcon.fireEvent(event);
}
}
});
closeIcon.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
performClose();
}
});
}
use of com.google.gwt.dom.client.Style in project rstudio by rstudio.
the class ShinyApplicationPanel method initToolbar.
@Override
protected void initToolbar(Toolbar toolbar, Commands commands) {
urlBox_ = new Label("");
Style style = urlBox_.getElement().getStyle();
style.setColor("#606060");
urlBox_.addStyleName(ThemeStyles.INSTANCE.selectableText());
urlBox_.getElement().getStyle().setMarginRight(7, Unit.PX);
toolbar.addLeftWidget(urlBox_);
toolbar.addLeftSeparator();
ToolbarButton popoutButton = commands.viewerPopout().createToolbarButton();
popoutButton.setText("Open in Browser");
toolbar.addLeftWidget(popoutButton);
toolbar.addLeftSeparator();
ToolbarButton refreshButton = commands.reloadShinyApp().createToolbarButton();
refreshButton.setLeftImage(commands.viewerRefresh().getImageResource());
refreshButton.getElement().getStyle().setMarginTop(1, Unit.PX);
toolbar.addLeftWidget(refreshButton);
publishButton_ = new RSConnectPublishButton(RSConnect.CONTENT_TYPE_NONE, true, null);
toolbar.addRightWidget(publishButton_);
}
Aggregations