Class AbstractFrame

    • Constructor Detail

      • AbstractFrame

        public AbstractFrame​(Component component)
        Component constructor.
        Parameters:
        component - The single child component, or null if this frame should have no child component.
    • Method Detail

      • setState

        protected void setState​(Frame.State newState)
        Sets the state of the frame. This is a bound property.
        Parameters:
        newState - The new state of the frame.
        Throws:
        java.lang.NullPointerException - if the given state is null.
        See Also:
        Frame.STATE_PROPERTY
      • isModal

        public boolean isModal()
        Specified by:
        isModal in interface Frame
        Returns:
        Whether the frame is modal if and when it is open.
      • setModal

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

        public boolean isMovable()
        Specified by:
        isMovable in interface Frame
        Returns:
        Whether the frame is movable.
      • setMovable

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

        public boolean isResizable()
        Specified by:
        isResizable in interface Frame
        Returns:
        Whether the frame can be resized.
      • setResizable

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

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

        public void setRelatedComponent​(Component newRelatedComponent)
        Description copied from interface: Frame
        Sets the related component This is a bound property.
        Specified by:
        setRelatedComponent in interface Frame
        Parameters:
        newRelatedComponent - The new related component, or null if the frame is not related to another component.
        See Also:
        Frame.RELATED_COMPONENT_PROPERTY
      • getTitleBackgroundColor

        public Color getTitleBackgroundColor()
        Specified by:
        getTitleBackgroundColor in interface Frame
        Returns:
        The background color of the title, or null if no background color is specified for the title.
      • setTitleBackgroundColor

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

        public boolean isTitleVisible()
        Specified by:
        isTitleVisible in interface Frame
        Returns:
        Whether the title bar is visible.
      • setTitleVisible

        public void setTitleVisible​(boolean newTitleVisible)
        Description copied from interface: Frame
        Sets whether the title bar is visible. This is a bound property of type Boolean.
        Specified by:
        setTitleVisible in interface Frame
        Parameters:
        newTitleVisible - true if the title bar should be visible, else false.
        See Also:
        Frame.TITLE_VISIBLE_PROPERTY
      • getOpenEffect

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

        public void setOpenEffect​(Effect newOpenEffect)
        Description copied from interface: Frame
        Sets the effect used for opening the frame. This is a bound property.
        Specified by:
        setOpenEffect in interface Frame
        Parameters:
        newOpenEffect - The new effect used for opening the frame, or null if there should be no open effect.
        See Also:
        Frame.OPEN_EFFECT_PROPERTY
      • getContent

        public Component getContent()
        Specified by:
        getContent in interface ContentComponent
        Returns:
        The content child component, or null if this component does not have a content child component.
      • getMenu

        public Menu getMenu()
        Specified by:
        getMenu in interface Frame
        Returns:
        The frame menu, or null if this frame does not have a menu.
      • setMenu

        public void setMenu​(Menu newMenu)
        Description copied from interface: Frame
        Sets the frame menu. This is a bound property.
        Specified by:
        setMenu in interface Frame
        Parameters:
        newMenu - The frame menu, or null if this frame does not have a menu.
        See Also:
        Frame.MENU_PROPERTY
      • getToolbar

        public Toolbar getToolbar()
        Specified by:
        getToolbar in interface Frame
        Returns:
        The frame toolbar, or null if this frame does not have a toolbar.
      • setToolbar

        public void setToolbar​(Toolbar newToolbar)
        Description copied from interface: Frame
        Sets the frame toolbar. This is a bound property.
        Specified by:
        setToolbar in interface Frame
        Parameters:
        newToolbar - The frame toolbar, or null if this frame does not have a toolbar.
        See Also:
        Frame.TOOLBAR_PROPERTY
      • getPrototypeProvisionStrategy

        protected FrameMenuToolPrototypeProvisionStrategy getPrototypeProvisionStrategy()
        Returns:
        The strategy for processing prototypes provisions from child prototype providers, along with this frame's prototype provisions.
      • getCloseActionControl

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

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

        public void open()
        Description copied from interface: Frame
        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.
        Specified by:
        open in interface Frame
        See Also:
        Frame.getState(), Frame.STATE_PROPERTY
      • open

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

        public void open​(com.globalmentor.beans.GenericPropertyChangeListener<Frame.Mode> modeChangeListener)
        Description copied from interface: Frame
        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 Frame.open(boolean) with a value of true.
        Specified by:
        open in interface Frame
        Parameters:
        modeChangeListener - The mode property change listener to add.
        See Also:
        ModalComponent.MODE_PROPERTY
      • canClose

        public boolean canClose()
        Description copied from interface: Frame
        Determines whether the frame should be allowed to close. This method is called from Frame.close().
        Specified by:
        canClose in interface Frame
        Returns:
        true if the frame should be allowed to close.
      • close

        public final void close()
        Description copied from interface: Frame
        Closes the frame. Closing the frame unregisters the frame with the session. If the frame is already closed, no action occurs.
        Specified by:
        close in interface Frame
        See Also:
        Frame.getState(), Frame.STATE_PROPERTY
      • closeImpl

        protected void closeImpl()
        Implementation of frame closing.
      • updateDefaultPrototypeProvisions

        protected final void updateDefaultPrototypeProvisions()
        Updates the default prototype provisions.
        See Also:
        provideDefaultPrototypes()
      • provideDefaultPrototypes

        protected java.util.Set<PrototypeProvision<?>> provideDefaultPrototypes()
        Provides default prototype provisions to be integrated into the menu and/or toolbar. The default prototype provisions are separate from those provided by any child component prototype producers. Subclasses may override this method to add or modify the default provided prototype provisions.
        Returns:
        A mutable set of default prototype provisions.