Class EnhancedTabbedPane.CloseableTab

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Enclosing class:
EnhancedTabbedPane

public static class EnhancedTabbedPane.CloseableTab extends JPanel
Custom component to represent a tab with a title and a close button
See Also:
  • Constructor Details

    • CloseableTab

      public CloseableTab(EnhancedTabbedPane parentPane, String title, Component component)
      Creates a new closeable tab with the specified title
      Parameters:
      parentPane - The parent tabbed pane
      title - The title to display
      component - The component associated with this tab
  • Method Details

    • close

      public void close(MouseEvent e)
      Perform the close action
      Parameters:
      e - The mouse event that triggered the close action
    • setTitle

      public void setTitle(String title)
      Sets the title of this tab
      Parameters:
      title - The new title to set
    • setBold

      public void setBold(boolean bold)
      Sets the font style of the title label to bold or plain
      Parameters:
      bold -
    • setDirty

      public void setDirty(boolean dirty)
      Sets the visual dirty state of this tab and updates the icon accordingly
      Parameters:
      dirty -
    • getTitle

      public String getTitle()
      Gets the title of this tab
      Returns:
      The title of this tab
    • isTabSelected

      public boolean isTabSelected()
      Checks if this tab is selected
      Returns:
      True if this tab is selected, false otherwise
    • getComponent

      public Component getComponent()
      Gets the component associated with this tab
      Returns:
      The component associated with this tab
    • setParentPane

      public void setParentPane(EnhancedTabbedPane parentPane)
      Sets the parent pane of this tab
      Parameters:
      parentPane - The parent pane to set
    • getParentPane

      public EnhancedTabbedPane getParentPane()
      Gets the parent pane of this tab
      Returns:
      The parent pane of this tab