Interface StylePanel<S extends Style>
-
- Type Parameters:
S- theStyleinterface 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 aStyle. 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceStylePanel.StyleEditorCallbackAn object of this type will be passed to theStylePanelafter it is created.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.ComponentgetPanelComponent()Returns the component (typically aJPanel) that contains the controls used to edit the style.intgetPanelGroup()Returns the group that his panel belongs to.java.lang.StringgetTitle()Returns a localized title that describes the style edited by this panel.voidpopulateCaptureFromPanel(StyleCapture capture)Copies the current state of the panel controls into a capture.voidpopulatePanelFromCapture(StyleCapture capture)Copies the current state of a capture into the controls on this panel.voidsetCallback(StylePanel.StyleEditorCallback callback)The style editor that has created this panel will call this method with a callback instance.
-
-
-
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 aJPanel) 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 theStylePanel.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
-
-