private boolean hasUniformBorders() { org.eclipse.sapphire.Color tc, bc, lc, rc; tc = this.rectPresentation.getTopBorder().getColor().getContent(); bc = this.rectPresentation.getBottomBorder().getColor().getContent(); lc = this.rectPresentation.getLeftBorder().getColor().getContent(); rc = this.rectPresentation.getRightBorder().getColor().getContent(); if (!(tc.equals(bc) && tc.equals(lc) && tc.equals(rc))) { return false; } int tw, bw, lw, rw; tw = this.rectPresentation.getTopBorder().getWeight().getContent(); bw = this.rectPresentation.getBottomBorder().getWeight().getContent(); lw = this.rectPresentation.getLeftBorder().getWeight().getContent(); rw = this.rectPresentation.getRightBorder().getWeight().getContent(); if (!(tw == bw && tw == lw && tw == rw)) { return false; } LineStyle ts, bs, ls, rs; ts = this.rectPresentation.getTopBorder().getStyle().getContent(); bs = this.rectPresentation.getBottomBorder().getStyle().getContent(); ls = this.rectPresentation.getLeftBorder().getStyle().getContent(); rs = this.rectPresentation.getRightBorder().getStyle().getContent(); if (!(ts == bs && ts == ls && ts == rs)) { return false; } return true; }
private static RGB convert(final Color color) { return (color == null ? null : new RGB(color.red(), color.green(), color.blue())); }