Interface StylePanel<S extends Style>

  • Type Parameters:
    S - the Style interface edited by this panel
    All Known Implementing Classes:
    AbstractStylePanel, BleedMarginStylePanel

    public interface StylePanel<S extends Style>
    A style panel is an interface component that allows the user to edit a Style. The dialog for editing an item's style is built by creating a style panel for each of the style interfaces that the item implements.
    Since:
    3.0
    Author:
    Chris Jennings
    • Method Detail

      • getTitle

        java.lang.String getTitle()
        Returns a localized title that describes the style edited by this panel.
        Returns:
        the name of the edited style
      • getPanelComponent

        java.awt.Component getPanelComponent()
        Returns the component (typically a JPanel) that contains the controls used to edit the style.
        Returns:
        the editing control
      • populatePanelFromCapture

        void populatePanelFromCapture​(StyleCapture capture)
        Copies the current state of a capture into the controls on this panel.
        Parameters:
        capture - updates the panel controls to reflect the capture
      • populateCaptureFromPanel

        void populateCaptureFromPanel​(StyleCapture capture)
        Copies the current state of the panel controls into a capture.
        Parameters:
        capture - the capture to copy this panel state into
      • getPanelGroup

        int getPanelGroup()
        Returns the group that his panel belongs to. The group number determines the order that the style panels are presented in.
        Returns:
        the group number for this panel
      • setCallback

        void setCallback​(StylePanel.StyleEditorCallback callback)
        The style editor that has created this panel will call this method with a callback instance. The instance should be used to notify the editor that the style information in the panel has changed by calling the StylePanel.StyleEditorCallback.styleChanged() method. Style panels should gracefully handle the case where a callback is not set in case the panel is used for other purposes.
        Parameters:
        callback - the callback that the panel must notify