use of com.google.gwt.resources.client.ImageResource in project rstudio by rstudio.
the class CompileOutputPane method createMainToolbar.
@Override
protected Toolbar createMainToolbar() {
Toolbar toolbar = new Toolbar();
fileLabel_ = new ToolbarFileLabel(toolbar, 200);
ImageResource showLogImage = new ImageResource2x(StandardIcons.INSTANCE.show_log2x());
if (hasLogs_) {
showLogButton_ = new ToolbarButton("View Log", showLogImage, (ClickHandler) null);
showLogButton_.getElement().getStyle().setMarginBottom(3, Unit.PX);
showLogButton_.setTitle(logTitle_);
showLogSeparator_ = toolbar.addLeftSeparator();
setShowLogVisible(false);
toolbar.addLeftWidget(showLogButton_);
}
compilePanel_.connectToolbar(toolbar);
return toolbar;
}
use of com.google.gwt.resources.client.ImageResource in project rstudio by rstudio.
the class CodeBrowserEditingTargetWidget method createToolbar.
private Toolbar createToolbar() {
Toolbar toolbar = new EditingTargetToolbar(commands_, true);
toolbar.addLeftWidget(commands_.printSourceDoc().createToolbarButton());
toolbar.addLeftSeparator();
toolbar.addLeftWidget(findReplace_.createFindReplaceButton());
ImageResource icon = new ImageResource2x(ThemeResources.INSTANCE.codeTransform2x());
ToolbarPopupMenu menu = new ToolbarPopupMenu();
menu.addItem(commands_.goToHelp().createMenuItem(false));
menu.addItem(commands_.goToFunctionDefinition().createMenuItem(false));
ToolbarButton codeTools = new ToolbarButton("", icon, menu);
codeTools.setTitle("Code Tools");
toolbar.addLeftWidget(codeTools);
toolbar.addRightWidget(commands_.executeCode().createToolbarButton());
toolbar.addRightSeparator();
toolbar.addRightWidget(commands_.executeLastCode().createToolbarButton());
return toolbar;
}
use of com.google.gwt.resources.client.ImageResource in project rstudio by rstudio.
the class Source method fireDocTabsChanged.
private void fireDocTabsChanged() {
if (!initialized_)
return;
// ensure we have a tab order (we want the popup list to match the order
// of the tabs)
syncTabOrder();
String[] ids = new String[editors_.size()];
ImageResource[] icons = new ImageResource[editors_.size()];
String[] names = new String[editors_.size()];
String[] paths = new String[editors_.size()];
for (int i = 0; i < ids.length; i++) {
EditingTarget target = editors_.get(tabOrder_.get(i));
ids[i] = target.getId();
icons[i] = target.getIcon();
names[i] = target.getName().getValue();
paths[i] = target.getPath();
}
events_.fireEvent(new DocTabsChangedEvent(ids, icons, names, paths));
view_.manageChevronVisibility();
}
use of com.google.gwt.resources.client.ImageResource in project playn by threerings.
the class HtmlAssets method getImage.
protected HtmlImage getImage(String path, Scale scale) {
String url = pathPrefix + path;
AutoClientBundleWithLookup clientBundle = getBundle(path);
if (clientBundle != null) {
String key = getKey(path);
ImageResource resource = (ImageResource) getResource(key, clientBundle);
if (resource != null) {
url = resource.getSafeUri().asString();
}
}
return adaptImage(url, scale);
}
use of com.google.gwt.resources.client.ImageResource in project perun by CESNET.
the class PerunAppStateCell method render.
@Override
public void render(com.google.gwt.cell.client.Cell.Context context, String status, SafeHtmlBuilder sb) {
// selects the image according to the status
ImageResource ir = null;
if (status.equalsIgnoreCase("NEW")) {
ir = NEW;
} else if (status.equalsIgnoreCase("VERIFIED")) {
ir = VERIFIED;
} else if (status.equalsIgnoreCase("APPROVED")) {
ir = APPROVED;
} else if (status.equalsIgnoreCase("REJECTED")) {
ir = REJECTED;
}
// if status not available
if (ir == null) {
return;
}
// append the image
Element imageElement = new Image(ir).getElement();
imageElement.setTitle(status);
SafeHtml image = SafeHtmlUtils.fromSafeConstant((imageElement.getString()));
sb.appendHtmlConstant("<div class=\"" + "customClickableTextCell" + "\">");
sb.append(image);
sb.appendHtmlConstant("</div>");
}
Aggregations