Class FlowMultiPagePane

    • Constructor Detail

      • FlowMultiPagePane

        public FlowMultiPagePane​(FlowEditorPanel owner)
        Initializes the tabbed pane.
        Parameters:
        owner - the owning editor
    • Method Detail

      • initialize

        protected void initialize()
        For initializing members.
        Overrides:
        initialize in class MultiPagePane
      • getOwner

        public FlowEditorPanel getOwner()
        Returns the owning editor.
        Returns:
        the owning editor
      • newPanel

        public FlowPanel newPanel()
        Adds a new tab with an empty panel.
        Returns:
        the new flow panel
      • getPanelCount

        public int getPanelCount()
        Returns the number of panels in the tabbed pane.
        Returns:
        the number of panels
      • getIndices

        public int[] getIndices​(Map<FlowMultiPagePane.FlowPanelFilter,​Boolean> filters)
        Returns the indices of the flow panels that match the filter.
        Parameters:
        filters - the filters to apply
        Returns:
        the indices of the panels that matched
      • getSelectedIndices

        public int[] getSelectedIndices​(Map<FlowMultiPagePane.FlowPanelFilter,​Boolean> filters)
        Returns the indices of the selected flow panels that match the filter.
        Parameters:
        filters - the filters to apply
        Returns:
        the indices of the panels that matched
      • getPanelAt

        public FlowPanel getPanelAt​(int index)
        Returns the panel at the specified position.
        Parameters:
        index - the tab index
        Returns:
        the requested panel
      • indexOfPanel

        public int indexOfPanel​(String title)
        Returns the index of the panel with the specified title.
        Parameters:
        title - the title to check
        Returns:
        the panel, -1 if not found
      • hasPanel

        public boolean hasPanel​(String title)
        Returns whether a panel with the specified title exists.
        Parameters:
        title - the title to look for
        Returns:
        true if it exists
      • hasCurrentPanel

        public boolean hasCurrentPanel()
        Returns if a panel is available.
        Returns:
        true if a panel available
      • getCurrentPanel

        public FlowPanel getCurrentPanel()
        Returns the currently selected panel.
        Returns:
        the current panel, null if not available
      • getTreeAt

        public Tree getTreeAt​(int index)
        Returns the tree at the specified position.
        Parameters:
        index - the tab index
        Returns:
        the requested tree
      • hasCurrentTree

        public boolean hasCurrentTree()
        Returns whether a tree is currently selected.
        Returns:
        true if a tree available
      • getCurrentTree

        public Tree getCurrentTree()
        Returns the currently selected tree.
        Returns:
        the currently selected tree, null if not available
      • checkForModified

        protected boolean checkForModified()
        Returns whether we can proceed with the operation or not, depending on whether the user saved the flow or discarded the changes.
        Returns:
        true if safe to proceed
      • checkForModified

        protected boolean checkForModified​(FlowPanel panel)
        Returns whether we can proceed with the operation or not, depending on whether the user saved the flow or discarded the changes.
        Parameters:
        panel - the panel to check
        Returns:
        true if safe to proceed
      • pageSelected

        protected void pageSelected​(ChangeEvent e)
        Gets called when a tab gets selected.
        Parameters:
        e - the event that triggered the action
      • updateOwnerTitle

        protected void updateOwnerTitle()
        Updates the owner's title.
      • updateTitle

        public void updateTitle​(FlowPanel panel,
                                String title)
        Updates the title.
        Parameters:
        panel - the panel to update the title for
        title - the new title
      • updateCurrentDirectory

        public void updateCurrentDirectory()
        Updates the current working directory of the owner's file chooser to the one represented by this flow.
      • removePageAt

        public MultiPagePane.PageContainer removePageAt​(int index)
        Removes the tab at index. After the component associated with index is removed, its visibility is reset to true to ensure it will be visible if added to other containers.
        Overrides:
        removePageAt in class MultiPagePane
        Parameters:
        index - the index of the tab to be removed
        Returns:
        the removed container
      • hasActiveFlow

        public boolean hasActiveFlow()
        Checks whether an active flow is set.
        Returns:
        true if active flow set
      • unsetActiveFlow

        public void unsetActiveFlow()
        Unsets the active flow.
      • getActiveFlow

        public FlowPanel getActiveFlow()
        Returns the active flow panel (if any).
        Returns:
        the panel, null if no active one set
      • isActiveFlowAt

        public boolean isActiveFlowAt​(int index)
        Checks whether the flow at the given position is the active one.
        Parameters:
        index - the page index
        Returns:
        true if it is the active one
      • setActiveFlowAt

        public void setActiveFlowAt​(int index)
        Sets the flow at the given position as the new active one.
        Parameters:
        index - the flow to use as active one