public class UISettingsBean extends Object implements UISettings
This implementation of the UISettings can be used to modify the settings with
StructureConfiguration.setUISettings(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project, com.almworks.jira.structure.api.settings.UISettings).
This class is not thread safe, it should be a short-term object that is filled with
values, passed to StructureConfiguration and forgotten.
In addition to implementing UISettings, this class has public setter methods
that allow to change the setting values.
| Constructor and Description |
|---|
UISettingsBean()
Creates an empty bean, with no settings set.
|
UISettingsBean(UISettings copyFrom)
Creates a new bean and copies all set values from another instance of UISettings.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getAutoCollapseStructurePanel()
Returns true if Structure panel on the issue page should automatically collapse/minimize when the displayed
issue is not present in the initially selected structure.
|
AutoSwitchStrategy |
getAutoSwitchStrategy(StructurePage page)
Returns auto-switch strategy for the specified page.
|
Boolean |
getKeepStructureWhileNavigating()
Returns true if the structure selection should be kept when the user clicks on an issue in the Structure widget.
|
boolean |
isAnythingSet()
Utility method that is used to check whether this instance does not have any settings set
at all.
|
void |
setAutoCollapseStructurePanel(Boolean autoCollapseStructurePanel) |
UISettingsBean |
setAutoSwitchStrategy(StructurePage page,
AutoSwitchStrategy strategy)
Changes auto-switch strategy for the given page.
|
void |
setKeepStructureWhileNavigating(Boolean keepStructureWhileNavigating) |
public UISettingsBean()
public UISettingsBean(@Nullable
UISettings copyFrom)
copyFrom - another instance of UISettings, null is ignored@Nullable public AutoSwitchStrategy getAutoSwitchStrategy(@NotNull StructurePage page)
UISettingsgetAutoSwitchStrategy in interface UISettingspage - structure page that is being loaded, currently only StructurePage.ISSUE_VIEW,
StructurePage.PROJECT_TAB, StructurePage.COMPONENT_TAB and StructurePage.VERSION_TAB
make sense.null if not set@NotNull public UISettingsBean setAutoSwitchStrategy(@NotNull StructurePage page, @Nullable AutoSwitchStrategy strategy)
page - the page to change auto-switch forstrategy - the new strategy, or null to un-set the option for that pagegetAutoSwitchStrategy(com.almworks.jira.structure.api.settings.StructurePage)public Boolean getAutoCollapseStructurePanel()
UISettingsgetAutoCollapseStructurePanel in interface UISettingsnull if the settings is unknownpublic Boolean getKeepStructureWhileNavigating()
UISettingsReturns true if the structure selection should be kept when the user clicks on an issue in the Structure widget.
This allows the user to go from one issue to another, looking at the Structure panel, and the structure displayed will remain the same. If the user opens an issue page by any other means, the structure will be selected according to other settings.
The default value for this setting (in case null is returned) is true.
getKeepStructureWhileNavigating in interface UISettingspublic void setKeepStructureWhileNavigating(Boolean keepStructureWhileNavigating)
public void setAutoCollapseStructurePanel(Boolean autoCollapseStructurePanel)
public boolean isAnythingSet()
UISettingsisAnythingSet in interface UISettingsCopyright © 2018 ALM Works. All Rights Reserved.