Class JRibbonComponent

    • Constructor Detail

      • JRibbonComponent

        public JRibbonComponent​(JComponent mainComponent)
        Creates a simple wrapper with no icon and no caption.
        Parameters:
        mainComponent - Wrapped component. Can not be null.
        Throws:
        IllegalArgumentException - if mainComponent is null.
      • JRibbonComponent

        public JRibbonComponent​(ResizableIcon icon,
                                String caption,
                                JComponent mainComponent)
        Creates a wrapper with an icon and a caption.
        Parameters:
        icon - Wrapper icon. Can be null.
        caption - Wrapper caption. Can not be null.
        mainComponent - Wrapped component. Can not be null.
        Throws:
        IllegalArgumentException - if caption or mainComponent is null.
    • Method Detail

      • setCaption

        public void setCaption​(String caption)
        Sets new value for the caption of this wrapper component.
        Parameters:
        caption - The new caption.
      • getMainComponent

        public JComponent getMainComponent()
        Returns the wrapped component of this wrapper component. The result is guaranteed to be non null.
        Returns:
        The wrapped component of this wrapper component.
      • isSimpleWrapper

        public boolean isSimpleWrapper()
        Returns indication whether this wrapper is simple.
        Returns:
        true if both getIcon() and getCaption() return null, false otherwise.
      • getKeyTip

        public String getKeyTip()
        Returns the key tip for this wrapper component.
        Returns:
        The key tip for this wrapper component.
        See Also:
        setKeyTip(String)
      • setKeyTip

        public void setKeyTip​(String keyTip)
        Sets the specified string to be the key tip for this wrapper component. Fires a keyTip property change event.
        Parameters:
        keyTip - The new key tip for this wrapper component.
      • setRichTooltip

        public void setRichTooltip​(RichTooltip richTooltip)
        Sets the rich tooltip for this wrapper component.
        Parameters:
        richTooltip -
        See Also:
        getRichTooltip(MouseEvent)
      • setHorizontalAlignment

        public void setHorizontalAlignment​(HorizontalAlignment horizontalAlignment)
        Sets the specified parameter to be the horizontal alignment for this wrapper component.
        Parameters:
        horizontalAlignment - The new horizontal alignment for this wrapper component.
        See Also:
        getHorizontalAlignment()
      • isResizingAware

        public boolean isResizingAware()
      • setResizingAware

        public void setResizingAware​(boolean isResizingAware)