Class MovieViewSkin

    • Constructor Detail

      • MovieViewSkin

        public MovieViewSkin()
    • 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 ComponentSkin
        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
        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
        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
      • paint

        public void paint​(java.awt.Graphics2D graphics)
        Description copied from interface: Visual
        Paints the visual.
        Specified by:
        paint in interface Visual
        Parameters:
        graphics - The graphics context in which to paint the visual.
      • isFocusable

        public final boolean isFocusable()
        Description copied from class: ComponentSkin
        By default, skins are focusable.
        Specified by:
        isFocusable in interface Skin
        Overrides:
        isFocusable in class ComponentSkin
        Returns:
        false; movie views are not focusable.
      • isOpaque

        public final boolean isOpaque()
        Description copied from class: ComponentSkin
        By default, skins are assumed to be opaque.
        Specified by:
        isOpaque in interface Skin
        Overrides:
        isOpaque in class ComponentSkin
        Returns:
        true if this skin is opaque; false if any part of it is transparent or translucent.
      • getBackgroundColor

        public final java.awt.Color getBackgroundColor()
      • setBackgroundColor

        public final void setBackgroundColor​(java.awt.Color backgroundColor)
      • setBackgroundColor

        public final void setBackgroundColor​(java.lang.String backgroundColor)
      • getScale

        public final float getScale()
      • setScale

        public final void setScale​(float scale)
      • setHorizontalAlignment

        public final void setHorizontalAlignment​(HorizontalAlignment horizontalAlignment)
      • setVerticalAlignment

        public final void setVerticalAlignment​(VerticalAlignment verticalAlignment)
      • movieChanged

        public void movieChanged​(MovieView movieView,
                                 Movie previousMovie)
        Description copied from interface: MovieViewListener
        Called when an movie view's movie has changed.
        Specified by:
        movieChanged in interface MovieViewListener
        Parameters:
        movieView - The move view that has changed.
        previousMovie - The previous movie content.