import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
}
displayedPhylogenyMightHaveChanged( true );
}
- else if ( e.getSource() == _show_domain_architectures ) {
+ else if ( e.getSource() == _show_domain_architectures ) {
search0();
search1();
displayedPhylogenyMightHaveChanged( true );
}
-
else if ( ( tp != null ) && ( tp.getPhylogeny() != null ) ) {
if ( e.getSource() == getDisplayAsPhylogramCb() ) {
setDrawPhylogram( getDisplayAsPhylogramCb().isSelected() );
getSearchResetButton0().setEnabled( true );
getSearchResetButton0().setVisible( true );
String[] queries = null;
- List<PhylogenyNode> nodes = null;
+ Set<PhylogenyNode> nodes = null;
if ( ( query_str.indexOf( ',' ) >= 0 ) && !getOptions().isSearchWithRegex() ) {
queries = query_str.split( ",+" );
}
queries[ 0 ] = query_str.trim();
}
if ( ( queries != null ) && ( queries.length > 0 ) ) {
- nodes = new ArrayList<PhylogenyNode>();
+ nodes = new HashSet<PhylogenyNode>();
for( String query : queries ) {
if ( ForesterUtil.isEmpty( query ) ) {
continue;
}
query = query.trim();
- if ( ( query.indexOf( '+' ) >= 0 ) && !getOptions().isSearchWithRegex() ) {
+ final TreePanel tp = getMainPanel().getCurrentTreePanel();
+ if ( ( query.indexOf( '+' ) > 0 ) && !getOptions().isSearchWithRegex() ) {
nodes.addAll( PhylogenyMethods.searchDataLogicalAnd( query.split( "\\++" ),
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
- isShowDomainArchitectures() ) );
+ isShowDomainArchitectures(),
+ tp != null ? Math.pow( 10,
+ tp.getDomainStructureEvalueThresholdExp() )
+ : 0 ) );
}
else {
- final TreePanel tp = getMainPanel().getCurrentTreePanel();
-
-
nodes.addAll( PhylogenyMethods.searchData( query,
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
getOptions().isSearchWithRegex(),
isShowDomainArchitectures(),
- tp != null ? Math.pow( 10, tp.getDomainStructureEvalueThresholdExp() ) : 0 ) );
+ tp != null ? Math.pow( 10, tp
+ .getDomainStructureEvalueThresholdExp() ) : 0 ) );
}
}
if ( getOptions().isInverseSearchResult() ) {
final List<PhylogenyNode> all = PhylogenyMethods.obtainAllNodesAsList( tree );
all.removeAll( nodes );
- nodes = all;
+ nodes = new HashSet<PhylogenyNode>();
+ nodes.addAll( all );
}
}
if ( ( nodes != null ) && ( nodes.size() > 0 ) ) {
getSearchResetButton1().setEnabled( true );
getSearchResetButton1().setVisible( true );
String[] queries = null;
- List<PhylogenyNode> nodes = null;
+ Set<PhylogenyNode> nodes = null;
if ( ( query_str.indexOf( ',' ) >= 0 ) && !getOptions().isSearchWithRegex() ) {
queries = query_str.split( ",+" );
}
queries[ 0 ] = query_str.trim();
}
if ( ( queries != null ) && ( queries.length > 0 ) ) {
- nodes = new ArrayList<PhylogenyNode>();
+ nodes = new HashSet<PhylogenyNode>();
for( String query : queries ) {
if ( ForesterUtil.isEmpty( query ) ) {
continue;
}
query = query.trim();
- if ( ( query.indexOf( '+' ) >= 0 ) && !getOptions().isSearchWithRegex() ) {
+ final TreePanel tp = getMainPanel().getCurrentTreePanel();
+ if ( ( query.indexOf( '+' ) > 0 ) && !getOptions().isSearchWithRegex() ) {
nodes.addAll( PhylogenyMethods.searchDataLogicalAnd( query.split( "\\++" ),
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
- isShowDomainArchitectures() ) );
+ isShowDomainArchitectures(),
+ tp != null ? Math.pow( 10,
+ tp.getDomainStructureEvalueThresholdExp() )
+ : 0 ) );
}
else {
- final TreePanel tp = getMainPanel().getCurrentTreePanel();
nodes.addAll( PhylogenyMethods.searchData( query,
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
getOptions().isSearchWithRegex(),
isShowDomainArchitectures(),
- tp != null ? Math.pow( 10, tp.getDomainStructureEvalueThresholdExp() ) : 0 ) );
+ tp != null ? Math.pow( 10, tp
+ .getDomainStructureEvalueThresholdExp() ) : 0 ) );
}
}
if ( getOptions().isInverseSearchResult() ) {
final List<PhylogenyNode> all = PhylogenyMethods.obtainAllNodesAsList( tree );
all.removeAll( nodes );
- nodes = all;
+ nodes = new HashSet<PhylogenyNode>();
+ nodes.addAll( all );
}
}
if ( ( nodes != null ) && ( nodes.size() > 0 ) ) {
.getLabelForGetExtDescendentsData() );
}
else {
-
addClickToOption( Configuration.get_ext_desc_data,
getConfiguration().getClickToTitle( Configuration.get_ext_desc_data ) );
}
-
if ( default_option == Configuration.get_ext_desc_data ) {
selected_index = cb_index;
}