public void clearOptionsData() { getControls(); if ( optionsParameterTree != null ) { optionsParameterTree.getRootChildren().removeAll(); } }
String databaseType = databaseTypeString; if ( currentType != null && currentType.equals( databaseType ) ) { XulTreeRow row = optionsParameterTree.getRootChildren().addNewRow(); row.addCellText( 0, parameterOption ); row.addCellText( 1, value ); int numSet = optionsParameterTree.getRootChildren().getItemCount(); if ( numSet < numToAdd ) { numToAdd -= numSet; XulTreeRow row = optionsParameterTree.getRootChildren().addNewRow(); row.addCellText( 0, "" ); // easy way of putting new cells in the row row.addCellText( 1, "" );
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 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, "" ); } } }
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 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(); }
private void removeTypedOptions( Map<String, String> extraOptions ) { List<Integer> removeList = new ArrayList<Integer>(); Object[][] values = optionsParameterTree.getValues(); for ( int i = 0; i < values.length; i++ ) { String parameter = (String) values[i][0]; // See if it's defined Iterator<String> keys = extraOptions.keySet().iterator(); if ( extraOptions.keySet().size() > 0 ) { while ( keys.hasNext() ) { String param = keys.next(); String parameterKey = param.substring( param.indexOf( '.' ) + 1 ); if ( parameter.equals( parameterKey ) || "".equals( parameter ) ) { // match, remove it if not already in the list if ( !removeList.contains( i ) ) { removeList.add( i ); } } } } else if ( "".equals( parameter ) ) { if ( !removeList.contains( i ) ) { removeList.add( i ); } } } for ( int i = removeList.size() - 1; i >= 0; i-- ) { optionsParameterTree.getRootChildren().removeItem( removeList.get( i ) ); } }
clusterParameterTree.getRootChildren().removeAll(); XulTreeRow row = clusterParameterTree.getRootChildren().addNewRow(); row.addCellText( 0, Const.NVL( meta.getPartitionId(), "" ) ); row.addCellText( 1, Const.NVL( meta.getHostname(), "" ) ); XulTreeRow row = clusterParameterTree.getRootChildren().addNewRow(); row.addCellText( 0, "" ); // easy way of putting new cells in the row row.addCellText( 1, "" );
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() ); } } }
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" ); } } }
@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(); }
tree.getRootChildren().removeAll();
meta.setSQLServerInstance( serverInstanceBox.getValue() ); 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 );
XulTreeChildren treeChildren = previewResultsTable.getRootChildren(); if ( treeChildren != null ) { treeChildren.removeAll();