Skip to content

Commit

Permalink
Issue #256
Browse files Browse the repository at this point in the history
Removing `Docking.configurePinning` and `Docking.pinningAllowed`.

Removing `RootDockingPanelAPI.isPinningSupported`, `RootDockingPanelAPI.setPinningSupported`, `RootDockingPanelAPI.getPinningLayer` and `RootDockingPanelAPI.setPinningLayer`.
  • Loading branch information
andrewauclair committed Jan 29, 2025
1 parent 33c27b7 commit 9c05e35
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 63 deletions.
20 changes: 2 additions & 18 deletions docking-api/src/ModernDocking/api/DockingAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,6 @@ public void deregisterAllDockingPanels() {
}
}

/**
* @deprecated Replaced with configureAutoHide. Will be removed in a future release.
*/
@Deprecated(since = "0.12.0", forRemoval = true)
public void configurePinning(Window window, int layer, boolean allow) {
configureAutoHide(window, layer, allow);
}

/**
* allows the user to configure auto hide per window. by default auto hide is only enabled on the frames the docking framework creates
*
Expand All @@ -267,18 +259,10 @@ public void configureAutoHide(Window window, int layer, boolean allow) {
}

/**
* @deprecated Replaced with autoHideAllowed. Will be removed in a future release.
*/
@Deprecated(since = "0.12.0", forRemoval = true)
public boolean pinningAllowed(Dockable dockable) {
return autoHideAllowed(dockable);
}

/**
* Check if pinning is allowed for a dockable
* Check if auto hide is allowed for a dockable
*
* @param dockable Dockable to check
* @return Whether the dockable can be pinned
* @return Whether the dockable can be auto hide
*/
public boolean autoHideAllowed(Dockable dockable) {
InternalRootDockingPanel root = DockingComponentUtils.rootForWindow(this, DockingComponentUtils.findWindowForDockable(this, dockable));
Expand Down
35 changes: 0 additions & 35 deletions docking-api/src/ModernDocking/api/RootDockingPanelAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@ public void setEmptyPanel(JPanel panel) {
this.emptyPanel = panel;
}

/**
* @deprecated Replaced with isAutoHideSupported. Will be removed in a future release.
*/
@Deprecated(since = "0.12.0", forRemoval = true)
public boolean isPinningSupported() {
if (supportedToolbars.isEmpty()) {
return false;
}
return autoHideSupported;
}

/**
* Check if auto hide is supported on this root
*
Expand All @@ -151,14 +140,6 @@ public boolean isAutoHideSupported() {
return autoHideSupported;
}

/**
* @deprecated Replaced with setAutoHideSupported. Will be removed in a future release.
*/
@Deprecated(since = "0.12.0", forRemoval = true)
public void setPinningSupported(boolean supported) {
autoHideSupported = supported;
}

/**
* Set auto hide supported flag
*
Expand All @@ -168,14 +149,6 @@ public void setAutoHideSupported(boolean supported) {
autoHideSupported = supported;
}

/**
* @deprecated Replaced with getAutoHideLayer. Will be removed in a future release.
*/
@Deprecated(since = "0.12.0", forRemoval = true)
public int getPinningLayer() {
return autoHideLayer;
}

/**
* Get the layer that is being used for auto hide
*
Expand All @@ -185,14 +158,6 @@ public int getAutoHideLayer() {
return autoHideLayer;
}

/**
* @deprecated Replaced with setAutoHideLayer. Will be removed in a future release.
*/
@Deprecated(since = "0.12.0", forRemoval = true)
public void setPinningLayer(int layer) {
autoHideLayer = layer;
}

/**
* Set the auto hide layer used for auto hide dockable toolbars
*
Expand Down
20 changes: 10 additions & 10 deletions docking-single-app/src/ModernDocking/app/Docking.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,24 +152,24 @@ public static void deregisterAllDockingPanels() {
}

/**
* allows the user to configure pinning per window. by default pinning is only enabled on the frames the docking framework creates
* allows the user to configure auto hide per window. by default auto hide is only enabled on the frames the docking framework creates
*
* @param window The window to configure pinning on
* @param layer The layout to use for pinning in the JLayeredPane
* @param allow Whether pinning is allowed on this Window
* @param window The window to configure auto hide on
* @param layer The layout to use for auto hide in the JLayeredPane
* @param allow Whether auto hide is allowed on this Window
*/
public static void configurePinning(Window window, int layer, boolean allow) {
instance.configurePinning(window, layer, allow);
public void configureAutoHide(Window window, int layer, boolean allow) {
instance.configureAutoHide(window, layer, allow);
}

/**
* Check if pinning is allowed for a dockable
* Check if auto hide is allowed for a dockable
*
* @param dockable Dockable to check
* @return Whether the dockable can be pinned
* @return Whether the dockable can be auto hide
*/
public static boolean pinningAllowed(Dockable dockable) {
return instance.pinningAllowed(dockable);
public static boolean autoHideAllowed(Dockable dockable) {
return instance.autoHideAllowed(dockable);
}

/**
Expand Down

0 comments on commit 9c05e35

Please sign in to comment.