Package net.sourceforge.squirrel_sql.client.preferences

Examples of net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences


    public static void main(String[] args) {
        // TODO Auto-generated method stub
        ApplicationArguments.initialize(new String[] {});
        SquirrelResources _resources =
            new SquirrelResources("net.sourceforge.squirrel_sql.client.resources.squirrel");
        SquirrelPreferences _prefs = SquirrelPreferences.load();
       

        new SplashScreen(_resources, 15, _prefs);

View Full Code Here


  private void preferencesHaveChanged(PropertyChangeEvent evt)
  {
    String propName = evt != null ? evt.getPropertyName() : null;

    final SquirrelPreferences prefs = _app.getSquirrelPreferences();

    if (propName == null
      || propName.equals(
        SquirrelPreferences.IPropertyNames.SHOW_CONTENTS_WHEN_DRAGGING))
    {
      if (prefs.getShowContentsWhenDragging())
      {
        getDesktopContainer().putClientProperty("JDesktopPane.dragMode", null);
      }
      else
      {
        getDesktopContainer().putClientProperty("JDesktopPane.dragMode", "outline");
      }
    }

    if (propName == null
      || propName.equals(SquirrelPreferences.IPropertyNames.SHOW_MAIN_STATUS_BAR))
    {
      final boolean show = prefs.getShowMainStatusBar();
      if (!show && _statusBarVisible)
      {
        getContentPane().remove(_statusBar);
        _statusBarVisible = false;
      }
      else if (show && !_statusBarVisible)
      {
        getContentPane().add(_statusBar, BorderLayout.SOUTH);
        _statusBarVisible = true;
      }
    }
    if (propName == null
      || propName.equals(SquirrelPreferences.IPropertyNames.SHOW_MAIN_TOOL_BAR))
    {
      final boolean show = prefs.getShowMainToolBar();
      if (!show && _toolBar != null)
      {
        getContentPane().remove(_toolBar);
        _toolBar = null;
      }
View Full Code Here

   }


  private void setupFromPreferences()
  {
    final SquirrelPreferences prefs = _app.getSquirrelPreferences();
    MainFrameWindowState ws = prefs.getMainFrameWindowState();

    // Position window to where it was when last closed. If this is not
    // on the screen, move it back on to the screen.
    setBounds(ws.getBounds().createRectangle());
    if (!GUIUtils.isWithinParent(this))
View Full Code Here

  /**
   * Execute this command.
   */
  public void execute()
  {
    SquirrelPreferences prefs = _app.getSquirrelPreferences();
    if (_show == null)
    {
      prefs.setShowLoadedDriversOnly(!prefs.getShowLoadedDriversOnly());
    }
    else
    {
      prefs.setShowLoadedDriversOnly(_show.booleanValue());
    }
  }
View Full Code Here

            Exception ex = null;
            try {
                if (_exportPrefsChk.getModel().isSelected()) {
                    File f = new File(_exportPrefsText.getText());
                    if (!f.exists() || confirmOverwrite(f)) {
                        SquirrelPreferences prefs = _app.getSquirrelPreferences();
                        new XMLBeanWriter(prefs).save(f);
                    }
                }
                if (_exportDriversChk.getModel().isSelected()) {
                    File f = new File(_exportDriversText.getText());
View Full Code Here

   *
   * @throws  IOException    Thrown if an IO error occurs.
   */
  protected void writeToFile(File file) throws IOException, XMLException
  {
    final SquirrelPreferences prefs = _plugin.getApplication().getSquirrelPreferences();
    new XMLBeanWriter(prefs).save(file);
  }
View Full Code Here

//    IAliasesList al = getAliasesListInternalFrame().getAliasesList();
  }

  private void setupFromPreferences()
  {
    final SquirrelPreferences prefs = _app.getSquirrelPreferences();
    final MainFrameWindowState ws = prefs.getMainFrameWindowState();

      prepareAliasWindow(ws);
      prepareDriversWindow(ws);
    prefs.setMainFrameWindowState(new MainFrameWindowState(this));
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences

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.