-package org.simantics.spreadsheet.ui;\r
-\r
-import java.awt.Color;\r
-import java.awt.Font;\r
-\r
-import javax.swing.border.Border;\r
-\r
-public class CellValue {\r
- \r
- public boolean editable = false;\r
- \r
- public String label;\r
- public int border;\r
- public int align;\r
- public Font font;\r
- public Color foreground;\r
- public Color background;\r
- public CellValue(String label, Font font, Color foreground, Color background, int border, int align, boolean editable) {\r
- this.editable = editable;\r
- this.label = label;\r
- this.font = font;\r
- this.foreground = foreground;\r
- \r
- if (editable) {\r
- this.background = background;\r
- } else {\r
- this.background = new Color(220, 220, 220, 100);\r
- }\r
- this.border = border;\r
- this.align = align;\r
- }\r
- \r
- final SheetBorder BORDER0 = new SheetBorder(1,1,1,1,false, false); \r
- final SheetBorder BORDER1 = new SheetBorder(1,1,1,1,false, true); \r
- final SheetBorder BORDER2 = new SheetBorder(1,1,1,1,true, false); \r
- final SheetBorder BORDER3 = new SheetBorder(1,1,1,1,true, true);\r
- \r
- /*\r
- * 1 = right\r
- * 2 = bottom\r
- */\r
- public Border getBorder() {\r
- switch(border) {\r
- case 0: return BORDER0;\r
- case 1: return BORDER1;\r
- case 2: return BORDER2;\r
- case 3: return BORDER3;\r
- }\r
- return BORDER0;\r
- }\r
- \r
-}\r
+package org.simantics.spreadsheet.ui;
+
+import java.awt.Color;
+import java.awt.Font;
+
+import javax.swing.border.Border;
+
+public class CellValue {
+
+ public boolean editable = false;
+
+ public String label;
+ public int border;
+ public int align;
+ public Font font;
+ public Color foreground;
+ public Color background;
+ public CellValue(String label, Font font, Color foreground, Color background, int border, int align, boolean editable) {
+ this.editable = editable;
+ this.label = label;
+ this.font = font;
+ this.foreground = foreground;
+
+ if (editable) {
+ this.background = background;
+ } else {
+ this.background = new Color(220, 220, 220, 100);
+ }
+ this.border = border;
+ this.align = align;
+ }
+
+ final SheetBorder BORDER0 = new SheetBorder(1,1,1,1,false, false);
+ final SheetBorder BORDER1 = new SheetBorder(1,1,1,1,false, true);
+ final SheetBorder BORDER2 = new SheetBorder(1,1,1,1,true, false);
+ final SheetBorder BORDER3 = new SheetBorder(1,1,1,1,true, true);
+
+ /*
+ * 1 = right
+ * 2 = bottom
+ */
+ public Border getBorder() {
+ switch(border) {
+ case 0: return BORDER0;
+ case 1: return BORDER1;
+ case 2: return BORDER2;
+ case 3: return BORDER3;
+ }
+ return BORDER0;
+ }
+
+}