Skip to content

Commit 8ae8776

Browse files
committed
Adapt to the changes in patternfx
1 parent 152e198 commit 8ae8776

34 files changed

Lines changed: 248 additions & 146 deletions

tabshell-core/src/main/java/com/techsenger/tabshell/core/DefaultShellPresenter.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@
2020
import com.techsenger.patternfx.mvp.AbstractParentPresenter;
2121
import com.techsenger.patternfx.mvp.Descriptor;
2222
import com.techsenger.patternfx.mvp.Presenter;
23-
import com.techsenger.tabshell.core.dialog.DialogPort;
2423
import com.techsenger.tabshell.core.menu.MenuDelegate;
2524
import com.techsenger.tabshell.core.menu.MenuDelegates;
2625
import com.techsenger.tabshell.core.menu.MenuItemDelegate;
27-
import com.techsenger.tabshell.core.popup.PopupPort;
2826
import com.techsenger.tabshell.material.icon.Icon;
2927
import com.techsenger.tabshell.material.menu.MenuItemName;
3028
import com.techsenger.tabshell.material.menu.MenuName;
31-
import java.util.List;
3229
import java.util.function.Consumer;
3330

3431
/**
@@ -168,16 +165,6 @@ public void setMaximized(boolean maximized) {
168165
getView().setMaximized(maximized);
169166
}
170167

171-
@Override
172-
public List<? extends PopupPort> getPopups() {
173-
return getComposer().getPopupPorts();
174-
}
175-
176-
@Override
177-
public List<? extends DialogPort> getDialogs() {
178-
return getComposer().getDialogPorts();
179-
}
180-
181168
@Override
182169
public MenuDelegate getMenuDelegate(MenuName menuName) {
183170
return menuDelegates.getMenuDelegatesByName().get(menuName);

tabshell-core/src/main/java/com/techsenger/tabshell/core/dialog/DialogContainerComposer.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,12 @@
1616

1717
package com.techsenger.tabshell.core.dialog;
1818

19-
import com.techsenger.annotations.Unmodifiable;
2019
import com.techsenger.tabshell.core.popup.PopupContainerComposer;
21-
import java.util.List;
2220

2321
/**
2422
*
2523
* @author Pavel Castornii
2624
*/
27-
public interface DialogContainerComposer extends PopupContainerComposer {
25+
public interface DialogContainerComposer extends DialogContainerComposerBase, PopupContainerComposer {
2826

29-
/**
30-
* Returns an unmodifiable list of dialogs. A new list instance is created on each call.
31-
*
32-
* @return
33-
*/
34-
@Unmodifiable List<? extends DialogPort> getDialogPorts();
3527
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright 2024-2026 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.tabshell.core.dialog;
18+
19+
import com.techsenger.annotations.Unmodifiable;
20+
import com.techsenger.tabshell.core.popup.PopupContainerComposerBase;
21+
import java.util.List;
22+
23+
/**
24+
*
25+
* @author Pavel Castornii
26+
*/
27+
public interface DialogContainerComposerBase extends PopupContainerComposerBase {
28+
29+
/**
30+
* Returns an unmodifiable list of dialogs. A new list instance is created on each call.
31+
*
32+
* @return
33+
*/
34+
@Unmodifiable List<? extends DialogPort> getDialogPorts();
35+
}

tabshell-core/src/main/java/com/techsenger/tabshell/core/dialog/DialogContainerPort.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,13 @@
1717
package com.techsenger.tabshell.core.dialog;
1818

1919
import com.techsenger.tabshell.core.popup.PopupContainerPort;
20-
import java.util.List;
2120

2221
/**
2322
*
2423
* @author Pavel Castornii
2524
*/
2625
public interface DialogContainerPort extends PopupContainerPort {
2726

28-
/**
29-
* Returns the list of open dialogs.
30-
*
31-
* @return
32-
*/
33-
List<? extends DialogPort> getDialogs();
27+
@Override
28+
DialogContainerComposerBase getComposer();
3429
}

tabshell-core/src/main/java/com/techsenger/tabshell/core/page/PageContainerComposer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616

1717
package com.techsenger.tabshell.core.page;
1818

19+
import com.techsenger.patternfx.mvp.ParentComposer;
20+
1921
/**
2022
*
2123
* @author Pavel Castornii
2224
*/
23-
public interface PageContainerComposer {
25+
public interface PageContainerComposer extends PageContainerComposerBase, ParentComposer {
2426

2527
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2024-2026 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.tabshell.core.page;
18+
19+
import com.techsenger.annotations.Unmodifiable;
20+
import com.techsenger.patternfx.mvp.ComposerBase;
21+
import java.util.List;
22+
23+
/**
24+
*
25+
* @author Pavel Castornii
26+
*/
27+
public interface PageContainerComposerBase extends ComposerBase {
28+
29+
/**
30+
* Returns a list of created and initialized pages.
31+
*
32+
* @return
33+
*/
34+
@Unmodifiable List<? extends PagePort> getPagePorts();
35+
36+
PagePort getSelectedPagePort();
37+
}

tabshell-core/src/main/java/com/techsenger/tabshell/core/page/PageContainerPort.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616

1717
package com.techsenger.tabshell.core.page;
1818

19+
import com.techsenger.patternfx.mvp.ParentPort;
20+
1921
/**
2022
*
2123
* @author Pavel Castornii
2224
*/
23-
public interface PageContainerPort {
25+
public interface PageContainerPort extends ParentPort {
2426

25-
PagePort getSelectedPage();
27+
@Override
28+
PageContainerComposerBase getComposer();
2629

2730
void selectPage(PageItem item);
2831

tabshell-core/src/main/java/com/techsenger/tabshell/core/page/TreePageContainerComposer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616

1717
package com.techsenger.tabshell.core.page;
1818

19+
import com.techsenger.patternfx.mvp.ParentComposer;
20+
1921
/**
2022
*
2123
* @author Pavel Castornii
2224
*/
23-
public interface TreePageContainerComposer {
25+
public interface TreePageContainerComposer extends TreePageContainerComposerBase, ParentComposer {
2426

2527
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2024-2026 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.tabshell.core.page;
18+
19+
import com.techsenger.annotations.Unmodifiable;
20+
import com.techsenger.patternfx.mvp.ComposerBase;
21+
import java.util.List;
22+
23+
/**
24+
*
25+
* @author Pavel Castornii
26+
*/
27+
public interface TreePageContainerComposerBase extends ComposerBase {
28+
29+
/**
30+
* Returns a list of created and initialized pages.
31+
*
32+
* @return
33+
*/
34+
@Unmodifiable List<? extends PagePort> getPagePorts();
35+
36+
PagePort getSelectedPagePort();
37+
}

tabshell-core/src/main/java/com/techsenger/tabshell/core/page/TreePageContainerPort.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616

1717
package com.techsenger.tabshell.core.page;
1818

19+
import com.techsenger.patternfx.mvp.ParentPort;
20+
1921
/**
2022
*
2123
* @author Pavel Castornii
2224
*/
23-
public interface TreePageContainerPort {
25+
public interface TreePageContainerPort extends ParentPort {
2426

25-
PagePort getSelectedPage();
27+
@Override
28+
TreePageContainerComposerBase getComposer();
2629

2730
void selectPage(TreePageItem item);
2831
}

0 commit comments

Comments
 (0)