+ void setUpControlsForDepthCollapse() {
+ _depth_collapse_label = new JLabel( "Collapse by Node Depth:" );
+ _depth_collapse_label
+ .setToolTipText( "to automaticall collapse nodes with a depth equal or larger than a threshold" );
+ add( customizeLabel( _depth_collapse_label, getConfiguration() ) );
+ add( _depth_collapse_label );
+ _decr_depth_collapse_level = new TypomaticJButton( "-" );
+ _incr_depth_collapse_level = new TypomaticJButton( "+" );
+ _decr_depth_collapse_level.setPreferredSize( new Dimension( 10, 10 ) );
+ _incr_depth_collapse_level.setPreferredSize( new Dimension( 10, 10 ) );
+ _decr_depth_collapse_level.setToolTipText( "to decrease the depth threshold (wraps around)" );
+ _incr_depth_collapse_level.setToolTipText( "to increase the depth threshold (wraps around)" );
+ _depth_collapse_depth_tf = new JTextField( 3 );
+ _depth_collapse_depth_tf.setToolTipText( "the current depth threshold" );
+ _depth_collapse_depth_tf.setEditable( false );
+ if ( !getConfiguration().isUseNativeUI() ) {
+ _depth_collapse_depth_tf.setForeground( getConfiguration().getGuiMenuBackgroundColor() );
+ _depth_collapse_depth_tf.setBackground( getConfiguration().getGuiCheckboxTextColor() );
+ _depth_collapse_depth_tf.setBorder( null );
+ }
+ final JPanel panel = new JPanel( new GridLayout( 1, 3, 0, 0 ) );
+ if ( !_configuration.isUseNativeUI() ) {
+ panel.setBackground( getBackground() );
+ }
+ add( panel );
+ addJButton( _decr_depth_collapse_level, panel );
+ addJTextField( _depth_collapse_depth_tf, panel );
+ addJButton( _incr_depth_collapse_level, panel );
+ }
+
+ void setUpControlsForRankCollapse() {
+ _rank_collapse_label = new JLabel( "Collapse by Node Rank:" );
+ _rank_collapse_label
+ .setToolTipText( "to automatically collapse nodes with a taxonomic rank equal or lower than a threshold" );
+ add( customizeLabel( _rank_collapse_label, getConfiguration() ) );
+ add( _rank_collapse_label );
+ _decr_rank_collapse_level = new TypomaticJButton( "-" );
+ _incr_rank_collapse_level = new TypomaticJButton( "+" );
+ _decr_rank_collapse_level.setPreferredSize( new Dimension( 10, 10 ) );
+ _incr_rank_collapse_level.setPreferredSize( new Dimension( 10, 10 ) );
+ _decr_rank_collapse_level.setToolTipText( "to decrease the taxonomic rank threshold (wraps around)" );
+ _incr_rank_collapse_level.setToolTipText( "to increase the taxonomic rank threshold (wraps around)" );
+ _rank_collapse_depth_tf = new JTextField( 3 );
+ _rank_collapse_depth_tf.setToolTipText( "the current taxonomic rank threshold" );
+ _rank_collapse_depth_tf.setEditable( false );
+ if ( !getConfiguration().isUseNativeUI() ) {
+ _rank_collapse_depth_tf.setForeground( getConfiguration().getGuiMenuBackgroundColor() );
+ _rank_collapse_depth_tf.setBackground( getConfiguration().getGuiCheckboxTextColor() );
+ _rank_collapse_depth_tf.setBorder( null );
+ }
+ final JPanel panel = new JPanel( new GridLayout( 1, 3, 0, 0 ) );
+ if ( !_configuration.isUseNativeUI() ) {
+ panel.setBackground( getBackground() );
+ }
+ add( panel );
+ addJButton( _decr_rank_collapse_level, panel );
+ addJTextField( _rank_collapse_depth_tf, panel );
+ addJButton( _incr_rank_collapse_level, panel );
+ }
+