Package net.sourceforge.squirrel_sql.fw.xml

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLObjectCache


    {
        InputStreamReader isr = null;
        try
        {
            isr = new InputStreamReader(defaultDriversUrl.openStream());
            XMLObjectCache tmp = new XMLObjectCache();
            tmp.load(isr, null, true);

            for (Iterator<ISQLDriver> iter = tmp.getAllForClass(SQL_DRIVER_IMPL); iter.hasNext();) {

                ISQLDriver defaultDriver = iter.next();
                ISQLDriver cachedDriver = getDriver(defaultDriver.getIdentifier());
                if (cachedDriver != null) {
                    if (cachedDriver.getWebSiteUrl() == null
View Full Code Here


        ISQLDriver[] result = null;
        InputStreamReader isr = new InputStreamReader(url.openStream());
        ArrayList<ISQLDriver> missingDrivers = new ArrayList<ISQLDriver>();
        try
        {
            XMLObjectCache tmp = new XMLObjectCache();
            tmp.load(isr, null, true);

            for (Iterator<ISQLDriver> iter = tmp.getAllForClass(SQL_DRIVER_IMPL); iter.hasNext();) {
                ISQLDriver defaultDriver = iter.next();
                if (!containsDriver(defaultDriver)) {
                    missingDrivers.add(defaultDriver);
                }
            }
View Full Code Here

  {
      super(plugin, lafRegister);
      try
      {

         XMLObjectCache cache = plugin.getSettingsCache();
         Iterator<?> it = cache.getAllForClass(PlasticThemePreferences.class);
         if (it.hasNext())
         {
            _prefs = (PlasticThemePreferences) it.next();
         }
         else
         {
            _prefs = new PlasticThemePreferences();

            ClassLoader cl = getLAFRegister().getLookAndFeelClassLoader();
            Class<?> clazz = Class.forName(AbstractPlasticController.DEFAULT_PLASTIC_THEME_CLASS_NAME, false, cl);
            MetalTheme theme = (MetalTheme) clazz.newInstance();
            _prefs.setThemeName(theme.getName());

            try
            {
               cache.add(_prefs);
            }
            catch (DuplicateObjectException ex)
            {
               s_log.error("PlasticThemePreferences object already in XMLObjectCache", ex);
            }
View Full Code Here

    super();

    _cl = register.getLookAndFeelClassLoader();
    _lafData = new SubstanceLafData(_cl);
   
    XMLObjectCache cache = plugin.getSettingsCache();
    Iterator<?> it = cache.getAllForClass(SubstancePreferences.class);
    if (it.hasNext())
    {
      _prefs = (SubstancePreferences) it.next();
    }
    else
    {
      _prefs = new SubstancePreferences();
      try
      {
        cache.add(_prefs);
      }
      catch (DuplicateObjectException ex)
      {
        s_log.error("SubstancePreferences object already in XMLObjectCache", ex);
      }
View Full Code Here

   */
  TonicLookAndFeelController(LAFPlugin plugin) throws IOException
  {
    super();

    XMLObjectCache cache = plugin.getSettingsCache();
    Iterator<?> it = cache.getAllForClass(TonicPreferences.class);
    if (it.hasNext())
    {
      _prefs = (TonicPreferences)it.next();
    }
    else
    {
      _prefs = new TonicPreferences();
      try
      {
        cache.add(_prefs);
      }
      catch (DuplicateObjectException ex)
      {
        s_log.error("TonicPreferences object already in XMLObjectCache", ex);
      }
View Full Code Here

   */
  SkinLookAndFeelController(LAFPlugin plugin) throws IOException
  {
    super();

    XMLObjectCache cache = plugin.getSettingsCache();
    Iterator<?> it = cache.getAllForClass(SkinPreferences.class);
    if (it.hasNext())
    {
      _prefs = (SkinPreferences)it.next();
    }
    else
    {
      _prefs = new SkinPreferences();
      try
      {
        cache.add(_prefs);
      }
      catch (DuplicateObjectException ex)
      {
        s_log.error("SkinPreferences object already in XMLObjectCache", ex);
      }
View Full Code Here

               ////////////////////////////////////////////////////////////////////////////
            };

         _defaultMetalTheme = new DefaultMetalTheme();

         XMLObjectCache cache = plugin.getSettingsCache();
         Iterator<?> it = cache.getAllForClass(MetalThemePreferences.class);
         if (it.hasNext())
         {
            _currentThemePrefs = (MetalThemePreferences) it.next();
         }
         else
         {
            _currentThemePrefs = new MetalThemePreferences();

            ClassLoader cl = getLAFRegister().getLookAndFeelClassLoader();
            Class<?> clazz = Class.forName(MetalLookAndFeelController.DEFAULT_METAL_THEME, false, cl);
            MetalTheme theme = (MetalTheme) clazz.newInstance();
            _currentThemePrefs.setThemeName(theme.getName());

            try
            {
               cache.add(_currentThemePrefs);
            }
            catch (DuplicateObjectException ex)
            {
               s_log.error("MetalThemePreferences object already in XMLObjectCache", ex);
            }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.xml.XMLObjectCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.