Class AbstractCardPanel

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, com.globalmentor.model.MutableValued<Component>, com.globalmentor.model.Valued<Component>, io.clogr.Clogged, Box, CardContainer, CardControl, Component, CompositeComponent, Container, ContainerControl, Control, InputFocusableComponent, LayoutComponent, ListSelectControl<Component>, Panel, SelectControl<Component>, ValueControl<Component>, ValuedComponent<Component>, GuiseEventListener, ListListenable<Component>, NavigationListener, Displayable, Enableable, InfoModel, LabelModel, ListSelectModel<Component>, Model, SelectModel<Component>, PresentationModel, ValueModel<Component>, DepictedObject, Iterable<Component>, Collection<Component>, EventListener, List<Component>
Direct Known Subclasses:
CardPanel, SequenceCardPanel, TabbedPanel

public abstract class AbstractCardPanel extends AbstractListSelectContainerControl implements Panel, CardControl, NavigationListener
An abstract panel with a card layout. The component valid status is updated before a change in the ValueModel.VALUE_PROPERTY or the ValueModel.VALIDATOR_PROPERTY is fired. If bookmarks are enabled, this component supports bookmarks using this component's name and the name of any selectected cards.
Author:
Garret Wilson
See Also:
  • Constructor Details

    • AbstractCardPanel

      protected AbstractCardPanel(CardLayout layout)
      Layout constructor.
      Parameters:
      layout - The layout definition for the container.
      Throws:
      NullPointerException - if the given layout is null.
  • Method Details

    • getLayout

      public CardLayout getLayout()
      Specified by:
      getLayout in interface CardContainer
      Specified by:
      getLayout in interface LayoutComponent
      Overrides:
      getLayout in class AbstractListSelectContainerControl
      Returns:
      The layout definition for the container.
    • isBookmarkEnabled

      public boolean isBookmarkEnabled()
      Returns:
      Whether the component has bookmarks enabled.
    • setBookmarkEnabled

      public void setBookmarkEnabled(boolean newBookmarkEnabled)
      Sets whether the component is has bookmarks enabled. This is a bound property of type Boolean.
      Parameters:
      newBookmarkEnabled - true if the component should support bookmarking, else false.
      See Also:
    • updateBookmark

      protected void updateBookmark()
      Updates the bookmark if bookmarks are enabled.
      See Also:
    • getComponent

      protected Component getComponent(Bookmark bookmark)
      Determines the component for navigation based upon the given bookmark. A bookmark parameter with a value of the empty string is considered to indicate the null value. Child components may override this method to select a different bookmark based upon whether components are enabled, for example.
      Parameters:
      bookmark - The bookmark for which a component should be returned, or null if no bookmark is available.
      Returns:
      The child component indicated by the given bookmark parameter value, or null if the given bookmark represents the null component value.