Java Code Examples for com.google.gwt.dom.client.Style#setBorderStyle()
The following examples show how to use
com.google.gwt.dom.client.Style#setBorderStyle() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseCellMapper.java From jetpad-projectional-open-source with Apache License 2.0 | 5 votes |
private void applyStyle(boolean selected, boolean focusHighlighted, Color background) { updateCssStyle(CSS.outlined(), focusHighlighted && !isLeaf() && !selected); updateCssStyle(CSS.selected(), selected); updateCssStyle(CSS.paired(), getSource().get(Cell.PAIR_HIGHLIGHTED)); updateCssStyle(CSS.link(), getSource().get(Cell.LINK)); String backgroundColor = null; if (isLeaf() && focusHighlighted) { backgroundColor = CSS.currentHighlightColor(); } else if (background != null) { backgroundColor = background.toCssColor(); } String underline = getSource().get(Cell.LINK) && getSource().get(Cell.HOVERED) ? CSS.blueUnderline() : 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)); }