List of usage examples for com.google.gwt.dom.client Style setBorderColor
public void setBorderColor(String value)
From source file:com.alkacon.geranium.client.util.DebugLog.java
License:Open Source License
/** * Constructor.<p>//from w ww . j av a2s . c o m */ @SuppressWarnings("unused") private DebugLog() { if (!DEBUG) { return; } m_html = new HTML(); initWidget(m_html); Style style = getElement().getStyle(); style.setWidth(200, Unit.PX); style.setHeight(500, Unit.PX); style.setPadding(10, Unit.PX); style.setOverflow(Overflow.AUTO); style.setBorderStyle(BorderStyle.SOLID); style.setBorderColor(I_LayoutBundle.INSTANCE.constants().css().borderColor()); style.setBorderWidth(1, Unit.PX); style.setPosition(Position.FIXED); style.setTop(50, Unit.PX); style.setRight(50, Unit.PX); style.setBackgroundColor(I_LayoutBundle.INSTANCE.constants().css().backgroundColorDialog()); style.setZIndex(10); }
From source file:com.goodow.wave.client.wavepanel.blip.SetColor.java
License:Apache License
@Override public void onBrowserEvent(final Event event) { if (DOM.eventGetType(event) == Event.ONCLICK) { if (changeElm == null) { Window.alert("changeElm is null!"); return; }/*from w ww . j a va 2s.c o m*/ NodeList<Element> aTags = changeElm.getElementsByTagName("span"); Element aTag = aTags.getItem(1); Element elm = Element.as(event.getEventTarget()); Style elmStyle = elm.getStyle(); Style aTagStyle = aTag.getStyle(); if (elm.getTitle().equals("White") || elm.getTitle().equals("20% Black")) { aTagStyle.setBackgroundColor(elmStyle.getBackgroundColor()); aTagStyle.setColor("black"); aTagStyle.setBorderStyle(BorderStyle.SOLID); aTagStyle.setBorderWidth(1, Unit.PX); aTagStyle.setBorderColor("black"); aTagStyle.setTextDecoration(TextDecoration.NONE); } else { if (!aTagStyle.getBorderWidth().equals("")) { aTagStyle.clearBorderColor(); aTagStyle.clearBorderStyle(); aTagStyle.clearBorderWidth(); } aTagStyle.setTextDecoration(TextDecoration.NONE); aTagStyle.setBackgroundColor(elmStyle.getBackgroundColor()); aTagStyle.setColor("white"); } // Window.alert("title:" + elm.getTitle() + ";color:" + elm.getStyle().getBackgroundColor()); } }
From source file:com.vaadin.terminal.gwt.client.SimpleTree.java
License:Open Source License
public SimpleTree() { setElement(Document.get().createDivElement()); Style style = getElement().getStyle(); style.setProperty("whiteSpace", "nowrap"); style.setPadding(3, Unit.PX);// w w w . j av a 2 s . c om style = handle.getStyle(); style.setDisplay(Display.NONE); style.setProperty("textAlign", "center"); style.setWidth(10, Unit.PX); style.setCursor(Cursor.POINTER); style.setBorderStyle(BorderStyle.SOLID); style.setBorderColor("#666"); style.setBorderWidth(1, Unit.PX); style.setMarginRight(3, Unit.PX); style.setProperty("borderRadius", "4px"); handle.setInnerHTML("+"); getElement().appendChild(handle); getElement().appendChild(text); style = children.getStyle(); style.setPaddingLeft(20, Unit.PX); style.setDisplay(Display.NONE); getElement().appendChild(children); addDomHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (event.getNativeEvent().getEventTarget().cast() == handle) { if (children.getStyle().getDisplay().intern() == Display.NONE.getCssName()) { open(event.getNativeEvent().getShiftKey()); } else { close(); } } else if (event.getNativeEvent().getEventTarget().cast() == text) { select(event); } } }, ClickEvent.getType()); }
From source file:info.magnolia.ui.vaadin.gwt.client.applauncher.widget.VTemporaryAppGroupBarTile.java
License:Open Source License
private void setColorsClick() { final Style style = getElement().getStyle(); if (!group.isClientGroup()) { style.setColor(group.getColor()); style.setBorderColor("white"); } else {//from w w w .j av a 2s .co m style.setBorderColor(group.getColor()); style.setColor("white"); } }
From source file:jetbrains.jetpad.cell.toDom.BaseCellMapper.java
License:Apache License
private void applyStyle(boolean selected, boolean focusHighlighted, Color background) { updateCssStyle(CSS.selected(), (focusHighlighted && !isLeaf()) || selected); updateCssStyle(CSS.paired(), getSource().get(Cell.PAIR_HIGHLIGHTED)); String backgroundColor = null; if (isLeaf() && focusHighlighted) { backgroundColor = CSS.currentHighlightColor(); } else if (background != null) { backgroundColor = background.toCssColor(); }/* ww w . ja va 2 s. c o m*/ String underline = getSource().get(Cell.RED_UNDERLINE) ? CSS.redUnderline() : (getSource().get(Cell.YELLOW_UNDERLINE) ? CSS.yellowUnderline() : null); applyBackground(backgroundColor, underline); Style style = getTarget().getStyle(); Color borderColor = getSource().get(Cell.BORDER_COLOR); style.setBorderStyle(borderColor == null ? Style.BorderStyle.NONE : Style.BorderStyle.SOLID); style.setBorderWidth(borderColor == null ? 0 : 1, Style.Unit.PX); style.setBorderColor(borderColor == null ? null : borderColor.toCssColor()); updateCssStyle(CSS.hidden(), !getSource().get(Cell.VISIBLE)); updateCssStyle(CSS.hasShadow(), getSource().get(Cell.HAS_SHADOW)); }
From source file:org.eclipse.che.ide.ui.smartTree.SpeedSearch.java
License:Open Source License
private void initSearchPopUp() { this.searchPopUp = new SearchPopUp(); Style style = this.searchPopUp.getElement().getStyle(); style.setBackgroundColor("grey"); style.setBorderStyle(Style.BorderStyle.SOLID); style.setBorderColor("#dbdbdb"); style.setBorderWidth(1, Style.Unit.PX); style.setPadding(2, Style.Unit.PX); style.setPosition(Style.Position.FIXED); style.setTop(100, Style.Unit.PX); style.setLeft(20, Style.Unit.PX); }
From source file:org.opencms.gwt.client.util.CmsDebugLog.java
License:Open Source License
/** * Constructor.<p>/*from w w w .j av a 2 s . c o m*/ */ @SuppressWarnings("unused") private CmsDebugLog() { if (!DEBUG) { return; } m_html = new HTML(); initWidget(m_html); Style style = getElement().getStyle(); style.setWidth(200, Unit.PX); style.setHeight(500, Unit.PX); style.setPadding(10, Unit.PX); style.setOverflow(Overflow.AUTO); style.setBorderStyle(BorderStyle.SOLID); style.setBorderColor(I_CmsLayoutBundle.INSTANCE.constants().css().borderColor()); style.setBorderWidth(1, Unit.PX); style.setPosition(Position.FIXED); style.setTop(50, Unit.PX); style.setRight(50, Unit.PX); style.setBackgroundColor(I_CmsLayoutBundle.INSTANCE.constants().css().backgroundColorDialog()); style.setZIndex(10); }
From source file:org.rstudio.studio.client.workbench.prefs.views.AceEditorPreview.java
License:Open Source License
public AceEditorPreview(String code) { code_ = code;/*from w ww. j a va 2 s . c o m*/ Style style = getStyleElement().getStyle(); style.setBorderColor("#CCC"); style.setBorderWidth(1, Unit.PX); style.setBorderStyle(BorderStyle.SOLID); }
From source file:org.rstudio.studio.client.workbench.views.source.editors.text.ChunkOutputWidget.java
License:Open Source License
public void applyCachedEditorStyle() { if (!isEditorStyleCached()) return;//from w ww . ja va 2s . c om Style frameStyle = frame_.getElement().getStyle(); frameStyle.setBorderColor(s_colors.border); getElement().getStyle().setBackgroundColor(s_colors.background); frame_.getElement().getStyle().setBackgroundColor(s_colors.background); if (presenter_ != null) presenter_.onEditorThemeChanged(s_colors); }
From source file:org.rstudio.studio.client.workbench.views.vcs.ConsoleProgressDialog.java
License:Open Source License
public ConsoleProgressDialog(String title, ConsoleProcess consoleProcess) { consoleProcess_ = consoleProcess;//from ww w. j a v a 2 s .co m setText(title); registrations_ = new HandlerRegistrations(); registrations_.add(consoleProcess.addConsoleOutputHandler(this)); registrations_.add(consoleProcess.addProcessExitHandler(this)); output_ = new PreWidget(); output_.getElement().getStyle().setMargin(0, Unit.PX); output_.getElement().getStyle().setFontSize(11, Unit.PX); scrollPanel_ = new BottomScrollPanel(output_); scrollPanel_.setSize("640px", "200px"); Style style = scrollPanel_.getElement().getStyle(); style.setBackgroundColor("white"); style.setBorderStyle(BorderStyle.SOLID); style.setBorderColor("#BBB"); style.setBorderWidth(1, Style.Unit.PX); style.setMargin(0, Unit.PX); style.setMarginBottom(3, Unit.PX); style.setPadding(4, Unit.PX); status_ = new Label("The process is executing..."); button_ = new ThemedButton("Stop", this); addOkButton(button_); consoleProcess.start(new SimpleRequestCallback<Void>() { @Override public void onError(ServerError error) { // Show error and stop super.onError(error); closeDialog(); } }); }