]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/ColumnKeys.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.browsing.ui.common / src / org / simantics / browsing / ui / common / ColumnKeys.java
diff --git a/bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/ColumnKeys.java b/bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/ColumnKeys.java
new file mode 100644 (file)
index 0000000..3c54811
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.browsing.ui.common;\r
+\r
+import org.simantics.browsing.ui.content.Labeler;\r
+import org.simantics.utils.datastructures.ArrayMap;\r
+\r
+/**\r
+ * Reusable standard key objects for idenfitying columns in {@link Labeler}\r
+ * implementations.\r
+ * \r
+ * @author Tuukka Lehtonen\r
+ * \r
+ * @see Labeler#getLabels()\r
+ * @see Labeler#getRuntimeLabels()\r
+ */\r
+public final class ColumnKeys {\r
+\r
+    // Use these for single-column tree views\r
+\r
+    public static final String   SINGLE              = "single";\r
+\r
+    /**\r
+     * Use with {@link ArrayMap} in {@link Labeler} implementations.\r
+     */\r
+    public static final String[] KEYS_SINGLE         = { SINGLE };\r
+\r
+    // Use these for tree-table style multicolumn views\r
+\r
+    public static final String   PROPERTY            = "Property";\r
+\r
+    public static final String   EXPRESSION               = "Expression";\r
+\r
+    public static final String   VALUE               = "Value";\r
+\r
+    public static final String   DISPLAY_PROPERTY            = "HasDisplayProperty";\r
+    public static final String   DISPLAY_VALUE            = "HasDisplayValue";\r
+    public static final String   DISPLAY_UNIT            = "HasDisplayUnit";\r
+\r
+    \r
+    /**\r
+     * Use with {@link ArrayMap} in {@link Labeler} implementations.\r
+     */\r
+    public static final String[] KEYS_PROPERTY_VALUE = { PROPERTY, VALUE };\r
+    \r
+}\r