public void restoreDefaults() { if ( poolParameterTree != null ) { for ( int i = 0; i < poolParameterTree.getRootChildren().getItemCount(); i++ ) { XulTreeItem item = poolParameterTree.getRootChildren().getItem( i ); String parameterName = item.getRow().getCell( 1 ).getLabel(); String defaultValue = DatabaseConnectionPoolParameter .findParameter( parameterName, BaseDatabaseMeta.poolingParameters ).getDefaultValue(); if ( ( defaultValue == null ) || ( defaultValue.trim().length() <= 0 ) ) { continue; } item.getRow().addCellText( 2, defaultValue ); } } }
private void setPoolProperties( Properties properties ) { if ( poolParameterTree != null ) { Object[][] values = poolParameterTree.getValues(); for ( int i = 0; i < values.length; i++ ) { String parameter = (String) values[i][1]; boolean isChecked = properties.containsKey( parameter ); if ( !isChecked ) { continue; } XulTreeItem item = poolParameterTree.getRootChildren().getItem( i ); item.getRow().addCellText( 0, "true" ); // checks the checkbox String value = properties.getProperty( parameter ); item.getRow().addCellText( 2, value ); } } }
if ( optionsParameterTree != null && optionsParameterTree.getRootChildren() != null ) { for ( int i = 0; i < optionsParameterTree.getRootChildren().getItemCount(); i++ ) { XulTreeItem potRow = optionsParameterTree.getRootChildren().getItem( i ); if ( potRow != null && potRow.getRow() != null ) { XulTreeCell cell = potRow.getRow().getCell( 0 );
public void poolingRowChange( int idx ) { if ( idx != -1 ) { if ( idx >= BaseDatabaseMeta.poolingParameters.length ) { idx = BaseDatabaseMeta.poolingParameters.length - 1; } if ( idx < 0 ) { idx = 0; } poolingDescription.setValue( BaseDatabaseMeta.poolingParameters[idx].getDescription() ); XulTreeRow row = poolParameterTree.getRootChildren().getItem( idx ).getRow(); if ( row.getSelectedColumnIndex() == 2 ) { row.addCellText( 0, "true" ); } } }