+ void colorRank() {
+ if ( _mainpanel.getCurrentTreePanel() != null ) {
+ final String[] ranks = Util.getAllRanks( _mainpanel.getCurrentTreePanel().getPhylogeny() );
+ if ( ranks.length < 1 ) {
+ JOptionPane.showMessageDialog( this,
+ "No rank information was found",
+ "No Rank Inoformation",
+ JOptionPane.WARNING_MESSAGE );
+ return;
+ }
+ final String rank = ( String ) JOptionPane
+ .showInputDialog( this,
+ "What rank should the colorization be based on",
+ "Rank Selection",
+ JOptionPane.PLAIN_MESSAGE,
+ null,
+ ranks,
+ null );
+ if ( !ForesterUtil.isEmpty( rank ) ) {
+ _mainpanel.getCurrentTreePanel().colorRank( rank );
+ }
+ }
+ }
+