Java Code Examples for com.google.gwt.dom.client.Style.setBackgroundColor()

The following are Jave code examples for showing how to use setBackgroundColor() of the com.google.gwt.dom.client.Style class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Wiab.pro   File: BlipViewDomImpl.java   Source Code and License Vote up 5 votes
@Override
public void setQuasiDeleted(String title, boolean isRowOwnerDeleted) {
  self.addClassName(css.deleted());
  
  // white margins are shown only if blip doesn't have a deleted row owner blip
  int marginWidthPct = isRowOwnerDeleted ? 0 : 100;
  getTopMargin().getStyle().setWidth(marginWidthPct, Style.Unit.PCT);
  getBottomMargin().getStyle().setWidth(marginWidthPct, Style.Unit.PCT);    
  
  Style metaFrameStyle = DomViewHelper.load(getMeta().getId(),
      BlipMetaViewBuilder.Components.FRAME).getStyle();
  metaFrameStyle.setBackgroundColor(DELETED_COLOR);
  metaFrameStyle.setBorderColor(DELETED_COLOR);
  DomUtil.findFirstChildElement(meta, Type.BLIP_INDICATOR).getStyle().setBorderColor(DELETED_COLOR);    

  self.setTitle(title);
  
  // Unset cursor shape for children
  setAutoCursor(DomUtil.findFirstChildElement(getMeta(), Type.BLIP_CONTINUATION_BAR));
  Element timeAndMenu = DomUtil.findFirstChildElement(getMeta(), Type.META_BAR, Type.TIME_AND_MENU);
  setAutoCursor(timeAndMenu);
  setAutoCursor(DomUtil.findFirstChildElement(timeAndMenu, Type.BLIP_TIME));
  Element menuButton = DomUtil.findFirstChildElement(timeAndMenu, Type.BLIP_MENU_BUTTON);
  setAutoCursor(menuButton);

  // Remove arrow from menu button
  menuButton.getStyle().setColor(DELETED_COLOR);

  DomUtil.setQuasiDeleted(self);
}
 
Example 2
Project: che   File: SpeedSearch.java   Source Code and License Vote up 5 votes
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);
}
 
Example 3
Project: minus   File: Indicator.java   Source Code and License Vote up 5 votes
public void setMessage(String msg, String bkgColor, String txtColor) {

    label_.setText(msg);

    Style labelStyle = label_.getElement().getStyle();
    labelStyle.setFontSize(1.6, Style.Unit.EM);
    labelStyle.setBackgroundColor(bkgColor);
    labelStyle.setColor(txtColor);
    labelStyle.setPadding(5, Style.Unit.PX);
  }
 
Example 4
Project: appformer   File: ResizableMovableHeader.java   Source Code and License Vote up 5 votes
private static void setLine(final Style style,
                            final int width,
                            final int top,
                            final int height,
                            final String color) {
    style.setPosition(Position.ABSOLUTE);
    style.setTop(top,
                 PX);
    style.setHeight(height,
                    PX);
    style.setWidth(width,
                   PX);
    style.setBackgroundColor(color);
    style.setZIndex(Integer.MAX_VALUE);
}