Class WindowSkin

    • Constructor Detail

      • WindowSkin

        public WindowSkin()
        Default and only constructor - set the default color.
    • 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
      • mouseDown

        public boolean mouseDown​(Container container,
                                 Mouse.Button button,
                                 int x,
                                 int y)
        Description copied from interface: ContainerMouseListener
        Called when the mouse is pressed over a container.
        Specified by:
        mouseDown in interface ContainerMouseListener
        Overrides:
        mouseDown in class ContainerSkin
        Parameters:
        container - The container under the mouse.
        button - Which button was pressed.
        x - The X-position of the mouse.
        y - The Y-position of the mouse.
        Returns:
        true to consume the event; false to allow it to propagate.
      • contentChanged

        public void contentChanged​(Window window,
                                   Component previousContent)
        Description copied from interface: WindowListener
        Called when a window's content component has changed.
        Specified by:
        contentChanged in interface WindowListener
        Parameters:
        window - The window whose content has changed.
        previousContent - What the window's content was previously.
      • windowClosed

        public void windowClosed​(Window window,
                                 Display display,
                                 Window owner)
        Description copied from interface: WindowStateListener
        Called when a window has closed.
        Specified by:
        windowClosed in interface WindowStateListener
        Parameters:
        window - The window that is now closed.
        display - The display in which the window was shown.
        owner - The owner of this window (which could be null).