Class StyleClassStep

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, org.pietschy.wizard.WizardStep, PluginWizardStepListener

public class StyleClassStep extends StyleStep
Style editor step for displays that use style classes to style agents.
Author:
Nick Collier, Eric Tatara TODO Add a slider on the agent list
See Also:
  • Field Details

  • Constructor Details

    • StyleClassStep

      public StyleClassStep()
  • Method Details

    • getStylePanel

      protected JPanel getStylePanel()
      Description copied from class: StyleStep
      Provide a JPanel with style editing capabilities.
      Specified by:
      getStylePanel in class StyleStep
      Returns:
      the style editor panel
    • agentListChanged

      protected void agentListChanged(StyleStep.AgentTypeElement element)
      Description copied from class: StyleStep
      Do something whenever the agent list changes to a new value through selection.
      Specified by:
      agentListChanged in class StyleStep
    • setCurrentElementValues

      protected void setCurrentElementValues()
      Description copied from class: StyleStep
      Set the values of the current element in the agent list when another element in the list is selected.
      Specified by:
      setCurrentElementValues in class StyleStep
    • applyChanges

      public void applyChanges()
      Description copied from class: StyleStep
      Apply the editor changes to the DisplayDescriptor.
      Specified by:
      applyChanges in class StyleStep
    • initialize

      public void initialize()
      Description copied from class: StyleStep
      Initialize sub classes.
      Specified by:
      initialize in class StyleStep
    • checkForStyleEditor

      protected boolean checkForStyleEditor(DisplayDescriptor descriptor)
      Returns true if the display type in the descriptor supports edited styles.
      Parameters:
      descriptor -
      Returns:
    • findStylesForDisplay

      protected List<String> findStylesForDisplay(DisplayDescriptor descriptor)
      Finds all classes that implement the style interface for the type in the descriptor.
      Parameters:
      descriptor -
      Returns:
    • getDefaultStyle

      protected String getDefaultStyle(DisplayDescriptor descriptor)
      Provides the default style class name for the display defined in the descriptor.
      Parameters:
      descriptor -
      Returns:
    • getDefaultBackgroundColorForDisplay

      protected Color getDefaultBackgroundColorForDisplay(DisplayDescriptor descriptor)
    • getEditedStyleClassForDisplay

      protected String getEditedStyleClassForDisplay(DisplayDescriptor descriptor, EditedStyleData editedStyledata)
      Returns the class name for edited styles based on the display type in the descriptor.
      Parameters:
      descriptor -
      Returns:
    • findStylesFor

      protected List<String> findStylesFor(Class<?> styleInterface, String defaultStyle)
      Provides a list of available style classes (including default) for the specified interface.
      Parameters:
      styleInterface -
      Returns:
    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
    • setShowBackgroundButton

      public void setShowBackgroundButton(boolean showBackgroundButton)