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 ); } } }
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" ); } } }
private void setDefaultPoolParameters() { if ( poolParameterTree != null ) { for ( DatabaseConnectionPoolParameter parameter : BaseDatabaseMeta.poolingParameters ) { XulTreeRow row = poolParameterTree.getRootChildren().addNewRow(); row.addCellText( 0, "false" ); row.addCellText( 1, parameter.getParameter() ); row.addCellText( 2, parameter.getDefaultValue() ); } } }
tRow.addCellText( nameColumn[c], Const.NVL( v.getName(), "" ) ); tRow.addCellText( dataTypeColumn[c], v.getTypeDesc() ); tRow.addCellText( lengthColumn, Integer.toString( v.getLength() ) ); tRow.addCellText( precisionColumn, Integer.toString( v.getPrecision() ) ); if ( !listener.tableItemInserted( table.getItem( tRow.getParent().getParent().getChildNodes().indexOf( tRow.getParent() ) ), v ) ) { tRow.getParent().getParent().removeChild( tRow.getParent() );
XulTreeItem potRow = optionsParameterTree.getRootChildren().getItem( i ); if ( potRow != null && potRow.getRow() != null ) { XulTreeCell cell = potRow.getRow().getCell( 0 ); XulTreeCell cell2 = potRow.getRow().getCell( 1 ); if ( cell != null && cell.getLabel() != null && cell.getLabel().equals( "instance" ) ) { cell2.setLabel( serverInstanceBox.getValue() );
theCell = new SwtTreeCell( null ); theCell.setLabel( theValue == null ? "" : theValue.toString() ); theRow.addCell( theCell );
public void editOptions( int index ) { if ( index + 1 == optionsParameterTree.getRows() ) { // editing last row add a new one below Object[][] values = optionsParameterTree.getValues(); Object[] row = values[values.length - 1]; if ( row != null && ( !StringUtils.isEmpty( (String) row[0] ) || !StringUtils.isEmpty( (String) row[1] ) ) ) { // acutally have something in current last row XulTreeRow newRow = optionsParameterTree.getRootChildren().addNewRow(); newRow.addCellText( 0, "" ); newRow.addCellText( 1, "" ); } } }
@Bindable public void selectAll() { XulTree tree = (XulTree) document.getElementById( "csvModelDataTable" ); //$NON-NLS-1$ for ( XulComponent component : tree.getRootChildren().getChildNodes() ) { XulTreeItem item = (XulTreeItem) component; for ( XulComponent childComp : item.getChildNodes() ) { XulTreeRow row = (XulTreeRow) childComp; XulTreeCell cell = row.getCell( 0 ); cell.setValue( true ); } } datasourceModel.getModelInfo().validate(); }
XulTreeCell cell = (XulTreeCell) document.createElement( "treecell" ); //$NON-NLS-1$ cell.setLabel( getCellData( data, i, j ) ); row.addCell( cell );
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 ); } } }
@Bindable public void deselectAll() { XulTree tree = (XulTree) document.getElementById( "csvModelDataTable" ); //$NON-NLS-1$ for ( XulComponent component : tree.getRootChildren().getChildNodes() ) { XulTreeItem item = (XulTreeItem) component; for ( XulComponent childComp : item.getChildNodes() ) { XulTreeRow row = (XulTreeRow) childComp; XulTreeCell cell = row.getCell( 0 ); cell.setValue( false ); } } datasourceModel.getModelInfo().validate(); }
row.addCellText( 0, Const.NVL( meta.getPartitionId(), "" ) ); row.addCellText( 1, Const.NVL( meta.getHostname(), "" ) ); row.addCellText( 2, Const.NVL( meta.getPort(), "" ) ); row.addCellText( 3, Const.NVL( meta.getDatabaseName(), "" ) ); row.addCellText( 4, Const.NVL( meta.getUsername(), "" ) ); row.addCellText( 5, Const.NVL( meta.getPassword(), "" ) ); row.addCellText( 0, "" ); // easy way of putting new cells in the row row.addCellText( 1, "" ); row.addCellText( 2, "" ); row.addCellText( 3, "" ); row.addCellText( 4, "" ); row.addCellText( 5, "" );
if ( currentType != null && currentType.equals( databaseType ) ) { XulTreeRow row = optionsParameterTree.getRootChildren().addNewRow(); row.addCellText( 0, parameterOption ); row.addCellText( 1, value ); row.addCellText( 0, "" ); // easy way of putting new cells in the row row.addCellText( 1, "" );