Class WindowPreferences

java.lang.Object
jmri.jmrit.throttle.implementation.WindowPreferences

public class WindowPreferences extends Object
A helper class for getting and setting XML attributes of a JInternalFrame or of a Container Will store location, size, visibility and iconification
This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

  • Constructor Details

  • Method Details

    • getPreferences

      public static org.jdom2.Element getPreferences(JInternalFrame c)
      Collect JInternalFrame preferences.
      Parameters:
      c - The JInternalFrame being XMLed.
      Returns:
      An Element containing the following prefs:
      • x location
      • y location
      • width
      • height
      • isIcon
    • setPreferences

      public static void setPreferences(JInternalFrame c, org.jdom2.Element e)
      Set JInternalFrame preferences from an XML Element.
      Parameters:
      c - The JInternalFrame being set.
      e - An Element containing the following prefs:
      • x location
      • y location
      • width
      • height
      • isIcon
    • getPreferences

      public static org.jdom2.Element getPreferences(Container c)
      Collect container preferences.
      Parameters:
      c - The container being XMLed.
      Returns:
      An Element containing the following prefs:
      • x location
      • y location
      • width
      • height
    • setPreferences

      public static void setPreferences(Container c, org.jdom2.Element e, boolean ignorePosition)
      Set Container preferences from an XML Element.
      Parameters:
      c - The Container being set.
      e - An Element containing the following prefs:
      • x location
      • y location
      • width
      • height
      ignorePosition - true to not set location, false to set.
    • setPreferences

      public static void setPreferences(Container c, org.jdom2.Element e)