Class TabPanePropertiesDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class TabPanePropertiesDialog extends PropertiesDialog
A PropertiesDialog implementation that generates the "classic" properties dialog, with a separate tab for each major category of properties, and header labels used to separate the subcategories.
Since:
swing-extras 2.8 (refactored from older code)
Author:
scorbo2
See Also:
  • Constructor Details

    • TabPanePropertiesDialog

      public TabPanePropertiesDialog(Window owner, String title, List<AbstractProperty> properties, boolean alwaysShowSubcategoryLabels)
      It's generally preferable to use the create factory methods in the parent PropertiesDialog class, but you can directly instantiate this class if you want.
      Parameters:
      owner - the parent window for this dialog
      title - the title to show in the dialog header
      properties - the list of properties to show in this dialog. Refer to the PropertiesManager Javadocs for details on how properties are categorized and subcategorized.
      alwaysShowSubcategoryLabels - if true, subcategory header labels will be shown even if there's only one subcategory (which would be redundant with the tab header). If false, subcategory header labels will only be shown if there are multiple subcategories within a category.
  • Method Details

    • populateFormPanels

      protected void populateFormPanels()
      In this PropertiesDialog implementation, we treat every top-level category as a separate tab, and we show header labels for the subcategories within each tab. You can control whether subcategory labels should be shown in the case where there's only one subcategory (which would be redundant with the tab header) by setting the alwaysShowSubcategoryLabels flag in the constructor.
      Specified by:
      populateFormPanels in class PropertiesDialog
    • initLayout

      protected void initLayout()
      Lay out our FormPanels into our tabbed pane.
      Specified by:
      initLayout in class PropertiesDialog
    • makeFormPanelVisible

      protected void makeFormPanelVisible(FormPanel formPanel)
      Activates the tab that represents the given FormPanel. This is invoked by the parent class to show validation errors.
      Specified by:
      makeFormPanelVisible in class PropertiesDialog
      Parameters:
      formPanel - The FormPanel that should be made visible.