Class TerraPanoramaSkin

    • Constructor Detail

      • TerraPanoramaSkin

        public TerraPanoramaSkin()
    • Method Detail

      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class ContainerSkin
        Parameters:
        component - The component to which the skin is being attached.
      • getPreferredWidth

        public int getPreferredWidth​(int height)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred width given the provided height constraint.
        Specified by:
        getPreferredWidth in interface ConstrainedVisual
        Overrides:
        getPreferredWidth in class ContainerSkin
        Parameters:
        height - The height by which to constrain the preferred width, or -1 for no constraint.
        Returns:
        The preferred width given the height constraint.
      • getPreferredHeight

        public int getPreferredHeight​(int width)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred height given the provided width constraint.
        Specified by:
        getPreferredHeight in interface ConstrainedVisual
        Overrides:
        getPreferredHeight in class ContainerSkin
        Parameters:
        width - The width by which to constrain the preferred height, or -1 for no constraint.
        Returns:
        The preferred height given the width constraint.
      • layout

        public void layout()
        Description copied from interface: Skin
        If the component on which the skin is installed is a container, lays out the container's children.
        Specified by:
        layout in interface Skin
      • getViewportBounds

        public Bounds getViewportBounds()
        Specified by:
        getViewportBounds in interface Viewport.Skin
        Returns:
        The bounds of the Viewport within the container, for example, in ScrollPaneSkin, this excludes the scrollbars.
      • mouseWheel

        public boolean mouseWheel​(Component component,
                                  Mouse.ScrollType scrollType,
                                  int scrollAmount,
                                  int wheelRotation,
                                  int x,
                                  int y)
        Description copied from interface: ComponentMouseWheelListener
        Called when the mouse wheel is scrolled over a component.
        Specified by:
        mouseWheel in interface ComponentMouseWheelListener
        Overrides:
        mouseWheel in class ComponentSkin
        Parameters:
        component - Component under the mouse pointer.
        scrollType - What type of scroll was requested on the mouse.
        scrollAmount - Amount of scrolling.
        wheelRotation - Rotation value.
        x - X position of the mouse.
        y - Y position of the mouse.
        Returns:
        true to consume the event; false to allow it to propagate.
      • getButtonColor

        public java.awt.Color getButtonColor()
      • setButtonColor

        public void setButtonColor​(java.awt.Color buttonColor)
      • setButtonColor

        public final void setButtonColor​(java.lang.String buttonColor)
      • getButtonBackgroundColor

        public java.awt.Color getButtonBackgroundColor()
      • setButtonBackgroundColor

        public void setButtonBackgroundColor​(java.awt.Color buttonBackgroundColor)
      • setButtonBackgroundColor

        public final void setButtonBackgroundColor​(java.lang.String buttonBackgroundColor)
      • setButtonBackgroundColor

        public final void setButtonBackgroundColor​(int buttonBackgroundColor)
      • getButtonPadding

        public int getButtonPadding()
      • setButtonPadding

        public void setButtonPadding​(int buttonPadding)
      • setButtonPadding

        public final void setButtonPadding​(java.lang.Number padding)
      • getAlwaysShowScrollButtons

        public boolean getAlwaysShowScrollButtons()
      • setAlwaysShowScrollButtons

        public void setAlwaysShowScrollButtons​(boolean alwaysShowScrollButtons)
      • getMaxScrollTop

        protected int getMaxScrollTop()
      • getMaxScrollLeft

        protected int getMaxScrollLeft()
      • updateScrollButtonVisibility

        protected void updateScrollButtonVisibility()
      • scrollTopChanged

        public void scrollTopChanged​(Viewport panorama,
                                     int previousScrollTop)
        Description copied from interface: ViewportListener
        Called when a viewport's scroll top has changed.
        Specified by:
        scrollTopChanged in interface ViewportListener
        Parameters:
        panorama - The viewport that has scrolled.
        previousScrollTop - The previous top scroll position.
      • scrollLeftChanged

        public void scrollLeftChanged​(Viewport panorama,
                                      int previousScrollLeft)
        Description copied from interface: ViewportListener
        Called when a viewport's scroll left has changed.
        Specified by:
        scrollLeftChanged in interface ViewportListener
        Parameters:
        panorama - The viewport that has been scrolled.
        previousScrollLeft - The previous left scroll position.
      • viewChanged

        public void viewChanged​(Viewport panorama,
                                Component previousView)
        Description copied from interface: ViewportListener
        Called when a viewport's view component has changed.
        Specified by:
        viewChanged in interface ViewportListener
        Parameters:
        panorama - The viewport whose view has changed.
        previousView - What the view (or the scrollable component) used to be.