-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #982 Add Multi Selection for Tree Component
- Loading branch information
Showing
17 changed files
with
2,101 additions
and
1,920 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
domino-ui/src/main/java/org/dominokit/domino/ui/tree/HasActiveNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright © 2019 Dominokit | ||
* | ||
* Licensed 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.dominokit.domino.ui.tree; | ||
|
||
public interface HasActiveNode<V, N extends TreeNode<V, N, S>, S> { | ||
void setActiveNode(N node); | ||
|
||
void setActiveNode(N node, boolean silent); | ||
|
||
N getActiveNode(); | ||
} |
18 changes: 18 additions & 0 deletions
18
domino-ui/src/main/java/org/dominokit/domino/ui/tree/HasTreeRoot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright © 2019 Dominokit | ||
* | ||
* Licensed 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.dominokit.domino.ui.tree; | ||
|
||
public interface HasTreeRoot<V> {} |
36 changes: 36 additions & 0 deletions
36
domino-ui/src/main/java/org/dominokit/domino/ui/tree/IsParentNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright © 2019 Dominokit | ||
* | ||
* Licensed 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.dominokit.domino.ui.tree; | ||
|
||
import java.util.Optional; | ||
|
||
public interface IsParentNode<V, N extends TreeNode<V, N, S>, S> extends HasActiveNode<V, N, S> { | ||
RootNode<V, N, S> getRootNode(); | ||
|
||
IsParentNode<V, N, S> expandNode(); | ||
|
||
IsParentNode<V, N, S> expandNode(boolean expandParent); | ||
|
||
TreeItemFilter<N> getFilter(); | ||
|
||
Optional<IsParentNode<V, N, S>> getParent(); | ||
|
||
void removeNode(N node); | ||
|
||
V getValue(); | ||
|
||
void setValue(V value); | ||
} |
33 changes: 33 additions & 0 deletions
33
domino-ui/src/main/java/org/dominokit/domino/ui/tree/NodeIconSupplier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright © 2019 Dominokit | ||
* | ||
* Licensed 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.dominokit.domino.ui.tree; | ||
|
||
import org.dominokit.domino.ui.icons.Icon; | ||
|
||
/** | ||
* An interface to provide custom icons for tree items. | ||
* | ||
* @param <N> The type of data associated with each tree item. | ||
*/ | ||
public interface NodeIconSupplier<V, N extends TreeNode<V, N, S>, S> { | ||
/** | ||
* Creates an icon for the given tree item. | ||
* | ||
* @param item The tree item for which to create the icon. | ||
* @return The created icon. | ||
*/ | ||
Icon<?> createIcon(N item); | ||
} |
28 changes: 28 additions & 0 deletions
28
domino-ui/src/main/java/org/dominokit/domino/ui/tree/RootNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright © 2019 Dominokit | ||
* | ||
* Licensed 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.dominokit.domino.ui.tree; | ||
|
||
public interface RootNode<V, N extends TreeNode<V, N, S>, S> extends HasActiveNode<V, N, S> { | ||
boolean isAutoCollapse(); | ||
|
||
boolean isAutoExpandFound(); | ||
|
||
NodeIconSupplier<V, N, S> getIconSupplier(); | ||
|
||
default void onActiveNodeChanged(N node, S selection, boolean silent) {} | ||
|
||
void onDeselectionChanged(N source, S selection); | ||
} |
Oops, something went wrong.