idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
119,100
protected DCComboBox < EnumerationValue > createComboBox ( final InputColumn < ? > inputColumn , EnumerationValue mappedEnum ) { if ( mappedEnum == null && inputColumn != null ) { mappedEnum = getSuggestedValue ( inputColumn ) ; } final EnumerationValue [ ] enumConstants = getEnumConstants ( inputColumn , _mappedEnumsP...
Creates a combobox for a particular input column .
119,101
protected ListCellRenderer < ? super EnumerationValue > getComboBoxRenderer ( final InputColumn < ? > inputColumn , final Map < InputColumn < ? > , DCComboBox < EnumerationValue > > mappedEnumComboBoxes , final EnumerationValue [ ] enumConstants ) { return new EnumComboBoxListRenderer ( ) ; }
Gets the renderer of items in the comboboxes presenting the enum values .
119,102
public static String getValueLabel ( final Object value ) { if ( value == null ) { return NULL_LABEL ; } if ( value instanceof HasLabelAdvice ) { final String suggestedLabel = ( ( HasLabelAdvice ) value ) . getSuggestedLabel ( ) ; if ( ! Strings . isNullOrEmpty ( suggestedLabel ) ) { return suggestedLabel ; } } if ( va...
Gets the label of a value eg . a value in a crosstab .
119,103
public DCPanel createPanel ( ) { final DCPanel parentPanel = new DCPanel ( ) ; parentPanel . setLayout ( new BorderLayout ( ) ) ; parentPanel . add ( _sourceComboBoxPanel , BorderLayout . CENTER ) ; parentPanel . add ( _buttonPanel , BorderLayout . EAST ) ; return parentPanel ; }
Creates a panel containing ButtonPanel and SourceComboboxPanel
119,104
public void updateSourceComboBoxes ( final Datastore datastore , final Table table ) { _datastore = datastore ; _table = table ; for ( final SourceColumnComboBox sourceColComboBox : _sourceColumnComboBoxes ) { sourceColComboBox . setModel ( datastore , table ) ; } }
updates the SourceColumnComboBoxes with the provided datastore and table
119,105
public Date getFrom ( ) { final TimeInterval first = intervals . first ( ) ; if ( first != null ) { return new Date ( first . getFrom ( ) ) ; } return null ; }
Gets the first date in this timeline
119,106
public Date getTo ( ) { Long to = null ; for ( final TimeInterval interval : intervals ) { if ( to == null ) { to = interval . getTo ( ) ; } else { to = Math . max ( interval . getTo ( ) , to ) ; } } if ( to != null ) { return new Date ( to ) ; } return null ; }
Gets the last date in this timeline
119,107
public static double [ ] [ ] toFeatureVector ( Iterable < ? extends MLRecord > data , List < MLFeatureModifier > featureModifiers ) { final List < double [ ] > trainingInstances = new ArrayList < > ( ) ; for ( MLRecord record : data ) { final double [ ] features = generateFeatureValues ( record , featureModifiers ) ; t...
Generates a matrix of feature values for each record .
119,108
public static int [ ] toClassificationVector ( Iterable < MLClassificationRecord > data ) { final List < Integer > responseVariables = new ArrayList < > ( ) ; final List < Object > classifications = new ArrayList < > ( ) ; for ( MLClassificationRecord record : data ) { final Object classification = record . getClassifi...
Generates a vector of classifications for each record .
119,109
public static double [ ] toRegressionOutputVector ( Iterable < MLRegressionRecord > data ) { final Stream < MLRegressionRecord > stream = StreamSupport . stream ( data . spliterator ( ) , false ) ; return stream . mapToDouble ( MLRegressionRecord :: getRegressionOutput ) . toArray ( ) ; }
Generates a vector of regression outputs for every record
119,110
public final void batchUpdateWidget ( final Runnable action ) { _batchUpdateCounter ++ ; try { action . run ( ) ; } catch ( final RuntimeException e ) { logger . error ( "Exception occurred in widget batch update, fireValueChanged() will not be invoked" , e ) ; throw e ; } finally { _batchUpdateCounter -- ; } if ( _bat...
Executes a widget batch update . Listeners and other effects of updating individual parts of a widget may be turned off during batch updates .
119,111
public static ClassLoader getExtensionClassLoader ( ) { final Collection < ClassLoader > childClassLoaders = new ArrayList < > ( ) ; childClassLoaders . addAll ( _allExtensionClassLoaders ) ; childClassLoaders . add ( ClassLoaderUtils . getParentClassLoader ( ) ) ; return new CompoundClassLoader ( childClassLoaders ) ;...
Gets the classloader that represents the currently loaded extensions classes .
119,112
public boolean setProgress ( final int currentRow ) { final boolean result = _progressBar . setValueIfGreater ( currentRow ) ; if ( result ) { _progressCountLabel . setText ( formatNumber ( currentRow ) ) ; } return result ; }
Sets the progress of the processing of the table .
119,113
private Column [ ] getQueryOutputColumns ( final boolean checkNames ) { if ( queryOutputColumns == null ) { try ( DatastoreConnection con = datastore . openConnection ( ) ) { queryOutputColumns = con . getSchemaNavigator ( ) . convertToColumns ( schemaName , tableName , outputColumns ) ; } } else if ( checkNames ) { if...
Gets the output columns of the lookup query
119,114
public NamedPatternMatch < E > match ( final String string ) { final Matcher matcher = pattern . matcher ( string ) ; while ( matcher . find ( ) ) { final int start = matcher . start ( ) ; final int end = matcher . end ( ) ; if ( start == 0 && end == string . length ( ) ) { final Map < E , String > resultMap = new Enum...
Matches a string against this named pattern .
119,115
public static < E > int compare ( final Comparable < E > obj1 , final E obj2 ) { if ( obj1 == obj2 ) { return 0 ; } if ( obj1 == null ) { return - 1 ; } if ( obj2 == null ) { return 1 ; } return obj1 . compareTo ( obj2 ) ; }
Compares two objects of which one of them is a comparable of the other .
119,116
private URI findFile ( final String filePath , final boolean upload ) { try { URI fileURI ; try { fileURI = _hadoopDefaultFS . getUri ( ) . resolve ( filePath ) ; } catch ( final Exception e ) { fileURI = null ; } if ( ( fileURI == null || ! _hadoopDefaultFS . exists ( new Path ( fileURI ) ) ) && upload ) { final File ...
Tries to find a file on HDFS and optionally uploads it if not found .
119,117
public static void setFlotHome ( String flotHome ) { if ( flotHome == null || flotHome . trim ( ) . isEmpty ( ) ) { System . clearProperty ( SYSTEM_PROPERTY_FLOT_HOME ) ; } else { final String propValue = flotHome . endsWith ( "/" ) ? flotHome . substring ( 0 , flotHome . length ( ) - 1 ) : flotHome ; System . setPrope...
Sets the home folder of all flot javascript files
119,118
public void attach ( final AnalyzerResult explorationResult ) { final ResultProducer resultProducer ; if ( explorationResult == null ) { resultProducer = null ; } else { resultProducer = new DefaultResultProducer ( explorationResult ) ; } attach ( resultProducer ) ; }
Attaches an AnalyzerResult as result - exploration data for the navigated position of the crosstab .
119,119
public String getHref ( ) { final String displayName = _componentDescriptor . getDisplayName ( ) ; final String filename = StringUtils . replaceWhitespaces ( displayName . toLowerCase ( ) . trim ( ) , "_" ) . replaceAll ( "\\/" , "_" ) . replaceAll ( "\\\\" , "_" ) ; return filename + ".html" ; }
Gets the href attribute content if a link to this component should be made from elsewhere in the component docs .
119,120
public void reorderValue ( final InputColumn < ? > [ ] sortedValue ) { final int offset = 2 ; for ( int i = 0 ; i < sortedValue . length ; i ++ ) { final InputColumn < ? > inputColumn = sortedValue [ i ] ; final JComponent decoration = getOrCreateCheckBoxDecoration ( inputColumn , true ) ; final int position = offset +...
Reorders the values
119,121
public AverageBuilder addValue ( final Number number ) { final double total = _average * _numValues + number . doubleValue ( ) ; _numValues ++ ; _average = total / _numValues ; return this ; }
Adds a value to the average that is being built .
119,122
public boolean setValueIfGreater ( final int newValue ) { final boolean greater = _value . setIfSignificantToUser ( newValue ) ; if ( greater ) { WidgetUtils . invokeSwingAction ( ( ) -> DCProgressBar . super . setValue ( newValue ) ) ; } return greater ; }
Sets the value of the progress bar if the new value is greater than the previous value .
119,123
private void createAnalyzers ( final AnalysisJobBuilder ajb , final Class < ? extends Analyzer < ? > > analyzerClass , final List < InputColumn < ? > > columns ) { final int columnsPerAnalyzer = getColumnsPerAnalyzer ( ) ; AnalyzerComponentBuilder < ? > analyzerJobBuilder = ajb . addAnalyzer ( analyzerClass ) ; int col...
Registers analyzers and up to 4 columns per analyzer . This restriction is to ensure that results will be nicely readable . A table might contain hundreds of columns .
119,124
public static Field [ ] getAllFields ( final Class < ? > clazz ) { final List < Field > allFields = new ArrayList < > ( ) ; addFields ( allFields , clazz ) ; return allFields . toArray ( new Field [ allFields . size ( ) ] ) ; }
Gets all fields of a class including private fields in super - classes .
119,125
public static Field [ ] getNonSyntheticFields ( final Class < ? > clazz ) { final List < Field > fieldList = new ArrayList < > ( ) ; addFields ( fieldList , clazz , true ) ; return fieldList . toArray ( new Field [ fieldList . size ( ) ] ) ; }
Gets non - synthetic fields of a class including private fields in super - classes .
119,126
private void awaitTasks ( ) { if ( _tasksPending . get ( ) == 0 ) { return ; } synchronized ( this ) { while ( _tasksPending . get ( ) != 0 ) { try { logger . info ( "Scan tasks still pending, waiting" ) ; wait ( ) ; } catch ( final InterruptedException e ) { logger . debug ( "Interrupted while awaiting task completion...
Waits for all pending tasks to finish
119,127
public final boolean satisfiedForConsume ( final FilterOutcomes outcomes , final InputRow row ) { final boolean satisfiedOutcomesForConsume = satisfiedOutcomesForConsume ( _hasComponentRequirement , row , outcomes ) ; if ( ! satisfiedOutcomesForConsume ) { return false ; } return satisfiedInputsForConsume ( row , outco...
Ensures that just a single outcome is satisfied
119,128
public Object getVertex ( final Point2D point2D ) { final GraphElementAccessor < ? , ? > pickSupport = _visualizationViewer . getPickSupport ( ) ; @ SuppressWarnings ( "rawtypes" ) final Layout graphLayout = _visualizationViewer . getModel ( ) . getGraphLayout ( ) ; @ SuppressWarnings ( "unchecked" ) final Object verte...
Gets the vertex at a particular point or null if it does not exist .
119,129
public void cancelDownload ( final boolean hideWindowImmediately ) { logger . info ( "Cancel of download requested" ) ; _cancelled = true ; if ( hideWindowImmediately && _downloadProgressWindow != null ) { WidgetUtils . invokeSwingAction ( _downloadProgressWindow :: close ) ; } }
Cancels the file download .
119,130
public void updateProgress ( final Table table , final int currentRow ) { final TableProgressInformationPanel tableProgressInformationPanel = getTableProgressInformationPanel ( table , - 1 ) ; final boolean greater = tableProgressInformationPanel . setProgress ( currentRow ) ; if ( ! greater ) { return ; } ProgressCoun...
Informs the panel that the progress for a table is updated
119,131
private boolean scanHadoopConfigFiles ( final ServerInformationCatalog serverInformationCatalog , final String selectedServer ) { final HadoopClusterInformation clusterInformation ; if ( selectedServer != null ) { clusterInformation = ( HadoopClusterInformation ) serverInformationCatalog . getServer ( selectedServer ) ...
This scans Hadoop environment variables for a directory with configuration files
119,132
public Map < ComponentJob , AnalyzerResult > getUnsafeResultElements ( ) { if ( _unsafeResultElements == null ) { _unsafeResultElements = new LinkedHashMap < > ( ) ; final Map < ComponentJob , AnalyzerResult > resultMap = _analysisResult . getResultMap ( ) ; for ( final Entry < ComponentJob , AnalyzerResult > entry : r...
Gets a map of unsafe result elements ie . elements that cannot be saved because serialization fails .
119,133
private void escapeValueTo ( final String field , final StringBuilder target ) { if ( field == null ) { target . append ( DETAILS_QUOTE_CHAR ) ; target . append ( DETAILS_QUOTE_CHAR ) ; return ; } target . append ( DETAILS_QUOTE_CHAR ) ; if ( field . indexOf ( DETAILS_ESCAPE_CHAR ) == - 1 && field . indexOf ( DETAILS_Q...
Escapes value for a CSV line and appends it to the target .
119,134
public void createMeasureDimensionValueCombinationCrosstab ( final Map < ValueCombination < Number > , Number > valueCombinations , final Crosstab < Number > valueCombinationCrosstab ) { if ( CrosstabReducerHelper . findDimension ( valueCombinationCrosstab , BooleanAnalyzer . DIMENSION_MEASURE ) ) { final SortedSet < E...
Creates the measure dimension based on the sorted value combinations
119,135
public void addValueCombinationsCrosstabDimension ( final Map < ValueCombination < Number > , Number > valueCombMapList , final Crosstab < Number > partialCrosstab ) { final CrosstabNavigator < Number > nav = new CrosstabNavigator < > ( partialCrosstab ) ; final CrosstabDimension columnDimension = partialCrosstab . get...
Gather the sum of all possible value combinations of the partial crosstabs
119,136
public void onConfigurationChanged ( ) { final Collection < PropertyWidget < ? > > widgets = getWidgets ( ) ; if ( logger . isDebugEnabled ( ) ) { final StringBuilder sb = new StringBuilder ( ) ; sb . append ( "id=" ) ; sb . append ( System . identityHashCode ( this ) ) ; sb . append ( " - onConfigurationChanged() - no...
Invoked whenever a configured property within this widget factory is changed .
119,137
protected Collection < String > normalize ( String string , final boolean tokenize ) { if ( string == null ) { return Collections . emptyList ( ) ; } if ( tokenize ) { final Collection < String > result = new LinkedHashSet < > ( ) ; result . addAll ( normalize ( string , false ) ) ; final Splitter splitter = Splitter ....
Normalizes the incoming string before doing matching
119,138
private ValueFrequency getDistinctValueCount ( final ValueCountingAnalyzerResult res ) { int distinctValueCounter = 0 ; ValueFrequency valueCount = null ; if ( res . getNullCount ( ) > 0 ) { distinctValueCounter ++ ; valueCount = new SingleValueFrequency ( LabelUtils . NULL_LABEL , res . getNullCount ( ) ) ; } final in...
Determines if a group result has just a single distinct value count . If so this value count is returned or else null is returned .
119,139
public JToggleButton getSelectedToggleButton ( ) { for ( final AbstractButton button : _buttons ) { if ( button instanceof JToggleButton ) { if ( button . isSelected ( ) ) { return ( JToggleButton ) button ; } } } return null ; }
Gets the currently selected toggle button if any .
119,140
public static void main ( final String [ ] args ) { LookAndFeelManager . get ( ) . init ( ) ; final ComboButton comboButton1 = new ComboButton ( ) ; comboButton1 . addButton ( "Foo!" , IconUtils . ACTION_ADD_DARK , true ) ; comboButton1 . addButton ( "Boo!" , IconUtils . ACTION_REMOVE_DARK , true ) ; final ComboButton ...
a simple test app
119,141
public final void setMetadataProperty ( final String key , final String value ) { _metadataProperties . put ( key , value ) ; }
Sets a metadata property
119,142
public int launch ( final String configurationHdfsPath , final String jobHdfsPath ) throws Exception { final File hadoopConfDir = createTemporaryHadoopConfDir ( ) ; final SparkLauncher sparkLauncher = createSparkLauncher ( hadoopConfDir , configurationHdfsPath , jobHdfsPath , null ) ; return launch ( sparkLauncher ) ; ...
Launches and waits for the execution of a DataCleaner job on Spark .
119,143
public boolean removeHadoopClusterServerInformation ( final String serverName ) { final Element serverInformationCatalogElement = getServerInformationCatalogElement ( ) ; final Element hadoopClustersElement = getOrCreateChildElementByTagName ( serverInformationCatalogElement , "hadoop-clusters" ) ; return removeChildEl...
Removes a Hadoop cluster by its name if it exists and is recognizeable by the externalizer .
119,144
public Element getDictionariesElement ( ) { final Element referenceDataCatalogElement = getReferenceDataCatalogElement ( ) ; final Element dictionariesElement = getOrCreateChildElementByTagName ( referenceDataCatalogElement , "dictionaries" ) ; if ( dictionariesElement == null ) { throw new IllegalStateException ( "Cou...
Gets the XML element that represents the dictionaries
119,145
public Element getSynonymCatalogsElement ( ) { final Element referenceDataCatalogElement = getReferenceDataCatalogElement ( ) ; final Element synonymCatalogsElement = getOrCreateChildElementByTagName ( referenceDataCatalogElement , "synonym-catalogs" ) ; if ( synonymCatalogsElement == null ) { throw new IllegalStateExc...
Gets the XML element that represents the synonym catalogs
119,146
public Element getStringPatternsElement ( ) { final Element referenceDataCatalogElement = getReferenceDataCatalogElement ( ) ; final Element stringPatternsElement = getOrCreateChildElementByTagName ( referenceDataCatalogElement , "string-patterns" ) ; if ( stringPatternsElement == null ) { throw new IllegalStateExcepti...
Gets the XML element that represents the string patterns
119,147
public void setAvailableInputColumns ( final Collection < InputColumn < ? > > inputColumns ) { final InputColumn < ? > [ ] items = new InputColumn < ? > [ inputColumns . size ( ) + 1 ] ; int index = 1 ; for ( final InputColumn < ? > inputColumn : inputColumns ) { items [ index ] = inputColumn ; index ++ ; } final Defau...
Called by the parent widget to update the list of available columns
119,148
public static OutputWriter getWriter ( final String filename , final List < InputColumn < ? > > columns ) { final InputColumn < ? > [ ] columnArray = columns . toArray ( new InputColumn < ? > [ columns . size ( ) ] ) ; final String [ ] headers = new String [ columnArray . length ] ; for ( int i = 0 ; i < headers . leng...
Creates a CSV output writer with default configuration
119,149
public static OutputWriter getWriter ( final String filename , final String [ ] headers , final char separatorChar , final char quoteChar , final char escapeChar , final boolean includeHeader , final InputColumn < ? > ... columns ) { return getWriter ( new FileResource ( filename ) , headers , FileHelper . DEFAULT_ENCO...
Creates a CSV output writer
119,150
public void onComponentRightClicked ( final ComponentBuilder componentBuilder , final MouseEvent me ) { final boolean isMultiStream = componentBuilder . getDescriptor ( ) . isMultiStreamComponent ( ) ; final JPopupMenu popup = new JPopupMenu ( ) ; final JMenuItem configureComponentMenuItem = new JMenuItem ( "Configure ...
Invoked when a component is right - clicked
119,151
public void onCanvasRightClicked ( final MouseEvent me ) { _linkPainter . cancelLink ( ) ; final JPopupMenu popup = new JPopupMenu ( ) ; final Point point = me . getPoint ( ) ; final AnalysisJobBuilder analysisJobBuilder = _graphContext . getMainAnalysisJobBuilder ( ) ; final DataCleanerConfiguration configuration = an...
Invoked when the canvas is right - clicked
119,152
public void copyToClipboard ( final int rowIndex , final int colIndex , final int width , final int height ) { final StringBuilder sb = new StringBuilder ( ) ; if ( rowIndex == 0 && colIndex == 0 && width == getColumnCount ( ) && height == getRowCount ( ) ) { for ( int i = 0 ; i < width ; i ++ ) { sb . append ( getColu...
Copies content from the table to the clipboard . Algorithm is a slight rewrite of the article below .
119,153
public void run ( final R row , final String value , final int distinctCount ) { final List < Token > tokens ; try { tokens = _tokenizer . tokenize ( value ) ; } catch ( final RuntimeException e ) { throw new IllegalStateException ( "Error occurred while tokenizing value: " + value , e ) ; } final String patternCode = ...
This method should be invoked by the user of the PatternFinder . Invoke it for each value in your dataset . Repeated values are handled correctly but if available it is more efficient to handle only the distinct values and their corresponding distinct counts .
119,154
private String getPatternCode ( final List < Token > tokens ) { final StringBuilder sb = new StringBuilder ( ) ; sb . append ( tokens . size ( ) ) ; for ( final Token token : tokens ) { sb . append ( token . getType ( ) . ordinal ( ) ) ; } return sb . toString ( ) ; }
Creates an almost unique String code for a list of tokens . This code is used to improve search time when looking for potential matching patterns .
119,155
public List < DatastoreDescriptor > getAvailableDatastoreDescriptors ( ) { final List < DatastoreDescriptor > availableDatabaseDescriptors = new ArrayList < > ( ) ; final List < DatastoreDescriptor > manualDatastoreDescriptors = getManualDatastoreDescriptors ( ) ; availableDatabaseDescriptors . addAll ( manualDatastore...
Returns the descriptors of datastore types available in DataCleaner .
119,156
public List < DatastoreDescriptor > getAvailableCloudBasedDatastoreDescriptors ( ) { final List < DatastoreDescriptor > availableCloudBasedDatabaseDescriptors = new ArrayList < > ( ) ; availableCloudBasedDatabaseDescriptors . add ( SALESFORCE_DATASTORE_DESCRIPTOR ) ; availableCloudBasedDatabaseDescriptors . add ( SUGAR...
Returns the descriptors of cloud - based datastore types available in DataCleaner .
119,157
public List < DatastoreDescriptor > getAvailableDatabaseBasedDatastoreDescriptors ( ) { final List < DatastoreDescriptor > availableCloudBasedDatabaseDescriptors = new ArrayList < > ( ) ; availableCloudBasedDatabaseDescriptors . add ( POSTGRESQL_DATASTORE_DESCRIPTOR ) ; availableCloudBasedDatabaseDescriptors . add ( SQ...
Returns the descriptors of database - based datastore types available in DataCleaner .
119,158
public void setTable ( final Table table ) { if ( table != _tableRef . get ( ) ) { _tableRef . set ( table ) ; if ( table == null ) { _comboBox . setEmptyModel ( ) ; } else { _comboBox . setModel ( table ) ; } } }
Sets the table to use as a source for the available columns in the combobox .
119,159
protected JScrollPane wrapContent ( final JComponent panel ) { panel . setMaximumSize ( new Dimension ( WIDTH_CONTENT , Integer . MAX_VALUE ) ) ; panel . setAlignmentX ( Component . LEFT_ALIGNMENT ) ; final DCPanel wrappingPanel = new DCPanel ( ) ; final BoxLayout layout = new BoxLayout ( wrappingPanel , BoxLayout . PA...
Wraps a content panel in a scroll pane and applies a maximum width to the content to keep it nicely in place on the screen .
119,160
protected static Map < String , String > initializeSystemProperties ( final String [ ] args ) { final Map < String , String > result = new HashMap < > ( ) ; final Pattern pattern = Pattern . compile ( "-D(.+)=(.+)" ) ; for ( final String arg : args ) { final Matcher matcher = pattern . matcher ( arg ) ; if ( matcher . ...
Initializes system properties based on the arguments passed
119,161
protected static boolean initializeLogging ( ) { try { { final URL url = Main . class . getResource ( "log4j-initial.xml" ) ; assert url != null ; DOMConfigurator . configure ( url ) ; } if ( ClassLoaderUtils . IS_WEB_START ) { final URL url = Main . class . getResource ( "log4j-jnlp.xml" ) ; assert url != null ; print...
Initializes logging specifically by looking for log4j . xml or log4j . properties file in DataCleaner s home directory .
119,162
public Packer setContainer ( final Container cont ) throws IllegalAccessException { if ( container != null ) { final Packer p = ( Packer ) clone ( ) ; container . setLayout ( p ) ; } container = cont ; cont . setLayout ( this ) ; return this ; }
Set the designated container for objects packed by this instance .
119,163
public Packer pack ( final Component cp ) { if ( container != null ) { container . add ( cp ) ; } comp = cp ; gc = new GridBagConstraints ( ) ; setConstraints ( comp , gc ) ; return this ; }
Establishes a new set of constraints to layout the widget passed . The created constraints are applied to the passed Component and if a Container is known to this object the component is added to the known container .
119,164
public Packer setAnchorNorth ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . NORTH ; } else { gc . anchor &= ~ GridBagConstraints . NORTH ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = NORTH to the constraints for the current component if how == true remove it if false .
119,165
public Packer setAnchorSouth ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . SOUTH ; } else { gc . anchor &= ~ GridBagConstraints . SOUTH ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = SOUTH to the constraints for the current component if how == true remove it if false .
119,166
public Packer setAnchorEast ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . EAST ; } else { gc . anchor &= ~ GridBagConstraints . EAST ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = EAST to the constraints for the current component if how == true remove it if false .
119,167
public Packer setAnchorWest ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . WEST ; } else { gc . anchor &= ~ GridBagConstraints . WEST ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = WEST to the constraints for the current component if how == true remove it if false .
119,168
public Packer setAnchorNorthWest ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . NORTHWEST ; } else { gc . anchor &= ~ GridBagConstraints . NORTHWEST ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = NORTHWEST to the constraints for the current component if how == true remove it if false .
119,169
public Packer setAnchorSouthWest ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . SOUTHWEST ; } else { gc . anchor &= ~ GridBagConstraints . SOUTHWEST ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = SOUTHWEST to the constraints for the current component if how == true remove it if false .
119,170
public Packer setAnchorNorthEast ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . NORTHEAST ; } else { gc . anchor &= ~ GridBagConstraints . NORTHEAST ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = NORTHEAST to the constraints for the current component if how == true remove it if false .
119,171
public Packer setAnchorSouthEast ( final boolean how ) { if ( how == true ) { gc . anchor = GridBagConstraints . SOUTHEAST ; } else { gc . anchor &= ~ GridBagConstraints . SOUTHEAST ; } setConstraints ( comp , gc ) ; return this ; }
Add anchor = SOUTHEAST to the constraints for the current component if how == true remove it if false .
119,172
public Packer setXLeftRelative ( final boolean how ) { if ( how == true ) { gc . gridx = GridBagConstraints . RELATIVE ; } else { gc . gridx = 0 ; } setConstraints ( comp , gc ) ; return this ; }
Add gridx = RELATIVE to the constraints for the current component if how == true 0 it if false .
119,173
public Packer setYTopRelative ( final boolean how ) { if ( how == true ) { gc . gridy = GridBagConstraints . RELATIVE ; } else { gc . gridy = 0 ; } setConstraints ( comp , gc ) ; return this ; }
Add gridy = RELATIVE to the constraints for the current component if how == true 0 it if false .
119,174
public Packer setFillX ( final boolean how ) { if ( how == true ) { gc . fill = GridBagConstraints . HORIZONTAL ; gc . weightx = 1 ; } else { gc . weightx = 0 ; gc . fill = 0 ; } setConstraints ( comp , gc ) ; return this ; }
Add fill = HORIZONTAL weightx = 1 to the constraints for the current component if how == true . fill = 0 weightx = 0 if how is false .
119,175
public Packer fillx ( final double wtx ) { gc . fill = GridBagConstraints . HORIZONTAL ; gc . weightx = wtx ; setConstraints ( comp , gc ) ; return this ; }
Add fill = HORIZONTAL weightx = wtx to the constraints for the current component .
119,176
public Packer setFillY ( final boolean how ) { if ( how == true ) { gc . fill = GridBagConstraints . VERTICAL ; gc . weighty = 1 ; } else { gc . weighty = 0 ; gc . fill = 0 ; } setConstraints ( comp , gc ) ; return this ; }
Add fill = VERITCAL to the constraints for the current component if how == true 1 it if false .
119,177
public Packer filly ( final double wty ) { gc . fill = GridBagConstraints . VERTICAL ; gc . weighty = wty ; setConstraints ( comp , gc ) ; return this ; }
Add fill = VERTICAL weighty = wty to the constraints for the current component .
119,178
public Packer setFillBoth ( final boolean how ) { if ( how == true ) { gc . fill = GridBagConstraints . BOTH ; gc . weightx = 1 ; gc . weighty = 1 ; } else { gc . weightx = 0 ; gc . weighty = 0 ; gc . fill = 0 ; } setConstraints ( comp , gc ) ; return this ; }
Add fill = BOTH weightx = 1 weighty = 1 to the constraints for the current component if how == true fill = 0 weightx = 0 weighty = 0 if it is false .
119,179
public Packer fillboth ( final double wtx , final double wty ) { gc . fill = GridBagConstraints . BOTH ; gc . weightx = wtx ; gc . weighty = wty ; setConstraints ( comp , gc ) ; return this ; }
Add fill = BOTH weighty = 1 weightx = 1 to the constraints for the current component .
119,180
public Packer setInsetTop ( final int val ) { Insets i = gc . insets ; if ( i == null ) { i = new Insets ( 0 , 0 , 0 , 0 ) ; } gc . insets = new Insets ( val , i . left , i . bottom , i . right ) ; setConstraints ( comp , gc ) ; return this ; }
sets top Insets on the constraints for the current component to the value specified .
119,181
public Packer setInsetBottom ( final int val ) { Insets i = gc . insets ; if ( i == null ) { i = new Insets ( 0 , 0 , 0 , 0 ) ; } gc . insets = new Insets ( i . top , i . left , val , i . right ) ; setConstraints ( comp , gc ) ; return this ; }
sets bottom Insets on the constraints for the current component to the value specified .
119,182
public Packer setInsetLeft ( final int val ) { Insets i = gc . insets ; if ( i == null ) { i = new Insets ( 0 , 0 , 0 , 0 ) ; } gc . insets = new Insets ( i . top , val , i . bottom , i . right ) ; setConstraints ( comp , gc ) ; return this ; }
sets left Insets on the constraints for the current component to the value specified .
119,183
public Packer setInsetRight ( final int val ) { Insets i = gc . insets ; if ( i == null ) { i = new Insets ( 0 , 0 , 0 , 0 ) ; } gc . insets = new Insets ( i . top , i . left , i . bottom , val ) ; setConstraints ( comp , gc ) ; return this ; }
sets right Insets on the constraints for the current component to the value specified .
119,184
public static void removeSshCertificateChecks ( final HttpClient httpClient ) throws IllegalStateException { try { final SSLContext sslContext = SSLContext . getInstance ( "SSL" ) ; final TrustManager trustManager = new NaiveTrustManager ( ) ; sslContext . init ( null , new TrustManager [ ] { trustManager } , new Secur...
Removes the certificate checks of HTTPS traffic on a HTTP client . Use with caution!
119,185
public AnalyzerJob getAnalyzerJob ( final String descriptorName , final String analyzerName , final String analyzerInputName ) { List < AnalyzerJob > candidates = new ArrayList < > ( _jobs ) ; candidates = CollectionUtils2 . refineCandidates ( candidates , o -> { final String actualDescriptorName = o . getDescriptor ( ...
Gets the best candidate analyzer job based on search criteria offered in parameters .
119,186
public static boolean isSingleWord ( String value ) { if ( value == null ) { return false ; } value = value . trim ( ) ; if ( value . isEmpty ( ) ) { return false ; } return ! SINGLE_WORD_PATTERN . matcher ( value ) . matches ( ) ; }
Determines if a String represents a single word . A single word is defined as a non - null string containing no word boundaries after trimming .
119,187
public void autoMap ( final Datastore datastore ) { setDatastore ( datastore ) ; try ( DatastoreConnection con = datastore . openConnection ( ) ) { final SchemaNavigator schemaNavigator = con . getSchemaNavigator ( ) ; for ( final Entry < String , Column > entry : _map . entrySet ( ) ) { if ( entry . getValue ( ) == nu...
Automatically maps all unmapped paths by looking them up in a datastore .
119,188
public boolean endLink ( final Object endVertex , final MouseEvent mouseEvent ) { logger . debug ( "endLink({})" , endVertex ) ; boolean result = false ; if ( _startVertex != null && endVertex != null ) { if ( mouseEvent . getButton ( ) == MouseEvent . BUTTON1 ) { final boolean created = createLink ( _startVertex , end...
If startVertex is non - null this method will attempt to end the link - painting at the given endVertex
119,189
private boolean scopeUpdatePermitted ( final AnalysisJobBuilder sourceAnalysisJobBuilder , final ComponentBuilder componentBuilder ) { if ( sourceAnalysisJobBuilder != componentBuilder . getAnalysisJobBuilder ( ) ) { if ( componentBuilder . getInput ( ) . length > 0 || componentBuilder . getComponentRequirement ( ) != ...
This will check if components are in a different scope and ask the user for permission to change the scope of the target component
119,190
public static Color colorBetween ( final Color c1 , final Color c2 ) { final int red = ( c1 . getRed ( ) + c2 . getRed ( ) ) / 2 ; final int green = ( c1 . getGreen ( ) + c2 . getGreen ( ) ) / 2 ; final int blue = ( c1 . getBlue ( ) + c2 . getBlue ( ) ) / 2 ; return new Color ( red , green , blue ) ; }
Creates a color that is in between two colors in terms of RGB balance .
119,191
public static DCPanel decorateWithShadow ( final JComponent comp , final boolean outline , final int margin ) { final DCPanel panel = new DCPanel ( ) ; panel . setLayout ( new BorderLayout ( ) ) ; Border border = BORDER_SHADOW ; if ( outline ) { border = new CompoundBorder ( border , BORDER_THIN ) ; } if ( margin > 0 )...
Decorates a JComponent with a nice shadow border . Since not all JComponents handle opacity correctly they will be wrapped inside a DCPanel which actually has the border .
119,192
public static Font findCompatibleFont ( final String text , final Font fallbackFont ) { final String [ ] searchFonts = new String [ ] { Font . SANS_SERIF , Font . SERIF , "Verdana" , "Arial Unicode MS" , "MS UI Gothic" , "MS Mincho" , "MS Gothic" , "Osaka" } ; for ( final String fontName : searchFonts ) { Font font = f...
Finds a font that is capable of displaying the provided text .
119,193
private InputColumn < ? > findOrderByColumn ( final AnalysisJobBuilder jobBuilder ) { final Table sourceTable = jobBuilder . getSourceTables ( ) . get ( 0 ) ; final List < Column > primaryKeys = sourceTable . getPrimaryKeys ( ) ; if ( primaryKeys . size ( ) == 1 ) { final Column primaryKey = primaryKeys . get ( 0 ) ; f...
Finds a source column which is appropriate for an ORDER BY clause in the generated paginated queries
119,194
protected String getCellValue ( final HtmlRenderingContext context , final int row , final int col , final Object value ) { final String stringValue = LabelUtils . getValueLabel ( value ) ; return context . escapeHtml ( stringValue ) ; }
Overrideable method for defining a cell s literal HTML value in the table
119,195
public Injector openAnalysisJob ( final FileObject file ) { final JaxbJobReader reader = new JaxbJobReader ( _configuration ) ; try { final AnalysisJobBuilder ajb = reader . create ( file ) ; return openAnalysisJob ( file , ajb ) ; } catch ( final NoSuchComponentException e ) { final String message ; if ( Version . EDI...
Opens a job file
119,196
public Injector openAnalysisJob ( final FileObject fileObject , final AnalysisJobBuilder ajb ) { final File file = VFSUtils . toFile ( fileObject ) ; if ( file != null ) { _userPreferences . setAnalysisJobDirectory ( file . getParentFile ( ) ) ; _userPreferences . addRecentJobFile ( fileObject ) ; } return Guice . crea...
Opens a job builder
119,197
public static FileSystemManager getFileSystemManager ( ) { try { final FileSystemManager manager = VFS . getManager ( ) ; if ( manager . getBaseFile ( ) == null ) { ( ( DefaultFileSystemManager ) manager ) . setBaseFile ( new File ( "." ) ) ; } return manager ; } catch ( final FileSystemException e ) { throw new Illega...
Gets the file system manager to use in typical scenarios .
119,198
private < E > E createCustomElement ( final CustomElementType customElementType , final Class < E > expectedClazz , final DataCleanerConfiguration configuration , final boolean initialize ) { final InjectionManager injectionManager = configuration . getEnvironment ( ) . getInjectionManagerFactory ( ) . getInjectionMana...
Creates a custom component based on an element which specified just a class name and an optional set of properties .
119,199
public static Object [ ] collapse ( String aString , int anInt ) { return new Object [ ] { aString , Integer . valueOf ( anInt ) } ; }
Collapse a String and int into an array