]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/ExplorerState.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.browsing.ui / src / org / simantics / browsing / ui / ExplorerState.java
index ea513a0bc73faf2a927780ab34975d09f1b63f41..b7d152c99ce30b2a99e25d849d2f1ca75727089c 100644 (file)
@@ -1,82 +1,82 @@
-/*******************************************************************************\r
- * Copyright (c) 2013 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
- *     Semantum Oy - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.browsing.ui;\r
-\r
-import java.util.Arrays;\r
-import java.util.Collection;\r
-import java.util.Collections;\r
-import java.util.Map;\r
-\r
-/**\r
- * @author Tuukka Lehtonen <tuukka.lehtonen@semantum.fi>\r
- */\r
-public class ExplorerState {\r
-\r
-       /**\r
-        * Default value for empty {@link #topNodePathChildIndex}.\r
-        */\r
-       private static final int[] NO_CHILD_INDEXES = {};\r
-\r
-       /**\r
-        * Empty default value for ExplorerState.\r
-        */\r
-       public static final ExplorerState EMPTY = new ExplorerState(\r
-                       NodeContext.NONE, NO_CHILD_INDEXES,\r
-                       Collections.<NodeContext> emptyList(),\r
-                       Collections.<String, Integer> emptyMap());\r
-\r
-       /**\r
-        * An empty array of no top node path is set.\r
-        * @see NodeContext#NONE\r
-        */\r
-       public final NodeContext[] topNodePath;\r
-\r
-       /**\r
-        * Tells the child index of each node in {@link #topNodePath}. \r
-        * Must be the same size as {@link #topNodePath}.\r
-        */\r
-       public final int[] topNodePathChildIndex;\r
-\r
-       /**\r
-        * All the expanded nodes in the explorer. Never <code>null</code>.\r
-        */\r
-       public final Collection<NodeContext> expandedNodes;\r
-\r
-       /**\r
-        * Widths of columns.\r
-        */\r
-       public final Map<String, Integer> columnWidths;\r
-\r
-       /**\r
-        * @param topNodePath\r
-        * @param topNodePathChildIndex\r
-        * @param expandedNodes\r
-        * @param columnWidths \r
-        */\r
-       public ExplorerState(NodeContext[] topNodePath, int[] topNodePathChildIndex, Collection<NodeContext> expandedNodes, Map<String, Integer> columnWidths) {\r
-               if (expandedNodes == null)\r
-                       throw new IllegalArgumentException("null expanded nodes");\r
-               this.topNodePath = topNodePath;\r
-               this.topNodePathChildIndex = topNodePathChildIndex;\r
-               this.expandedNodes = expandedNodes;\r
-               this.columnWidths = columnWidths;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return getClass().getSimpleName() + "[topNodePath="\r
-                               + Arrays.toString(topNodePath) + ", topNodePathChildIndex="\r
-                               + Arrays.toString(topNodePathChildIndex) + ", expandedNodes="\r
-                               + expandedNodes + ", " + columnWidths + "]";\r
-       }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2013 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.browsing.ui;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * @author Tuukka Lehtonen <tuukka.lehtonen@semantum.fi>
+ */
+public class ExplorerState {
+
+       /**
+        * Default value for empty {@link #topNodePathChildIndex}.
+        */
+       private static final int[] NO_CHILD_INDEXES = {};
+
+       /**
+        * Empty default value for ExplorerState.
+        */
+       public static final ExplorerState EMPTY = new ExplorerState(
+                       NodeContext.NONE, NO_CHILD_INDEXES,
+                       Collections.<NodeContext> emptyList(),
+                       Collections.<String, Integer> emptyMap());
+
+       /**
+        * An empty array of no top node path is set.
+        * @see NodeContext#NONE
+        */
+       public final NodeContext[] topNodePath;
+
+       /**
+        * Tells the child index of each node in {@link #topNodePath}. 
+        * Must be the same size as {@link #topNodePath}.
+        */
+       public final int[] topNodePathChildIndex;
+
+       /**
+        * All the expanded nodes in the explorer. Never <code>null</code>.
+        */
+       public final Collection<NodeContext> expandedNodes;
+
+       /**
+        * Widths of columns.
+        */
+       public final Map<String, Integer> columnWidths;
+
+       /**
+        * @param topNodePath
+        * @param topNodePathChildIndex
+        * @param expandedNodes
+        * @param columnWidths 
+        */
+       public ExplorerState(NodeContext[] topNodePath, int[] topNodePathChildIndex, Collection<NodeContext> expandedNodes, Map<String, Integer> columnWidths) {
+               if (expandedNodes == null)
+                       throw new IllegalArgumentException("null expanded nodes");
+               this.topNodePath = topNodePath;
+               this.topNodePathChildIndex = topNodePathChildIndex;
+               this.expandedNodes = expandedNodes;
+               this.columnWidths = columnWidths;
+       }
+
+       @Override
+       public String toString() {
+               return getClass().getSimpleName() + "[topNodePath="
+                               + Arrays.toString(topNodePath) + ", topNodePathChildIndex="
+                               + Arrays.toString(topNodePathChildIndex) + ", expandedNodes="
+                               + expandedNodes + ", " + columnWidths + "]";
+       }
+
+}