Class DockingLayout


  • public class DockingLayout
    extends java.lang.Object
    This class holds all information about a Docking Layout.
    Version:
    1.0, 17.11.2007
    Author:
    Thoralf Rickert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DockingLayout.LayoutException
      An exception during docking layout handling.
    • Constructor Summary

      Constructors 
      Constructor Description
      DockingLayout​(java.lang.String name, org.w3c.dom.Element root, net.infonode.docking.util.StringViewMap viewMap, java.util.Map<java.lang.String,​net.infonode.docking.View> views, DockingFrameworkBuilder dfBuilder)
      Creates a new Docking Framework Layout Container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.w3c.dom.Element createDefaultLayout​(java.lang.String name, boolean isActive)
      Creates the default layout.
      void dispose()
      Removes all views from the root window.
      protected void dispose​(net.infonode.docking.DockingWindow window)  
      java.lang.String getName()
      Returns the value of name.
      org.w3c.dom.Element getRoot()
      Returns the value of root.
      net.infonode.docking.RootWindow getRootWindow()
      Returns the value of window.
      net.infonode.docking.util.StringViewMap getViewMap()
      Returns the value of viewMap.
      java.util.Map<java.lang.String,​net.infonode.docking.View> getViews()
      Returns the value of views.
      boolean isActive()
      Returns the value of isActive.
      static java.util.List<DockingLayout> load​(java.io.File file, net.infonode.docking.util.StringViewMap viewMap, java.util.Map<java.lang.String,​net.infonode.docking.View> views, DockingFrameworkBuilder dfBuilder)
      Loads a List of docking layouts from the given File.
      protected static void load​(java.util.List<DockingLayout> layouts, org.w3c.dom.Element root, net.infonode.docking.util.StringViewMap viewMap, java.util.Map<java.lang.String,​net.infonode.docking.View> views, DockingFrameworkBuilder dfBuilder)
      Loads a Docking Layout from the XML file.
      protected net.infonode.docking.FloatingWindow loadFloatingWindow​(net.infonode.docking.RootWindow window, org.w3c.dom.Element root)
      Creates a floatingwindow inside the rootwindow.
      protected net.infonode.docking.DockingWindow loadSplitWindow​(net.infonode.docking.RootWindow window, org.w3c.dom.Element root)
      Creates a SplitWindow inside a Dock.
      protected net.infonode.docking.DockingWindow loadTabWindow​(net.infonode.docking.RootWindow window, org.w3c.dom.Element root)
      Creates a TabWindow inside a dock
      protected net.infonode.docking.DockingWindow loadView​(net.infonode.docking.RootWindow window, org.w3c.dom.Element root)
      Created a View inside a Dock.
      protected net.infonode.docking.WindowBar loadWindowBar​(net.infonode.docking.RootWindow window, org.w3c.dom.Element root)
      Creates a windowbar inside the rootwindow.
      void open​(net.infonode.docking.RootWindow window, java.util.Properties settings)
      Creates the Docking Layout inside the RootWindow.
      protected net.infonode.docking.DockingWindow open​(net.infonode.docking.RootWindow window, org.w3c.dom.Element root)
      Creates the Docking Layout inside the rootwindow.
      org.w3c.dom.Element save()
      Saves this Docking Layout in a XML Element
      void save​(java.lang.StringBuffer buffer)
      Saves this Docking Layout.
      protected void save​(java.lang.StringBuffer buffer, net.infonode.docking.DockingWindow window, java.lang.String offset)
      Writes all informations about a DockingWindow into the StringBuffer as XML.
      protected void save​(java.lang.StringBuffer buffer, net.infonode.docking.FloatingWindow window, java.lang.String offset)
      Writes all informations about the FloatingWindow into the StringBuffer as XML.
      protected void save​(java.lang.StringBuffer buffer, net.infonode.docking.RootWindow window, java.lang.String offset)
      Writes all informations about the RootWindow into the StringBuffer as XML.
      protected void save​(java.lang.StringBuffer buffer, net.infonode.docking.SplitWindow window, java.lang.String offset)
      Writes all informations about the SplitWindow into the StringBuffer as XML.
      protected void save​(java.lang.StringBuffer buffer, net.infonode.docking.TabWindow window, java.lang.String offset)
      Writes all informations about the TabWindow into the StringBuffer as XML.
      protected void save​(java.lang.StringBuffer buffer, net.infonode.docking.View window, java.lang.String offset)
      Writes all informations about the View into the StringBuffer as XML.
      protected void save​(java.lang.StringBuffer buffer, net.infonode.docking.WindowBar window, java.lang.String offset)
      Writes all informations about the WindowBar into the StringBuffer as XML.
      protected void save​(java.lang.StringBuffer buffer, org.w3c.dom.Element root, java.lang.String offset)
      Writes all informations inside the root Element into the StringBuffer.
      void setActive​(boolean isActive)
      Sets the value of isActive.
      void setName​(java.lang.String name)
      Sets the value of name.
      void setRoot​(org.w3c.dom.Element root)
      Sets the value of root.
      void setRootWindow​(net.infonode.docking.RootWindow window)
      Sets the value of window.
      void setViewMap​(net.infonode.docking.util.StringViewMap viewMap)
      Sets the value of viewMap.
      void setViews​(java.util.Map<java.lang.String,​net.infonode.docking.View> views)
      Sets the value of views.
      • Methods inherited from class java.lang.Object

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

      • DockingLayout

        public DockingLayout​(java.lang.String name,
                             org.w3c.dom.Element root,
                             net.infonode.docking.util.StringViewMap viewMap,
                             java.util.Map<java.lang.String,​net.infonode.docking.View> views,
                             DockingFrameworkBuilder dfBuilder)
        Creates a new Docking Framework Layout Container.
        Parameters:
        dfBuilder -
    • Method Detail

      • load

        public static java.util.List<DockingLayout> load​(java.io.File file,
                                                         net.infonode.docking.util.StringViewMap viewMap,
                                                         java.util.Map<java.lang.String,​net.infonode.docking.View> views,
                                                         DockingFrameworkBuilder dfBuilder)
        Loads a List of docking layouts from the given File.
        Parameters:
        dfBuilder -
      • load

        protected static void load​(java.util.List<DockingLayout> layouts,
                                   org.w3c.dom.Element root,
                                   net.infonode.docking.util.StringViewMap viewMap,
                                   java.util.Map<java.lang.String,​net.infonode.docking.View> views,
                                   DockingFrameworkBuilder dfBuilder)
        Loads a Docking Layout from the XML file.
        Parameters:
        dfBuilder -
      • dispose

        public void dispose()
        Removes all views from the root window.
      • dispose

        protected void dispose​(net.infonode.docking.DockingWindow window)
      • open

        public void open​(net.infonode.docking.RootWindow window,
                         java.util.Properties settings)
        Creates the Docking Layout inside the RootWindow.
      • open

        protected net.infonode.docking.DockingWindow open​(net.infonode.docking.RootWindow window,
                                                          org.w3c.dom.Element root)
        Creates the Docking Layout inside the rootwindow.
      • loadSplitWindow

        protected net.infonode.docking.DockingWindow loadSplitWindow​(net.infonode.docking.RootWindow window,
                                                                     org.w3c.dom.Element root)
        Creates a SplitWindow inside a Dock.
      • loadTabWindow

        protected net.infonode.docking.DockingWindow loadTabWindow​(net.infonode.docking.RootWindow window,
                                                                   org.w3c.dom.Element root)
        Creates a TabWindow inside a dock
      • loadView

        protected net.infonode.docking.DockingWindow loadView​(net.infonode.docking.RootWindow window,
                                                              org.w3c.dom.Element root)
        Created a View inside a Dock.
      • loadFloatingWindow

        protected net.infonode.docking.FloatingWindow loadFloatingWindow​(net.infonode.docking.RootWindow window,
                                                                         org.w3c.dom.Element root)
        Creates a floatingwindow inside the rootwindow.
      • loadWindowBar

        protected net.infonode.docking.WindowBar loadWindowBar​(net.infonode.docking.RootWindow window,
                                                               org.w3c.dom.Element root)
        Creates a windowbar inside the rootwindow.
      • save

        public org.w3c.dom.Element save()
        Saves this Docking Layout in a XML Element
      • save

        public void save​(java.lang.StringBuffer buffer)
        Saves this Docking Layout. For this the method tries three methods. 1. Save it via the settings inside the rootwindow (active layout) 2. Save it via the unchanged XML tree in the root element 3. Save a default set.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            net.infonode.docking.DockingWindow window,
                            java.lang.String offset)
        Writes all informations about a DockingWindow into the StringBuffer as XML.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            net.infonode.docking.SplitWindow window,
                            java.lang.String offset)
        Writes all informations about the SplitWindow into the StringBuffer as XML.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            net.infonode.docking.RootWindow window,
                            java.lang.String offset)
        Writes all informations about the RootWindow into the StringBuffer as XML.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            net.infonode.docking.TabWindow window,
                            java.lang.String offset)
        Writes all informations about the TabWindow into the StringBuffer as XML.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            net.infonode.docking.View window,
                            java.lang.String offset)
        Writes all informations about the View into the StringBuffer as XML.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            net.infonode.docking.WindowBar window,
                            java.lang.String offset)
        Writes all informations about the WindowBar into the StringBuffer as XML.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            net.infonode.docking.FloatingWindow window,
                            java.lang.String offset)
        Writes all informations about the FloatingWindow into the StringBuffer as XML.
      • save

        protected void save​(java.lang.StringBuffer buffer,
                            org.w3c.dom.Element root,
                            java.lang.String offset)
        Writes all informations inside the root Element into the StringBuffer.
      • getName

        public java.lang.String getName()
        Returns the value of name.
        Returns:
        Returns name.
      • setName

        public void setName​(java.lang.String name)
        Sets the value of name.
        Parameters:
        name - The value for name.
      • getRoot

        public org.w3c.dom.Element getRoot()
        Returns the value of root.
        Returns:
        Returns root.
      • setRoot

        public void setRoot​(org.w3c.dom.Element root)
        Sets the value of root.
        Parameters:
        root - The value for root.
      • isActive

        public boolean isActive()
        Returns the value of isActive.
        Returns:
        Returns isActive.
      • setActive

        public void setActive​(boolean isActive)
        Sets the value of isActive.
        Parameters:
        isActive - The value for isActive.
      • getViewMap

        public net.infonode.docking.util.StringViewMap getViewMap()
        Returns the value of viewMap.
        Returns:
        Returns viewMap.
      • setViewMap

        public void setViewMap​(net.infonode.docking.util.StringViewMap viewMap)
        Sets the value of viewMap.
        Parameters:
        viewMap - The value for viewMap.
      • getViews

        public java.util.Map<java.lang.String,​net.infonode.docking.View> getViews()
        Returns the value of views.
        Returns:
        Returns views.
      • setViews

        public void setViews​(java.util.Map<java.lang.String,​net.infonode.docking.View> views)
        Sets the value of views.
        Parameters:
        views - The value for views.
      • getRootWindow

        public net.infonode.docking.RootWindow getRootWindow()
        Returns the value of window.
        Returns:
        Returns window.
      • setRootWindow

        public void setRootWindow​(net.infonode.docking.RootWindow window)
        Sets the value of window.
        Parameters:
        window - The value for window.