Class SplitPaneToggleVisibilitySupport
java.lang.Object
com.inductiveautomation.ignition.designer.gui.SplitPaneToggleVisibilitySupport
- All Implemented Interfaces:
ClientPropertyAware
For a SplitPane that you want to have the visibility of one of the two components set in the SplitPane to be
toggled between being visible and being not visible, you can use this class to provide that capability.
var support = new SplitPaneToggleVisibilitySupport(
splitPane, // a SplitPane that already has the left/top and right/bottom component set
HideOption.LEFT_OR_TOP, // we will hide/show the left/top component
false, // we will hide the left/top component initially
0.25 // the default proportional divider position when both components are shown for the first time
);
// we toggle between hiding and showing the left/top component
button.addActionListener(e -> support.toggleVisibility());
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSplitPaneToggleVisibilitySupport
(SplitPaneToggleVisibilitySupport.HideOption hideOption, boolean componentToHideIsVisible, double initialProportionalLocation) SplitPaneToggleVisibilitySupport
(SplitPaneToggleVisibilitySupport.HideOption hideOption, boolean componentToHideIsVisible, double initialProportionalLocation, int dividerSize) SplitPaneToggleVisibilitySupport
(JSplitPane splitPane, SplitPaneToggleVisibilitySupport.HideOption hideOption, boolean componentToHideIsVisible, double initialProportionalLocation) -
Method Summary
Modifier and TypeMethodDescriptiongetClientProperty
(Object key) void
initialize
(int orientation, Component topOrLeftComponent, Component bottomOrRightComponent) initialize
(int orientation, Component topOrLeftComponent, Component bottomOrRightComponent, boolean isOneTouchExpandable) initialize
(int orientation, Component topOrLeftComponent, Component bottomOrRightComponent, int dividerSize, boolean isOneTouchExpandable) static void
void
putClientProperty
(Object key, Object value) void
void
-
Constructor Details
-
SplitPaneToggleVisibilitySupport
public SplitPaneToggleVisibilitySupport(SplitPaneToggleVisibilitySupport.HideOption hideOption, boolean componentToHideIsVisible, double initialProportionalLocation) -
SplitPaneToggleVisibilitySupport
public SplitPaneToggleVisibilitySupport(SplitPaneToggleVisibilitySupport.HideOption hideOption, boolean componentToHideIsVisible, double initialProportionalLocation, int dividerSize) -
SplitPaneToggleVisibilitySupport
public SplitPaneToggleVisibilitySupport(JSplitPane splitPane, SplitPaneToggleVisibilitySupport.HideOption hideOption, boolean componentToHideIsVisible, double initialProportionalLocation)
-
-
Method Details
-
toggleVisibility
public void toggleVisibility() -
hideComponent
public void hideComponent() -
showComponent
public void showComponent() -
initialize
public JSplitPane initialize(int orientation, Component topOrLeftComponent, Component bottomOrRightComponent) -
initialize
public JSplitPane initialize(int orientation, Component topOrLeftComponent, Component bottomOrRightComponent, boolean isOneTouchExpandable) -
initialize
public JSplitPane initialize(int orientation, Component topOrLeftComponent, Component bottomOrRightComponent, int dividerSize, boolean isOneTouchExpandable) -
putClientProperty
- Specified by:
putClientProperty
in interfaceClientPropertyAware
-
getClientProperty
- Specified by:
getClientProperty
in interfaceClientPropertyAware
-
main
-