GT-1 removed return value on setEnabled() in DockingAction

This commit is contained in:
ghidravore
2020-07-24 15:22:39 -04:00
parent 38af2fbff2
commit a3ea51aff8
5 changed files with 9 additions and 12 deletions
@@ -305,7 +305,8 @@ public class TableComponentProvider<T> extends ComponentProviderAdapter
return; return;
} }
boolean wasEnabled = selectionNavigationAction.setEnabled(false); // disable navigation events from updates boolean wasEnabled = selectionNavigationAction.isEnabled();
selectionNavigationAction.setEnabled(false); // disable navigation events from updates
int[] selectedRows = threadedTable.getSelectedRows(); int[] selectedRows = threadedTable.getSelectedRows();
@@ -74,12 +74,11 @@ public abstract class AbstractSelectionNavigationAction extends ToggleDockingAct
@Override @Override
// overridden to toggle the selection listener when the action is disabled // overridden to toggle the selection listener when the action is disabled
public boolean setEnabled(boolean enable) { public void setEnabled(boolean enable) {
boolean oldValue = super.setEnabled(enable); super.setEnabled(enable);
boolean installListener = enable && isSelected(); boolean installListener = enable && isSelected();
toggleSelectionListening(installListener); toggleSelectionListening(installListener);
return oldValue;
} }
@Override @Override
@@ -123,9 +123,8 @@ public class DockingActionProxy
} }
@Override @Override
public boolean setEnabled(boolean newValue) { public void setEnabled(boolean newValue) {
boolean oldValue = dockingAction.setEnabled(newValue); dockingAction.setEnabled(newValue);
return oldValue;
} }
@Override @Override
@@ -217,13 +217,12 @@ public abstract class DockingAction implements DockingActionIf {
} }
@Override @Override
public boolean setEnabled(boolean newValue) { public void setEnabled(boolean newValue) {
if (isEnabled == newValue) { if (isEnabled == newValue) {
return isEnabled; return;
} }
isEnabled = newValue; isEnabled = newValue;
firePropertyChanged(ENABLEMENT_PROPERTY, !isEnabled, isEnabled); firePropertyChanged(ENABLEMENT_PROPERTY, !isEnabled, isEnabled);
return !isEnabled;
} }
@Override @Override
@@ -113,9 +113,8 @@ public interface DockingActionIf extends HelpDescriptor {
* Enables or disables the action * Enables or disables the action
* *
* @param newValue true to enable the action, false to disable it * @param newValue true to enable the action, false to disable it
* @return the enabled value of the action after this call
*/ */
public boolean setEnabled(boolean newValue); public void setEnabled(boolean newValue);
/** /**
* Sets whether or not this action should be activated using the default tool context if the * Sets whether or not this action should be activated using the default tool context if the