public String visualize ( Object obj ) throws ConverterException { Integer pad = 0 ; String padc = getConfig ( "pad-count" , "0" ) ; try { pad = Integer . parseInt ( padc ) ; } catch ( Exception e ) { } char padch = getConfig ( "pad-char" , " " ) . charAt ( 0 ) ; String padd = getConfig ( "pad-direction" , "left" ) ; String prefix = getConfig ( "prefix" ) ; String suffix = getConfig ( "suffix" ) ; String res = obj != null ? obj . toString ( ) : "" ; if ( padd . compareToIgnoreCase ( "left" ) == 0 ) { res = Utils . padleft ( res , pad , padch ) ; } else { res = Utils . padright ( res , pad , padch ) ; } if ( prefix != null ) { res = prefix + res ; } if ( suffix != null ) { res = res + suffix ; } return res ; }
Visualization with some standard properties .