Skip to content

Commit

Permalink
Issue #165 (#238)
Browse files Browse the repository at this point in the history
Deprecating isLimitedToRoot in favor of isLimitedToWindow.
  • Loading branch information
andrewauclair authored Jul 11, 2024
1 parent 3133619 commit df19563
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docking-api/src/ModernDocking/Dockable.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,25 @@ default boolean isFloatingAllowed() {
* force the dockable to remain in the root it started in.
* this is useful for having a new floating frame with many dockables that are only allowed in that one frame.
*
* @return Should this dockable be limited to the root it starts in
* @return Should this dockable be limited to the root it starts in?
*
* @deprecated Replaced with isLimitedToWindow. Will be removed in future release.
*/
@Deprecated(since = "0.12.0", forRemoval = true)
default boolean isLimitedToRoot() {
return false;
}

/**
* force the dockable to remain in the window it started in.
* this is useful for having a new floating window with many dockables that are only allowed in that one window.
*
* @return Should this dockable be limited to the window it starts in?
*/
default boolean isLimitedToWindow() {
return false;
}

/**
* style of the dockable. vertical will disallow the east and west regions. horizontal will disallow the north and south regions.
* both will allow all 4 regions
Expand Down
1 change: 1 addition & 0 deletions docking-api/src/ModernDocking/api/DockingAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public void registerDockable(Dockable dockable) {
* Check if a dockable has already been registered
*
* @param persistentID The persistent ID to look for
* @return Has the dockable been registered?
*/
public boolean isDockableRegistered(String persistentID) {
return getDockables().stream().anyMatch(dockable -> Objects.equals(persistentID, dockable.getPersistentID()));
Expand Down

0 comments on commit df19563

Please sign in to comment.