aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/sl/usermodel/TableCell.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/poi/sl/usermodel/TableCell.java')
-rw-r--r--src/java/org/apache/poi/sl/usermodel/TableCell.java61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/sl/usermodel/TableCell.java b/src/java/org/apache/poi/sl/usermodel/TableCell.java
index 278573bab5..5ad4c4c296 100644
--- a/src/java/org/apache/poi/sl/usermodel/TableCell.java
+++ b/src/java/org/apache/poi/sl/usermodel/TableCell.java
@@ -17,9 +17,70 @@
package org.apache.poi.sl.usermodel;
+import java.awt.Color;
+
+import org.apache.poi.sl.usermodel.StrokeStyle.LineCompound;
+import org.apache.poi.sl.usermodel.StrokeStyle.LineDash;
+
public interface TableCell<
S extends Shape<S,P>,
P extends TextParagraph<S,P,?>
> extends TextShape<S,P> {
+ enum BorderEdge { bottom, left, top, right };
+
+ /**
+ * Return line style of given edge or {@code null} if border is not defined
+ *
+ * @param edge the border edge
+ * @return line style of given edge or {@code null} if border is not defined
+ */
+ StrokeStyle getBorderStyle(BorderEdge edge);
+
+ /**
+ * Sets the {@link StrokeStyle} of the given border edge.
+ * A {@code null} property of the style is ignored.
+ *
+ * @param edge border edge
+ * @param style the new stroke style
+ */
+ void setBorderStyle(BorderEdge edge, StrokeStyle style);
+
+ /**
+ * Convenience method for setting the border width.
+ *
+ * @param edge border edge
+ * @param width the new border width
+ */
+ void setBorderWidth(BorderEdge edge, double width);
+
+ /**
+ * Convenience method for setting the border color.
+ *
+ * @param edge border edge
+ * @param color the new border color
+ */
+ void setBorderColor(BorderEdge edge, Color color);
+
+ /**
+ * Convenience method for setting the border line compound.
+ *
+ * @param edge border edge
+ * @param compound the new border line compound
+ */
+ void setBorderCompound(BorderEdge edge, LineCompound compound);
+ /**
+ * Convenience method for setting the border line dash.
+ *
+ * @param edge border edge
+ * @param dash the new border line dash
+ */
+ void setBorderDash(BorderEdge edge, LineDash dash);
+
+ /**
+ * Remove all line attributes of the given border edge
+ *
+ * @param edge the border edge to be cleared
+ */
+ void removeBorder(BorderEdge edge);
}