Class WLink.Builder

  • Enclosing class:
    WLink

    public static class WLink.Builder
    extends Object
    This class allows building of WLink in a fluent interface style. It will use a default window name if window name is not supplied along with other attributes.
    • Constructor Detail

      • Builder

        public Builder()
        Creates a builder with no attributes set.
      • Builder

        public Builder​(String text,
                       String url)
        Creates a builder preconfigured with the given link text and URL.
        Parameters:
        text - the link text.
        url - the link url.
    • Method Detail

      • windowName

        public WLink.Builder windowName​(String windowName)
        Sets the target window name.
        Parameters:
        windowName - the target window name.
        Returns:
        this builder.
      • width

        public WLink.Builder width​(int width)
        Sets the target window's width.
        Parameters:
        width - the window width, in pixels.
        Returns:
        this builder.
      • height

        public WLink.Builder height​(int height)
        Sets the target window's height.
        Parameters:
        height - the window height, in pixels.
        Returns:
        this builder.
      • resizable

        public WLink.Builder resizable​(boolean val)
        Sets whether the target window should be able to be resized.
        Parameters:
        val - true if the window should be resizable, false if not.
        Returns:
        this builder.
      • scrollbars

        public WLink.Builder scrollbars​(boolean val)
        Sets whether the target window should have scrollbars visible.
        Parameters:
        val - true if the window should have scrollbars visible, false if not.
        Returns:
        this builder.
      • toolbar

        public WLink.Builder toolbar​(boolean val)
        Sets whether the target window should have the browser toolbar visible.
        Parameters:
        val - true if the window should have the toolbar visible, false if not.
        Returns:
        this builder.
      • location

        public WLink.Builder location​(boolean val)
        Sets whether the target window should have the browser location input field visible.
        Parameters:
        val - true if the window should have the location visible, false if not.
        Returns:
        this builder.
      • directories

        public WLink.Builder directories​(boolean val)
        Sets whether the target window should contain the standard browser directory buttons.
        Parameters:
        val - true the target window should contain the standard browser directory buttons, false if not.
        Returns:
        this builder.
      • status

        public WLink.Builder status​(boolean val)
        Sets whether the target window should have the browser status bar visible.
        Parameters:
        val - true if the window should have the status visible, false if not.
        Returns:
        this builder.
      • menubar

        public WLink.Builder menubar​(boolean val)
        Sets whether the target window should have the browser menu bar visible.
        Parameters:
        val - true if the window should have the menu bar visible, false if not.
        Returns:
        this builder.
      • left

        public WLink.Builder left​(int val)
        Sets the X-axis location of the browser window.
        Parameters:
        val - the location for the left side of the browser window, in pixels.
        Returns:
        this builder.
      • top

        public WLink.Builder top​(int val)
        Sets the Y-axis location of the browser window.
        Parameters:
        val - the location for the top side of the browser window, in pixels.
        Returns:
        this builder.
      • build

        public WLink build()
        Build the attributes list for new window.
        Returns:
        a new WLink, configured with the attributes from this builder.