Package net.sourceforge.squirrel_sql.fw.sql

Examples of net.sourceforge.squirrel_sql.fw.sql.SQLDriverPropertyCollection


  }

  public static SQLAlias getEasyMockSQLAlias(IIdentifier SqlAliasId,
        IIdentifier SqlDriverId) {
     SQLAlias mockSqlAlias = createMock(SQLAlias.class);
     SQLDriverPropertyCollection mockSqlDriverPropCol = createMock(SQLDriverPropertyCollection.class);
     expect(mockSqlAlias.getIdentifier()).andReturn(SqlAliasId).anyTimes();
     expect(mockSqlAlias.getName()).andReturn("TestAliasName").anyTimes();
     expect(mockSqlAlias.getDriverIdentifier()).andReturn(SqlDriverId)
                                               .anyTimes();
     expect(mockSqlAlias.getUrl()).andReturn("TestUrl").anyTimes();
View Full Code Here


    public static void main(String[] args) {
        ApplicationArguments.initialize(new String[] {});
       
       
        final JFrame frame = new JFrame("Test DriverPropertiesPanel");
        SQLDriverPropertyCollection propertyCollection =
          new SQLDriverPropertyCollection();
       
        DriverPropertyInfo mockDriverPropertyInfo = new DriverPropertyInfo("propName", "propValue");
        mockDriverPropertyInfo.description = "Test prop description";
       
        SQLDriverProperty prop = new SQLDriverProperty(mockDriverPropertyInfo);
       
        propertyCollection.setDriverProperties(new SQLDriverProperty[] { prop });
        DriverPropertiesPanel panel = new DriverPropertiesPanel(propertyCollection);
       
        frame.getContentPane().add(panel);
        frame.setSize(500,300);
        frame.setVisible(true);
View Full Code Here

      SQLDriverProperty[] newar = new SQLDriverProperty[count];
      for (int i = 0; i < count; ++i)
      {
         newar[i] = (SQLDriverProperty)_driverProps.getDriverProperty(i).clone();
      }
      SQLDriverPropertyCollection coll = new SQLDriverPropertyCollection();
      coll.setDriverProperties(newar);
      return coll;
   }
View Full Code Here

         _errMsg = s_stringMgr.getString("DriverPropertiesController.gettingDriverPropetiesFailed");
         _app.getMessageHandler().showErrorMessage(_errMsg);
         //return;
      }

      SQLDriverPropertyCollection driverPropertiesClone = alias.getDriverPropertiesClone();
      driverPropertiesClone.applyDriverPropertynfo(infoAr);
      _propsPnl = new DriverPropertiesPanel(driverPropertiesClone);

      _propsPnl.chkUseDriverProperties.setSelected(alias.getUseDriverProperties());
      updateTableEnabled();
View Full Code Here

    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row,
      int col)
    {
      if (col != IDX_VALUE) { throw new IllegalStateException("Editor used for cell other than value"); }

      SQLDriverPropertyCollection coll = getTypedModel().getSQLDriverProperties();
      SQLDriverProperty sdp = coll.getDriverProperty(row);
      DriverPropertyInfo prop = sdp.getDriverPropertyInfo();
      if (prop.choices != null && prop.choices.length > 0)
      {
        _comboEditor.removeAllItems();
        for (int i = 0; i < prop.choices.length; ++i)
View Full Code Here

      _btnsPnl.setExecuting(true);
      setStatusText(s_stringMgr.getString("ConnectionInternalFrame.connecting"));
      _user.setEnabled(false);
      _password.setEnabled(false);

         SQLDriverPropertyCollection driverProperties = _alias.getDriverPropertiesClone();
         if (!_alias.getUseDriverProperties())
         {
            driverProperties.clear();
         }
      _handler.performOK(this, _user.getText(), _password.getText(), driverProperties);
    }
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.sql.SQLDriverPropertyCollection

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.