Convenience method to set all borders at once.

@param string $style
@param string $color
@return Style
356217
public function setSurroundingBorder($style = BorderStyle::THIN, $color = '000000')
    {
        $this->setBorderLeft($style, $color);
        $this->setBorderRight($style, $color);
        $this->setBorderTop($style, $color);
        $this->setBorderBottom($style, $color);
        return $this;
    }
295250
private function createCSSStyleBorder(PHPExcel_Style_Border $pStyle)
    {
        // Create CSS
//        $css = $this->mapBorderStyle($pStyle->getBorderStyle()) . ' #' . $pStyle->getColor()->getRGB();
        //    Create CSS - add !important to non-none border styles for merged cells
        $borderStyle = $this->mapBorderStyle($pStyle->getBorderStyle());
        $css = $borderStyle . ' #' . $pStyle->getColor()->getRGB() . (($borderStyle == 'none') ? '' : ' !important');

        return $css;
    }
1264916
function set_color($color)
    {
        $col = $this->munge_color($color);

        if (is_null($col) || !isset($col["hex"])) {
            $color = "inherit";
        } else {
            $color = $col["hex"];
        }

        //see __set and __get, on all assignments clear cache, not needed on direct set through __set
        $this->_prop_cache["color"] = null;
        $this->_props["color"] = $color;
    }
973226
function (color, width) {
        if (!color) {
            color = "red";
        }
        if (!width) {
            width = 2;
        }
        this.div.style.border = width + "px solid " + color;
    }
913769
protected function setColorStyle( $styleType, $color, $type = false, $colorType = 'rgb' )
    {
        // Set the styles
        $styles = is_array( $color )
            ? $color
            : [
                'type'  => $type,
                'color' => [ $colorType => str_replace( '#', '', $color ) ],
            ];

        return $this->setStyle( $styleType, $styles );
    }
808507
public LienzoPanel setBackgroundColor(final String color)
    {
        if (null != color)
        {
            getElement().getStyle().setBackgroundColor(color);
        }
        return this;
    }
685909
public function set_left($style) {
        if ($style == 1) {
            $this->format['borders']['left']['style'] = PHPExcel_Style_Border::BORDER_THIN;
        } else if ($style == 2) {
            $this->format['borders']['left']['style'] = PHPExcel_Style_Border::BORDER_THICK;
        } else {
            $this->format['borders']['left']['style'] = PHPExcel_Style_Border::BORDER_NONE;
        }
    }
588034
public function setThemeColor(string $themeColor): self
    {
        $this->isValidColor($themeColor);

        $this->themeColor = $themeColor;

        return $this;
    }
1072758
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setStyle(final String style) {
        pathBuilder.setStyle(style);
        return (T) this;
    }
1059334
public function asCircularLabel($caption,$color){
		$this->setContent($caption);
		$lbl=new HtmlLabel("");
		$lbl->setCircular()->setColor($color)->setEmpty();
		$this->addContent($lbl,true);
		return $this;
	}
647465
private function getBorderXMLContent($style)
    {
        $borderProperty = '<style:table-cell-properties %s />';

        $borders = array_map(function (BorderPart $borderPart) {
            return BorderHelper::serializeBorderPart($borderPart);
        }, $style->getBorder()->getParts());

        return sprintf($borderProperty, implode(' ', $borders));
    }
1080345
function merge(Style $style)
    {
        $shorthand_properties = array("background", "border", "border_bottom", "border_color", "border_left", "border_radius", "border_right", "border_style", "border_top", "border_width", "flex", "font", "list_style", "margin", "padding", "transform");
        //treat the !important attribute
        //if old rule has !important attribute, override with new rule only if
        //the new rule is also !important
        foreach ($style->_props as $prop => $val) {
            $can_merge = false;
            if (isset($style->_important_props[$prop])) {
                $this->_important_props[$prop] = true;
                $can_merge = true;
            } else if (!isset($this->_important_props[$prop])) {
                $can_merge = true;
            }

            if ($can_merge) {
                //see __set and __get, on all assignments clear cache!
                $this->_prop_cache[$prop] = null;
                $this->_props[$prop] = $val;

                // Clear out "inherit" shorthand properties if specific properties have been set
                $shorthands = array_filter($shorthand_properties, function($el) use ($prop) {
                    return ( strpos($prop, $el."_") !== false );
                });
                foreach ($shorthands as $shorthand) {
                    if (array_key_exists($shorthand, $this->_props) && $this->_props[$shorthand] === "inherit") {
                        unset($this->_props[$shorthand]);
                    }
                } 
            }
        }

        if (isset($style->_props["font_size"])) {
            $this->__font_size_calculated = false;
        }
    }
886877
public function addStyle(Style $style)
    {
        if (!$this->styleSet) {
            $this->styleSet = new DefaultStyleSet();
        }

        $this->styleSet->add($style);

        return $this;
    }
663640
public function import(Style $style)
    {
        foreach ($style->getArrayCopy() as $styleTextContent) {
            $this->append($styleTextContent);
        }
    }
147791
public function addStyle(Style $style)
    {
        if (!in_array($style, $this->styles, true)) {
            array_push($this->styles, $style);
        }
        return $this;
    }
721324
private function _createCSSStyleBorder(PHPExcel_Style_Border $pStyle) {
		// Create CSS
//		$css = $this->_mapBorderStyle($pStyle->getBorderStyle()) . ' #' . $pStyle->getColor()->getRGB();
		//	Create CSS - add !important to non-none border styles for merged cells  
		$borderStyle = $this->_mapBorderStyle($pStyle->getBorderStyle());  
		$css = $borderStyle . ' #' . $pStyle->getColor()->getRGB() . (($borderStyle == 'none') ? '' : ' !important'); 

		// Return
		return $css;
	}
763463
protected function background($color = null)
    {
        if (!is_null($color)) {
            $this->resource->setImageBackgroundColor(sprintf('#%s', $color));
        }
        return $this;
    }