File tree 6 files changed +46
-17
lines changed
com/techsenger/mvvm4fx/core
mvvm4fx-sampler/src/main/java/com/techsenger/mvvm4fx/sampler
6 files changed +46
-17
lines changed Original file line number Diff line number Diff line change 18
18
<groupId >org.slf4j</groupId >
19
19
<artifactId >slf4j-api</artifactId >
20
20
</dependency >
21
- <dependency >
22
- <groupId >com.techsenger.toolkit</groupId >
23
- <artifactId >toolkit-core</artifactId >
24
- </dependency >
25
21
<dependency >
26
22
<groupId >org.openjfx</groupId >
27
23
<artifactId >javafx-base</artifactId >
Original file line number Diff line number Diff line change 16
16
17
17
package com .techsenger .mvvm4fx .core ;
18
18
19
- import com .techsenger .toolkit .core .Key ;
20
-
21
19
/**
20
+ * Keys are used to identify components. Component keys should be located in the API and be accessible to other
21
+ * components. At the same time, the component itself can be deeply hidden in the implementation packages.
22
+ *
23
+ * <p>Classes implementing this interface should override toString with a meaningful representation.
22
24
*
23
25
* @author Pavel Castornii
24
26
*/
25
- public class ComponentKey extends Key {
27
+ public interface ComponentKey {
26
28
27
- public ComponentKey (String text ) {
28
- super (text );
29
- }
30
29
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
module com .techsenger .mvvm4fx .core {
18
- requires com .techsenger .toolkit .core ;
19
18
requires org .slf4j ;
20
19
requires javafx .base ;
21
20
requires javafx .graphics ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2024-2025 Pavel Castornii.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package com .techsenger .mvvm4fx .sampler ;
18
+
19
+ import com .techsenger .mvvm4fx .core .ComponentKey ;
20
+
21
+ /**
22
+ *
23
+ * @author Pavel Castornii
24
+ */
25
+ public class DemoKey implements ComponentKey {
26
+
27
+ private final String name ;
28
+
29
+ public DemoKey (String name ) {
30
+ this .name = name ;
31
+ }
32
+
33
+ @ Override
34
+ public String toString () {
35
+ return name ;
36
+ }
37
+ }
Original file line number Diff line number Diff line change 19
19
import com .techsenger .mvvm4fx .core .ComponentKey ;
20
20
21
21
/**
22
- * Component keys should be located in the API and be accessible to other components. At the same time, the
23
- * component itself can be deeply hidden in the implementation packages.
24
22
*
25
23
* @author Pavel Castornii
26
24
*/
27
- public final class ComponentKeys {
25
+ public final class DemoKeys {
28
26
29
- public static final ComponentKey PERSON = new ComponentKey ("Person component" );
27
+ public static final ComponentKey PERSON = new DemoKey ("Person component" );
30
28
31
- private ComponentKeys () {
29
+ private DemoKeys () {
32
30
//empty
33
31
}
34
32
}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public PersonViewModel() {
51
51
52
52
@ Override
53
53
public ComponentKey getKey () {
54
- return ComponentKeys .PERSON ;
54
+ return DemoKeys .PERSON ;
55
55
}
56
56
57
57
ObservableList <Person > getPersons () {
You can’t perform that action at this time.
0 commit comments