Interface Frame

    • Field Detail

      • CLOSE_ACTION_CONTROL_PROPERTY

        static final java.lang.String CLOSE_ACTION_CONTROL_PROPERTY
        The close action control bound property.
      • MENU_PROPERTY

        static final java.lang.String MENU_PROPERTY
        The bound property of the frame menu.
      • MODAL_PROPERTY

        static final java.lang.String MODAL_PROPERTY
        The bound property of whether the frame is modal if and when it is open.
      • MOVABLE_PROPERTY

        static final java.lang.String MOVABLE_PROPERTY
        The bound property of whether the component is movable.
      • OPEN_EFFECT_PROPERTY

        static final java.lang.String OPEN_EFFECT_PROPERTY
        The open effect bound property.
      • RELATED_COMPONENT_PROPERTY

        static final java.lang.String RELATED_COMPONENT_PROPERTY
        The bound property of the related component.
      • RESIZABLE_PROPERTY

        static final java.lang.String RESIZABLE_PROPERTY
        The bound property of whether the frame can be resized.
      • STATE_PROPERTY

        static final java.lang.String STATE_PROPERTY
        The bound state property.
      • TITLE_BACKGROUND_COLOR_PROPERTY

        static final java.lang.String TITLE_BACKGROUND_COLOR_PROPERTY
        The bound property of the title background color.
      • TITLE_VISIBLE_PROPERTY

        static final java.lang.String TITLE_VISIBLE_PROPERTY
        The bound property of whether the title bar is visible.
      • TOOLBAR_PROPERTY

        static final java.lang.String TOOLBAR_PROPERTY
        The bound property of the frame toolbar.
    • Method Detail

      • getState

        Frame.State getState()
        Returns:
        The state of the frame.
      • getMenu

        Menu getMenu()
        Returns:
        The frame menu, or null if this frame does not have a menu.
      • setMenu

        void setMenu​(Menu newMenu)
        Sets the frame menu. This is a bound property.
        Parameters:
        newMenu - The frame menu, or null if this frame does not have a menu.
        See Also:
        MENU_PROPERTY
      • isModal

        boolean isModal()
        Returns:
        Whether the frame is modal if and when it is open.
      • setModal

        void setModal​(boolean newModal)
        Sets whether the frame is modal if and when it is open. This is a bound property of type Boolean.
        Parameters:
        newModal - true if the frame should be modal, else false.
        See Also:
        MODAL_PROPERTY
      • isMovable

        boolean isMovable()
        Returns:
        Whether the frame is movable.
      • setMovable

        void setMovable​(boolean newMovable)
        Sets whether the frame is movable. This is a bound property of type Boolean.
        Parameters:
        newMovable - true if the frame should be movable, else false.
        See Also:
        MOVABLE_PROPERTY
      • isResizable

        boolean isResizable()
        Returns:
        Whether the frame can be resized.
      • setResizable

        void setResizable​(boolean newResizable)
        Sets whether the frame can be resized. This is a bound property of type Boolean.
        Parameters:
        newResizable - true if the frame can be resized, else false.
        See Also:
        RESIZABLE_PROPERTY
      • getRelatedComponent

        Component getRelatedComponent()
        Returns:
        The related component such as a popup source, or null if the frame is not related to another component.
      • setRelatedComponent

        void setRelatedComponent​(Component newRelatedComponent)
        Sets the related component This is a bound property.
        Parameters:
        newRelatedComponent - The new related component, or null if the frame is not related to another component.
        See Also:
        RELATED_COMPONENT_PROPERTY
      • getTitleBackgroundColor

        Color getTitleBackgroundColor()
        Returns:
        The background color of the title, or null if no background color is specified for the title.
      • setTitleBackgroundColor

        void setTitleBackgroundColor​(Color newTitleBackgroundColor)
        Sets the background color of the title. This is a bound property.
        Parameters:
        newTitleBackgroundColor - The background color of the title, or null if the default background color should be used.
        See Also:
        TITLE_BACKGROUND_COLOR_PROPERTY
      • isTitleVisible

        boolean isTitleVisible()
        Returns:
        Whether the title bar is visible.
      • setTitleVisible

        void setTitleVisible​(boolean newTitleVisible)
        Sets whether the title bar is visible. This is a bound property of type Boolean.
        Parameters:
        newTitleVisible - true if the title bar should be visible, else false.
        See Also:
        TITLE_VISIBLE_PROPERTY
      • getToolbar

        Toolbar getToolbar()
        Returns:
        The frame toolbar, or null if this frame does not have a toolbar.
      • setToolbar

        void setToolbar​(Toolbar newToolbar)
        Sets the frame toolbar. This is a bound property.
        Parameters:
        newToolbar - The frame toolbar, or null if this frame does not have a toolbar.
        See Also:
        TOOLBAR_PROPERTY
      • getOpenEffect

        Effect getOpenEffect()
        Returns:
        The effect used for opening the frame, or null if there is no open effect.
      • setOpenEffect

        void setOpenEffect​(Effect newOpenEffect)
        Sets the effect used for opening the frame. This is a bound property.
        Parameters:
        newOpenEffect - The new effect used for opening the frame, or null if there should be no open effect.
        See Also:
        OPEN_EFFECT_PROPERTY
      • getCloseActionPrototype

        ActionPrototype getCloseActionPrototype()
        Returns:
        The action prototype for closing the frame.
      • getCloseActionControl

        ActionControl getCloseActionControl()
        Returns:
        The action control for closing the frame, or null if this frame does not have a close action control.
      • setCloseActionControl

        void setCloseActionControl​(ActionControl newCloseActionControl)
        Sets the action control for closing the frame. This is a bound property.
        Parameters:
        newCloseActionControl - The action control for closing the frame, or null if this frame does not have a close action control.
        See Also:
        CLOSE_ACTION_CONTROL_PROPERTY
      • open

        void open()
        Opens the frame with the currently set modality. Opening the frame registers the frame with the application frame. If the frame is already open, no action occurs.
        See Also:
        getState(), STATE_PROPERTY
      • open

        void open​(com.globalmentor.beans.GenericPropertyChangeListener<Frame.Mode> modeChangeListener)
        Opens the frame as modal and installs the given property change listener to listen for the mode changing. This is a convenience method that adds the ModalComponent.MODE_PROPERTY change listener using PropertyBindable.addPropertyChangeListener(String, PropertyChangeListener) and then calls open(boolean) with a value of true.
        Parameters:
        modeChangeListener - The mode property change listener to add.
        See Also:
        ModalComponent.MODE_PROPERTY
      • open

        void open​(boolean modal)
        Opens the frame, specifying modality. Opening the frame registers the frame with the session. If the frame is already open, no action occurs.
        Parameters:
        modal - true if the frame should be opened as a modal frame, else false.
        See Also:
        getState(), STATE_PROPERTY
      • canClose

        boolean canClose()
        Determines whether the frame should be allowed to close. This method is called from close().
        Returns:
        true if the frame should be allowed to close.
      • close

        void close()
        Closes the frame. Closing the frame unregisters the frame with the session. If the frame is already closed, no action occurs.
        See Also:
        getState(), STATE_PROPERTY