Class DFBInstance

  • All Implemented Interfaces:
    DockingFrameworkBuilder

    public class DFBInstance
    extends java.lang.Object
    implements DockingFrameworkBuilder
    This is a factory for working with the infonode docking framework.
    Version:
    1.0
    Author:
    Thoralf
    • Constructor Summary

      Constructors 
      Constructor Description
      DFBInstance​(MagellanDesktop desktop)
      Creates new DockingFrameworkBuilder
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addLayouts​(java.io.File file)
      Adds all docking layouts from the given file to the currently available layouts. all layouts are disabled and layouts with the same name are renamed
      net.infonode.docking.RootWindow buildDesktop​(java.util.Map<java.lang.String,​java.awt.Component> components, java.io.File serializedView)
      This method builds the desktop.
      protected net.infonode.docking.RootWindow createDefault​(net.infonode.docking.util.StringViewMap viewMap, java.util.Map<java.lang.String,​net.infonode.docking.View> views)
      Creates a default Docking layout set.
      javax.swing.JMenu createDesktopMenu​(java.util.Map<java.lang.String,​java.awt.Component> components, java.util.Properties settings, java.awt.event.ActionListener listener)
      This method creates the desktop menu.
      void createNewLayout​(java.lang.String name)
      This method creates a new layout with the given name and the default settings.
      protected net.infonode.docking.RootWindow createRootWindow​(java.util.Map<java.lang.String,​java.awt.Component> components, java.io.File serializedViewData)
      This method tries to setup the infonode docking framework.
      void deleteCurrentLayout()
      Deletes the current layout and selects the first layout.
      java.util.List<java.awt.Component> getComponentsUsed()
      Returns the list of used components
      DockingLayout getLayout​(java.lang.String name)
      Returns the docking layout with the given name or null, if there is no layout with this name.
      net.infonode.docking.util.StringViewMap getViewMap()  
      net.infonode.docking.RootWindow read​(net.infonode.docking.util.StringViewMap viewMap, java.util.Map<java.lang.String,​net.infonode.docking.View> views, java.io.File serializedViewData)
      This method reads a docking configuration from the given file.
      void setActive​(net.infonode.docking.View view)
      Enables a desktop menu entry for the given View
      void setActiveLayout​(DockingLayout layout)
      Enabled the specified docking layout.
      void setInActive​(net.infonode.docking.View view)
      Disables a desktop menu entry for the given View
      void setProperties​(java.util.Properties settings)  
      void setTabVisibility​(boolean showTabs)  
      void setVisible​(net.infonode.docking.RootWindow window, java.lang.String componentName, boolean setVisible)
      Opens or closes a specific dock.
      void updateLayoutMenu()
      Updates all Docking Layouts in the Desktop>Layout menu by removing them and recreate the list of available docking layouts.
      void write​(java.io.File serializedViewData)
      This method writes a docking configuration to the given file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DFBInstance

        public DFBInstance​(MagellanDesktop desktop)
        Creates new DockingFrameworkBuilder
        Parameters:
        desktop -
    • Method Detail

      • buildDesktop

        public net.infonode.docking.RootWindow buildDesktop​(java.util.Map<java.lang.String,​java.awt.Component> components,
                                                            java.io.File serializedView)
        This method builds the desktop. This is the main component inside Magellan It contains a IDF RootWindow with multiple Docks.
        Specified by:
        buildDesktop in interface DockingFrameworkBuilder
      • createRootWindow

        protected net.infonode.docking.RootWindow createRootWindow​(java.util.Map<java.lang.String,​java.awt.Component> components,
                                                                   java.io.File serializedViewData)
        This method tries to setup the infonode docking framework.
      • write

        public void write​(java.io.File serializedViewData)
                   throws java.io.IOException
        This method writes a docking configuration to the given file.
        Specified by:
        write in interface DockingFrameworkBuilder
        Throws:
        java.io.IOException
      • read

        public net.infonode.docking.RootWindow read​(net.infonode.docking.util.StringViewMap viewMap,
                                                    java.util.Map<java.lang.String,​net.infonode.docking.View> views,
                                                    java.io.File serializedViewData)
                                             throws java.io.IOException
        This method reads a docking configuration from the given file.
        Throws:
        java.io.IOException
      • addLayouts

        public void addLayouts​(java.io.File file)
        Adds all docking layouts from the given file to the currently available layouts. all layouts are disabled and layouts with the same name are renamed
        Specified by:
        addLayouts in interface DockingFrameworkBuilder
      • createDefault

        protected net.infonode.docking.RootWindow createDefault​(net.infonode.docking.util.StringViewMap viewMap,
                                                                java.util.Map<java.lang.String,​net.infonode.docking.View> views)
        Creates a default Docking layout set.
      • createDesktopMenu

        public javax.swing.JMenu createDesktopMenu​(java.util.Map<java.lang.String,​java.awt.Component> components,
                                                   java.util.Properties settings,
                                                   java.awt.event.ActionListener listener)
        This method creates the desktop menu. It contains the layout submenu and all dock components.
        Specified by:
        createDesktopMenu in interface DockingFrameworkBuilder
      • updateLayoutMenu

        public void updateLayoutMenu()
        Updates all Docking Layouts in the Desktop>Layout menu by removing them and recreate the list of available docking layouts.
        Specified by:
        updateLayoutMenu in interface DockingFrameworkBuilder
      • getLayout

        public DockingLayout getLayout​(java.lang.String name)
        Returns the docking layout with the given name or null, if there is no layout with this name.
        Specified by:
        getLayout in interface DockingFrameworkBuilder
      • createNewLayout

        public void createNewLayout​(java.lang.String name)
        This method creates a new layout with the given name and the default settings.
        Specified by:
        createNewLayout in interface DockingFrameworkBuilder
      • setActive

        public void setActive​(net.infonode.docking.View view)
        Enables a desktop menu entry for the given View
        Specified by:
        setActive in interface DockingFrameworkBuilder
      • setInActive

        public void setInActive​(net.infonode.docking.View view)
        Disables a desktop menu entry for the given View
        Specified by:
        setInActive in interface DockingFrameworkBuilder
      • setVisible

        public void setVisible​(net.infonode.docking.RootWindow window,
                               java.lang.String componentName,
                               boolean setVisible)
        Opens or closes a specific dock.
        Specified by:
        setVisible in interface DockingFrameworkBuilder