You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/08/09 19:30:25 UTC
[royale-asjs] 01/10: use interface
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 7843e2483e5622f507e8741423f756ff212f57c9
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Aug 9 11:08:48 2018 -0700
use interface
---
.../org/apache/royale/collections/ITreeData.as | 36 ++++++++++++++++++++++
.../org/apache/royale/collections/TreeData.as | 2 +-
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/ITreeData.as b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/ITreeData.as
new file mode 100644
index 0000000..bcb777f
--- /dev/null
+++ b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/ITreeData.as
@@ -0,0 +1,36 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.collections
+{
+ /**
+ * The ITreeData interface is the basic interface for determining which
+ * items in a hierarchical collection should be displayed in the tree.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ public interface ITreeData
+ {
+ function getDepth(node:Object):int;
+ function isOpen(node:Object):Boolean;
+ function hasChildren(node:Object):Boolean;
+ }
+}
diff --git a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/TreeData.as b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/TreeData.as
index b594c63..7c2386d 100644
--- a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/TreeData.as
+++ b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/TreeData.as
@@ -26,7 +26,7 @@ package org.apache.royale.collections
* a HierarchicalData structure as its primary source, but then internally flattens
* it for presentation.
*/
- public class TreeData extends EventDispatcher implements ICollectionView
+ public class TreeData extends EventDispatcher implements ICollectionView, ITreeData
{
public function TreeData(source:HierarchicalData)
{