Class PageOption

All Implemented Interfaces:
Serializable<Boolean>

public class PageOption extends ParentOption
A page option that serves as a container for organizing options into pages

PageOption extends ParentOption and provides page-based navigation

When a page is selected, only options belonging to that page are shown
  • Constructor Details

    • PageOption

      public PageOption(BaseModule owner, String name, String description)
      Creates a new page option
      Parameters:
      owner - The module that owns this option
      name - The name of this option
      description - The description of this option
  • Method Details

    • isSelected

      public boolean isSelected()
      Gets whether this page is currently selected
      Returns:
      true if selected, false otherwise
    • setSelected

      public void setSelected(boolean selected)
      Sets whether this page is currently selected
      Parameters:
      selected - true to select, false to deselect
    • toJson

      public com.google.gson.JsonObject toJson()
      Specified by:
      toJson in interface Serializable<Boolean>
      Overrides:
      toJson in class ParentOption
      Returns:
      The object as a JsonObject
    • fromJson

      public Boolean fromJson(com.google.gson.JsonObject object)
      Specified by:
      fromJson in interface Serializable<Boolean>
      Overrides:
      fromJson in class ParentOption
      Parameters:
      object - The JsonObject to deserialize
      Returns:
      The deserialized object