Interface Style

  • All Known Subinterfaces:
    BleedMarginStyle, LineStyle, OpacityStyle, OutlineStyle, ShadowStyle, ShapeStyle, UserBleedMarginStyle
    All Known Implementing Classes:
    BleedMarginStylePanel, CardFace, Curve, CustomTile, Deck, Line, TextBox

    public interface Style
    This is a marker interface extended by all interfaces for getting or setting a type of style information. Each Style subinterface defines a collection of getters and setters that together are used to control the parameters of that style. For example, the LineStyle defines getters and setters for the line width, colour, dash pattern, and so on.

    No two styles can share a common method name. For example, the OutlineStyle also defines a style dealing with lines (outlines of objects), but it uses distinct method names so that an item (or group of items) can implement both styles.

    The style information for one or more PageItems can be read and written between different classes that have one or more Style interface(s) in common using a StyleCapture. This allows you to, for example, capture the style of one object and then apply it to other objects.

    To add a new kind of editable page item style that can be edited by the user, you must define both a Style subinterface the defines the getters and setters needed to modify the style and a StylePanel class that provides the interface controls to edit the style. The framework will take care of the rest: if a page item is selected that implements your Style, then the user will have the option to edit the item's style and a suitable interface control will be created using StylePanelFactory.

    Since:
    3.0
    Author:
    Chris Jennings