intValue = handle.getIntProperty( Style.WIDOWS_PROP );
intValue = handle.getIntProperty( "noPropName" );
	public void testPropertyMethods( ) throws Exception	{		LabelHandle handle = (LabelHandle) designHandle				.findElement( "bodyLabel1" ); //$NON-NLS-1$		// to set an data set that does not exist.		StyleHandle styleHandle = handle.getStyle( );		// the default value is true.		assertTrue( styleHandle.getBooleanProperty( Style.CAN_SHRINK_PROP ) );		DimensionHandle dimensionHandle = handle				.getDimensionProperty( Label.X_PROP );		assertNotNull( dimensionHandle );		assertEquals( "1mm", dimensionHandle.getStringValue( ) ); //$NON-NLS-1$		handle.setStringProperty( Label.X_PROP, "11mm" ); //$NON-NLS-1$		assertEquals( "11mm", dimensionHandle.getStringValue( ) ); //$NON-NLS-1$		handle.setStringProperty( Label.X_PROP, "12.3pc" ); //$NON-NLS-1$		assertEquals( "12.3pc", dimensionHandle.getStringValue( ) ); //$NON-NLS-1$		ColorHandle colorHandle = styleHandle				.getColorProperty( Style.COLOR_PROP );		assertNotNull( colorHandle );		assertEquals( "red", colorHandle.getCssValue( ) ); //$NON-NLS-1$		// to test get element property.		DataSetHandle dataSethandle = designHandle.findDataSet( "firstDataSet" ); //$NON-NLS-1$		DesignElementHandle elementHandle = dataSethandle				.getElementProperty( SimpleDataSet.DATA_SOURCE_PROP );		assertEquals( "myDataSource", elementHandle.getName( ) ); //$NON-NLS-1$		// CAN_SHRINK_PROP has not any value.		FactoryPropertyHandle factoryHandle = styleHandle				.getFactoryPropertyHandle( Style.CAN_SHRINK_PROP );		assertNull( factoryHandle );		factoryHandle = styleHandle				.getFactoryPropertyHandle( Style.MASTER_PAGE_PROP );		assertNull( factoryHandle );		factoryHandle = styleHandle				.getFactoryPropertyHandle( Label.BOOKMARK_PROP );		assertNull( factoryHandle );		// uses width and height to test getFloatProperty.		double floatValue = ( (DimensionValue) handle				.getProperty( ReportItem.WIDTH_PROP ) ).getMeasure( );		assertTrue( 2 == floatValue );		floatValue = ( (DimensionValue) handle				.getProperty( ReportItem.HEIGHT_PROP ) ).getMeasure( );		assertTrue( .25 == floatValue );		// get a font handle from the label.		FontHandle fontHandle = handle.getPrivateStyle( ).getFontFamilyHandle( );		assertNotNull( fontHandle );		assertEquals( "Time New Roman, Arial", fontHandle.getValue( ) ); //$NON-NLS-1$		fontHandle = styleHandle.getFontFamilyHandle( );		assertNotNull( fontHandle );		assertEquals( "Time New Roman, Arial", fontHandle.getValue( ) ); //$NON-NLS-1$		// uses WIDOWS_PROP to test getIntProperty.		int intValue = styleHandle.getIntProperty( Style.WIDOWS_PROP );		assertTrue( 2 == intValue );		intValue = handle.getIntProperty( Style.WIDOWS_PROP );		assertTrue( 0 == intValue );		// uses WIDOWS_PROP and height to test getNumberProperty.		BigDecimal bigDecimalValue = styleHandle				.getNumberProperty( Style.WIDOWS_PROP );		assertTrue( 2 == bigDecimalValue.intValue( ) );		// no this property, will be null.		bigDecimalValue = handle				.getNumberProperty( SimpleDataSet.DATA_SOURCE_PROP );		assertNull( bigDecimalValue );		// setProperty and setStringProperty.		String fontNames = (String) handle.getProperty( Style.FONT_FAMILY_PROP );		assertEquals( "Time New Roman, Arial", fontNames ); //$NON-NLS-1$		fontNames = handle.getStringProperty( Style.FONT_FAMILY_PROP );		assertEquals( "Time New Roman, Arial", fontNames ); //$NON-NLS-1$		PropertyHandle propertyHandle = handle				.getPropertyHandle( Style.FONT_FAMILY_PROP );		assertEquals( "Time New Roman, Arial", propertyHandle.getStringValue( ) ); //$NON-NLS-1$		// test the label height		String height = handle.getProperty( ReportItem.HEIGHT_PROP ).toString( );		assertEquals( "0.25mm", height ); //$NON-NLS-1$		height = handle.getStringProperty( ReportItem.HEIGHT_PROP ).toString( );		assertEquals( "0.25mm", height ); //$NON-NLS-1$		// set properties		handle.setProperty( ReportItem.HEIGHT_PROP, "1.715in" ); //$NON-NLS-1$		assertTrue( 1.715 == handle.getPropertyHandle( ReportItem.HEIGHT_PROP )				.getFloatValue( ) );		styleHandle.setIntProperty( Style.WIDOWS_PROP, 5 );		assertTrue( 5 == styleHandle.getIntProperty( Style.WIDOWS_PROP ) );		try		{			styleHandle.setIntProperty( Label.CUSTOM_XML_PROP, 15 );			fail( );		}		catch ( PropertyValueException e )		{			assertEquals(					PropertyValueException.DESIGN_EXCEPTION_INVALID_VALUE, e							.getErrorCode( ) );		}		bigDecimalValue = new BigDecimal( 55 );		styleHandle.setNumberProperty( Style.WIDOWS_PROP, bigDecimalValue );		assertTrue( 55 == styleHandle.getNumberProperty( Style.WIDOWS_PROP )				.intValue( ) );		handle.setProperty( Style.FONT_FAMILY_PROP, "Song" ); //$NON-NLS-1$		assertEquals( "Song", handle.getStringProperty( Style.FONT_FAMILY_PROP ) ); //$NON-NLS-1$		// test the label height		handle.setProperty( ReportItem.HEIGHT_PROP, "2.34cm" ); //$NON-NLS-1$		assertEquals(				"2.34cm", handle.getStringProperty( ReportItem.HEIGHT_PROP ) ); //$NON-NLS-1$		handle.setStringProperty( ReportItem.HEIGHT_PROP, ".25mm" ); //$NON-NLS-1$		assertEquals(				"0.25mm", handle.getStringProperty( ReportItem.HEIGHT_PROP ) ); //$NON-NLS-1$		handle.setProperty( ReportItem.HEIGHT_PROP, new DimensionValue( 2.34,				DesignChoiceConstants.UNITS_CM ) );		dimensionHandle = handle.getHeight( );		assertEquals( "2.34cm", dimensionHandle.getStringValue( ) ); //$NON-NLS-1$		handle.clearProperty( ReportItem.HEIGHT_PROP );		assertNull( handle.getProperty( ReportItem.HEIGHT_PROP ) );		// resets to the default value.		styleHandle.clearProperty( Style.FONT_FAMILY_PROP );		assertEquals( DesignChoiceConstants.FONT_FAMILY_SERIF, styleHandle				.getProperty( Style.FONT_FAMILY_PROP ) );		// to set an data set that does not exist.		TableHandle table = (TableHandle) designHandle.findElement( "My table" ); //$NON-NLS-1$		// from firstDataSet to NoExistedDataSet		table.setProperty( IReportItemModel.DATA_SET_PROP, "NoExistedDataSet" ); //$NON-NLS-1$		assertEquals( "NoExistedDataSet", table //$NON-NLS-1$				.getProperty( IReportItemModel.DATA_SET_PROP ) );		// with the same unresolved status		table.setProperty( IReportItemModel.DATA_SET_PROP, "NoExistedDataSet" ); //$NON-NLS-1$		assertEquals( "NoExistedDataSet", table //$NON-NLS-1$				.getProperty( IReportItemModel.DATA_SET_PROP ) );	}