Interface Control

    • Method Detail

      • setDescription

        Control setDescription​(String description)
        Parameters:
        description - the description string
        Returns:
        this control instance
      • getDescription

        String getDescription()
        Returns:
        the description
      • getCaption

        String getCaption()
        Returns:
        the caption
      • setCaption

        Control setCaption​(String caption)
        Parameters:
        caption - the caption for this Control instance
        Returns:
        this Control instance
      • enabledObserver

        StateObserver enabledObserver()
        Returns:
        the state which controls whether this Control instance is enabled
      • setMnemonic

        Control setMnemonic​(int mnemonic)
        Parameters:
        mnemonic - the mnemonic to associate with this Control instance
        Returns:
        this Control instance
      • getMnemonic

        int getMnemonic()
        Returns:
        the mnemonic, 0 if none is specified
      • setKeyStroke

        Control setKeyStroke​(KeyStroke keyStroke)
        Parameters:
        keyStroke - the KeyStroke to associate with this Control
        Returns:
        this Control instance
      • getKeyStroke

        KeyStroke getKeyStroke()
        Returns:
        the KeyStroke associated with this Control, if any
      • setSmallIcon

        Control setSmallIcon​(Icon smallIcon)
        Parameters:
        smallIcon - the small icon to associate with this Control
        Returns:
        this Control instance
      • getSmallIcon

        Icon getSmallIcon()
        Returns:
        the icon
      • setBackground

        Control setBackground​(Color background)
        Parameters:
        background - the background color
        Returns:
        this Control instance
      • getBackground

        Color getBackground()
        Returns:
        the background color
      • setForeground

        Control setForeground​(Color foreground)
        Parameters:
        foreground - the foreground color
        Returns:
        this Control instance
      • getForeground

        Color getForeground()
        Returns:
        the foreground color
      • setFont

        Control setFont​(Font font)
        Parameters:
        font - the font
        Returns:
        this Control instance
      • getFont

        Font getFont()
        Returns:
        the font
      • createButton

        JButton createButton()
        Creates a button based on this Control
        Returns:
        a button based on this Control
      • createMenuItem

        JMenuItem createMenuItem()
        Creates a menu item based on this Control
        Returns:
        a menu item based on this Control
      • eventControl

        static Control eventControl​(Event<ActionEvent> event)
        Creates a Control which triggers the given event on action performed
        Parameters:
        event - the event
        Returns:
        a control which triggers the given event
      • builder

        static Control.Builder builder​(Control.Command command)
        Creates a new Builder.
        Parameters:
        command - the command to base the control on
        Returns:
        a new Control.Builder
      • actionControlBuilder

        static Control.Builder actionControlBuilder​(Control.ActionCommand actionCommand)
        Creates a new Builder.
        Parameters:
        actionCommand - the action command to base the control on
        Returns:
        a new Control.Builder
      • eventControlBuilder

        static Control.Builder eventControlBuilder​(Event<ActionEvent> event)
        Creates a Builder for a control which triggers the given event on action performed
        Parameters:
        event - the event
        Returns:
        a new Control.Builder