import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
case Configuration.color_according_to_annotation:
_color_according_to_annotation = new JCheckBox( title );
_color_according_to_annotation
- .setToolTipText( "To colorize sequence annotation labels as a function of sequence annotation" );
+ .setToolTipText( "To colorize sequence annotation labels as a function of sequence annotation" );
addJCheckBox( _color_according_to_annotation, ch_panel );
add( ch_panel );
break;
case Configuration.use_style:
_use_visual_styles_cb = new JCheckBox( title );
getUseVisualStylesCb()
- .setToolTipText( "To use visual styles (node colors, fonts) and branch colors, if present" );
+ .setToolTipText( "To use visual styles (node colors, fonts) and branch colors, if present" );
addJCheckBox( getUseVisualStylesCb(), ch_panel );
add( ch_panel );
break;
getNodeDescPopupCb().setSelected( state );
}
break;
- /* GUILHEM_BEG */
+ /* GUILHEM_BEG */
case Configuration.show_relation_confidence:
if ( _seq_relation_confidence_switch != null ) {
_seq_relation_confidence_switch.setSelected( state );
}
break;
- /* GUILHEM_END */
+ /* GUILHEM_END */
default:
throw new AssertionError( "unknown checkbox: " + which );
}
}
else {
getMainPanel().getMainFrame().setSelectedTypeInTypeMenu( getMainPanel().getCurrentTreePanel()
- .getPhylogenyGraphicsType() );
+ .getPhylogenyGraphicsType() );
}
getMainPanel().getCurrentTreePanel().updateSubSuperTreeButton();
getMainPanel().getControlPanel().search0();
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
}
else {
final int x = sb.getMaximum() - sb.getMinimum() - sb.getVisibleAmount() - sb.getValue();
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
treepanel.resetPreferredSize();
treepanel.updateOvSizes();
}
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
}
else {
final int x = sb.getMaximum() - sb.getMinimum() - sb.getVisibleAmount() - sb.getValue();
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
treepanel.resetPreferredSize();
treepanel.updateOvSizes();
}
cellHasFocus );
if ( ( value != null ) && ( value instanceof SequenceRelation.SEQUENCE_RELATION_TYPE ) ) {
( ( DefaultListCellRenderer ) component ).setText( SequenceRelation
- .getPrintableNameByType( ( SequenceRelation.SEQUENCE_RELATION_TYPE ) value ) );
+ .getPrintableNameByType( ( SequenceRelation.SEQUENCE_RELATION_TYPE ) value ) );
}
return component;
}
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;
isShowDomainArchitectures(),
tp != null ? Math.pow( 10,
tp.getDomainStructureEvalueThresholdExp() )
- : 0 ) );
+ : 0 ) );
}
else {
nodes.addAll( PhylogenyMethods.searchData( query,
getOptions().isSearchWithRegex(),
isShowDomainArchitectures(),
tp != null ? Math.pow( 10, tp
- .getDomainStructureEvalueThresholdExp() ) : 0 ) );
+ .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;
isShowDomainArchitectures(),
tp != null ? Math.pow( 10,
tp.getDomainStructureEvalueThresholdExp() )
- : 0 ) );
+ : 0 ) );
}
else {
nodes.addAll( PhylogenyMethods.searchData( query,
getOptions().isSearchWithRegex(),
isShowDomainArchitectures(),
tp != null ? Math.pow( 10, tp
- .getDomainStructureEvalueThresholdExp() ) : 0 ) );
+ .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 ) ) {
_get_ext_desc_data = cb_index;
if ( !ForesterUtil.isEmpty( getConfiguration().getLabelForGetExtDescendentsData() ) ) {
addClickToOption( Configuration.get_ext_desc_data, getConfiguration()
- .getLabelForGetExtDescendentsData() );
+ .getLabelForGetExtDescendentsData() );
}
else {
addClickToOption( Configuration.get_ext_desc_data,