public void browse() { try { XulTextbox filename = (XulTextbox) document.getElementById( "keytab" ); XulFileDialog dialog = (XulFileDialog) document.createElement( "filedialog" ); XulFileDialog.RETURN_CODE retval = dialog.showOpenDialog(); if ( retval == XulFileDialog.RETURN_CODE.OK ) { File file = (File) dialog.getFile(); filename.setValue( file.getAbsolutePath() ); } } catch ( XulException e ) { log.logError( resourceBundle.getString( "error.file_browse" ), e ); } }
public void disablePortIfInstancePopulated() { String serverInstance = serverInstanceBox.getValue(); if ( serverInstance != null && serverInstance.length() > 0 ) { portNumberBox.setDisabled( true ); } else { portNumberBox.setDisabled( false ); } }
public void show() { if ( loginModel.getUsername() != null ) { userPassword.setFocus(); } else { username.setFocus(); } // PDI-7443: The repo list does not show the selected repo // make the layout play nice, this is necessary to have the selection box scroll reliably if ( availableRepositories.getRows() < 4 ) { availableRepositories.setRows( 4 ); } int idx = loginModel.getRepositoryIndex( loginModel.getSelectedRepository() ); if ( idx >= 0 ) { availableRepositories.setSelectedIndex( idx ); } // END OF PDI-7443 loginDialog.show(); }
meta.setHostname( hostNameBox.getValue() ); meta.setDBName( databaseNameBox.getValue() ); meta.setUsername( userNameBox.getValue() ); meta.setPassword( passwordBox.getValue() ); meta.setDataTablespace( dataTablespaceBox.getValue() ); meta.setIndexTablespace( indexTablespaceBox.getValue() ); meta.setSQLServerInstance( serverInstanceBox.getValue() ); if ( optionsParameterTree != null && optionsParameterTree.getRootChildren() != null ) { for ( int i = 0; i < optionsParameterTree.getRootChildren().getItemCount(); i++ ) { XulTreeCell cell2 = potRow.getRow().getCell( 1 ); if ( cell != null && cell.getLabel() != null && cell.getLabel().equals( "instance" ) ) { cell2.setLabel( serverInstanceBox.getValue() ); if ( serverInstanceBox.getValue().trim().length() == 0 ) { cell.setLabel( "" ); meta.getAttributes().put( "SAPLanguage", languageBox.getValue() ); meta.getAttributes().put( "SAPSystemNumber", systemNumberBox.getValue() ); meta.getAttributes().put( "SAPClient", clientBox.getValue() ); meta.getAttributes().put( GenericDatabaseMeta.ATRRIBUTE_CUSTOM_URL, customUrlBox.getValue() );
public void handleUseSecurityCheckbox() { if ( useIntegratedSecurityCheck != null ) { if ( useIntegratedSecurityCheck.isChecked() ) { userNameBox.setDisabled( true ); passwordBox.setDisabled( true ); } else { userNameBox.setDisabled( false ); passwordBox.setDisabled( false ); } } }
public void init() { try { resBundle = (ResourceBundle) super.getXulDomContainer().getResourceBundles().get( 0 ); importDialogModel = new MetadataImportDialogModel(); localizedBundlesTree = (XulTree) document.getElementById( "localizedBundlesTree" ); domainIdText = (XulTextbox) document.getElementById( "domainIdText" ); domainIdText.addPropertyChangeListener( new DomainIdChangeListener() ); importDialog = (XulDialog) document.getElementById( "importDialog" ); fileLabel = (XulLabel) document.getElementById( "fileLabel" ); metaFileLocation = (XulLabel) document.getElementById( "uploadFileLabel" ); acceptButton = (XulButton) document.getElementById( "importDialog_accept" ); hiddenArea = (XulVbox) document.getElementById( "metadataImportCard" ); acceptButton.setDisabled( true ); bf.setBindingType( Binding.Type.ONE_WAY ); Binding localizedBundlesBinding = bf.createBinding( importDialogModel, "localizedBundles", localizedBundlesTree, "elements" ); localizedBundlesBinding.fireSourceChanged(); } catch ( Exception e ) { e.printStackTrace(); } }
if ( Boolean.parseBoolean( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ) ) { serverInstanceBox.addPropertyChangeListener( new PropertyChangeListener() {
meta.setName( connectionNameBox.getValue() ); meta.setDisplayName( connectionNameBox.getValue() ); meta.setDBPort( portNumberBox.getValue() ); meta.setPreferredSchemaName( preferredSchemaName.getValue() ); meta.setConnectSQL( sqlBox.getValue() ); if ( poolSizeBox != null ) { try { int initialPoolSize = Integer.parseInt( this.databaseMeta.environmentSubstitute( poolSizeBox.getValue() ) ); meta.setInitialPoolSize( initialPoolSize ); } catch ( NumberFormatException e ) { int maxPoolSize = Integer.parseInt( this.databaseMeta.environmentSubstitute( maxPoolSizeBox.getValue() ) ); meta.setMaximumPoolSize( maxPoolSize ); } catch ( NumberFormatException e ) {
public void onPoolingCheck() { if ( poolingCheck != null ) { boolean dis = !poolingCheck.isChecked(); if ( poolSizeBox != null ) { poolSizeBox.setDisabled( dis ); } if ( maxPoolSizeBox != null ) { maxPoolSizeBox.setDisabled( dis ); } if ( poolSizeLabel != null ) { poolSizeLabel.setDisabled( dis ); } if ( maxPoolSizeLabel != null ) { maxPoolSizeLabel.setDisabled( dis ); } if ( poolParameterTree != null ) { poolParameterTree.setDisabled( dis ); } if ( poolingParameterDescriptionLabel != null ) { poolingParameterDescriptionLabel.setDisabled( dis ); } if ( poolingDescriptionLabel != null ) { poolingDescriptionLabel.setDisabled( dis ); } if ( poolingDescription != null ) { poolingDescription.setDisabled( dis ); } } }
analysisParametersDialog = (XulDialog) document.getElementById( "analysisParametersDialog" ); paramNameTextBox = (XulTextbox) document.getElementById( "paramNameTextBox" ); paramNameTextBox.addPropertyChangeListener( new ParametersChangeListener() ); paramValueTextBox = (XulTextbox) document.getElementById( "paramValueTextBox" ); paramValueTextBox.addPropertyChangeListener( new ParametersChangeListener() ); analysisPreferencesDeck = (XulDeck) document.getElementById( "analysisPreferencesDeck" ); availableRadio = (XulRadio) document.getElementById( "availableRadio" );
public void changed( LocationEvent event ) { Browser browser = (Browser) event.widget; if ( back != null ) { back.setDisabled( !browser.isBackEnabled() ); forward.setDisabled( !browser.isForwardEnabled() ); location.setValue( browser.getUrl() ); } }
private void setFocus() { csvDatasourceName.setFocus(); }
private int fetchValue( XulTextbox textbox ) { int result = -1; if ( textbox != null && !StringUtil.isEmpty( textbox.getValue() ) ) { try { result = Integer.parseInt( textbox.getValue() ); } catch ( NumberFormatException e ) { log.logError( BaseMessages.getString( "HadoopEnter.Error.ParseInteger", textbox.getValue() ) ); } } return result; }
numInstances.setDisabled( false );
uploadedFileTextBox.addPropertyChangeListener( new PropertyChangeListener() { public void propertyChange( PropertyChangeEvent evt ) { if ( evt.getPropertyName().equals( "value" ) ) {
hostNameBox.setValue( meta.getHostname() ); databaseNameBox.setValue( meta.getDatabaseName() ); userNameBox.setValue( meta.getUsername() ); passwordBox.setValue( meta.getPassword() ); dataTablespaceBox.setValue( meta.getDataTablespace() ); indexTablespaceBox.setValue( meta.getIndexTablespace() ); serverInstanceBox.setValue( meta.getSQLServerInstance() ); languageBox.setValue( meta.getAttributes().getProperty( "SAPLanguage" ) ); systemNumberBox.setValue( meta.getAttributes().getProperty( "SAPSystemNumber" ) ); clientBox.setValue( meta.getAttributes().getProperty( "SAPClient" ) ); customUrlBox.setValue( meta.getAttributes().getProperty( GenericDatabaseMeta.ATRRIBUTE_CUSTOM_URL ) ); customDriverClassBox.setValue( meta.getAttributes().getProperty( GenericDatabaseMeta.ATRRIBUTE_CUSTOM_DRIVER_CLASS ) ); serverNameBox.setValue( meta.getServername() ); webAppName.setValue( DEFAULT_WEB_APPLICATION_NAME ); } else {
public void setFocus() { datasourceNameTextBox.setFocus(); setStepImageVisible( true ); }
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 fixFocusLostOnTab() { XulTextbox jobEntryName = (XulTextbox) getXulDomContainer().getDocumentRoot().getElementById( XUL_JOBENTRY_NAME ); jobEntryName.setFocus(); }