Class StandardButtonShaper

    • Constructor Detail

      • StandardButtonShaper

        public StandardButtonShaper()
    • Method Detail

      • getButtonOutline

        public GeneralPath getButtonOutline​(AbstractButton button,
                                            Insets insets,
                                            int width,
                                            int height,
                                            boolean isInner)
        Description copied from interface: SubstanceButtonShaper
        Returns the outline path for the specified button.
        Specified by:
        getButtonOutline in interface SubstanceButtonShaper
        Parameters:
        button - A button.
        insets - Button insets.
        width - Button width.
        height - Button height.
        isInner - Indication whether the returned outline is used for the inner contour.
        Returns:
        The outline path for the specified button.
      • getPreferredSize

        public Dimension getPreferredSize​(AbstractButton button,
                                          Dimension uiPreferredSize)
        Description copied from interface: SubstanceButtonShaper
        Returns the preferred size for the specified button.
        Specified by:
        getPreferredSize in interface SubstanceButtonShaper
        Parameters:
        button - A button.
        uiPreferredSize - Preferred size of the button under the regular conditions (plain rectangular button).
        Returns:
        The preferred size for the specified button.
      • isRoundButton

        public static boolean isRoundButton​(AbstractButton button)
        Returns indication whether the specified button should be drawn with completely round corners.
        Parameters:
        button - A button.
        Returns:
        true if the specified button should be drawn with completely round corners, false otherwise.
      • isProportionate

        public boolean isProportionate()
        Description copied from interface: SubstanceButtonShaper
        Returns the boolean indication whether the shaper should maintain button proportions on the resize. This may be relevant for vector-based shapers (such as animals / other objects).
        Specified by:
        isProportionate in interface SubstanceButtonShaper
        Returns:
        true if this shaper should maintain button proportions on the resize, false otherwise.