Community
Participate
Working Groups
}
int getTextWidth( int index ) {
int result = getCellWidth( index ) - getTextOffset( index );
int result = getCellWidth( index ) - getTextOffset( index ) - getCellPadding().width;
if( isTreeColumn( index ) ) {
result -= ( TEXT_MARGIN.width - TEXT_MARGIN.x );
item1.setText( "item" );
item1.setImage( image );
ItemMetrics[] metrics = TreeLCA.getItemMetrics( tree );
assertEquals( 69, metrics[ 0 ].textWidth );
assertEquals( 57, metrics[ 0 ].textWidth );
public void testPreserveValues() {
Message message = Fixture.getProtocolMessage();
JSONArray actual = ( JSONArray )message.findSetProperty( tree, "itemMetrics" );
assertTrue( ProtocolTestUtil.jsonEquals( "[0,0,50,0,0,3,42]", ( JSONArray )actual.get( 0 ) ) );
assertTrue( ProtocolTestUtil.jsonEquals( "[0,0,50,0,0,3,30]", ( JSONArray )actual.get( 0 ) ) );
public void testRenderItemMetricsUnchanged() throws IOException {