Class Workspace

  • All Implemented Interfaces:
    XmlEntity<Workspace>

    public class Workspace
    extends Object
    implements XmlEntity<Workspace>
    The window workspace used to preserve the projects windows locations and settings.
    Author:
    jotoh
    • Constructor Detail

      • Workspace

        public Workspace()
    • Method Detail

      • serialize

        public static org.dom4j.Element serialize​(String name,
                                                  Point point)
        Serialize a Point to a xml element. The result element looks like this: <[name] x="[x]" y="[y]"/>.
        Parameters:
        name - name of this dimensions element
        point - point to serialize
        Returns:
        serialized point element
      • serialize

        public static org.dom4j.Element serialize​(String name,
                                                  Dimension dimension)
        Serialize a Dimension to a xml element. The result element looks like this: <[name] width="[w]" height="[h]"/>.
        Parameters:
        name - name of this dimensions element
        dimension - dimension to serialize
        Returns:
        serialized dimension element
      • parsePoint

        public static Point parsePoint​(org.dom4j.Element element)
        Parse a Point from a Element.
        Parameters:
        element - element to parse
        Returns:
        parsed point
      • parseDimension

        public static Dimension parseDimension​(org.dom4j.Element element)
        Parse a Dimension from a Element.
        Parameters:
        element - element to parse
        Returns:
        parsed dimension
      • serialize

        public org.dom4j.Element serialize()
        Serialize the workspace to a xml Document. The root element is named workspace.
        Specified by:
        serialize in interface XmlEntity<Workspace>
        Returns:
        serialized xml document from this workspace
      • parse

        public Workspace parse​(org.dom4j.Element element)
        Parse a workspace from a Element.
        Specified by:
        parse in interface XmlEntity<Workspace>
        Parameters:
        element - element to parse
        Returns:
        parsed workspace
      • getMainLocation

        public Point getMainLocation()
        Location of the main forms window.
      • getMainSize

        public Dimension getMainSize()
        Dimensions of the main forms window.
      • getConfigLocation

        public Point getConfigLocation()
        Location of the config panels window.
      • getConfigSize

        public Dimension getConfigSize()
        Dimensions of the config panels window.
      • getSelectedConfiguration

        public int getSelectedConfiguration()
        Index of the configuration selected in the MainForm.
      • getMainDividerLocation

        public int getMainDividerLocation()
        Divider location of the main split pane (vertical).
      • getLogDividerLocation

        public int getLogDividerLocation()
        Divider location of the log split pane (horizontal).
      • setMainLocation

        public void setMainLocation​(Point mainLocation)
        Location of the main forms window.
      • setMainSize

        public void setMainSize​(Dimension mainSize)
        Dimensions of the main forms window.
      • setConfigLocation

        public void setConfigLocation​(Point configLocation)
        Location of the config panels window.
      • setConfigSize

        public void setConfigSize​(Dimension configSize)
        Dimensions of the config panels window.
      • setSelectedConfiguration

        public void setSelectedConfiguration​(int selectedConfiguration)
        Index of the configuration selected in the MainForm.
      • setMainDividerLocation

        public void setMainDividerLocation​(int mainDividerLocation)
        Divider location of the main split pane (vertical).
      • setLogDividerLocation

        public void setLogDividerLocation​(int logDividerLocation)
        Divider location of the log split pane (horizontal).
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object