int fsize = DEUtil.getFontSizeIntValue( handle ); boolean fbold = CSSUtil.getFontWeight( style.getFontWeight( ) ) >= 700;
int fsize = getFontSizeIntValue( handle ); boolean fbold = getFontWeight( style.getFontWeight( ) ) >= 700;
	public IStyle getStyle( StyledComponent name )	{		StyleHandle style = handle.getPrivateStyle( );		SimpleStyle ss = new SimpleStyle( );		String fname = style.getFontFamilyHandle( ).getStringValue( );		int fsize = DEUtil.getFontSizeIntValue( handle );		boolean fbold = CSSUtil.getFontWeight( style.getFontWeight( ) ) >= 700;		boolean fitalic = DesignChoiceConstants.FONT_STYLE_ITALIC.equals( style.getFontStyle( ) );		boolean funder = DesignChoiceConstants.TEXT_UNDERLINE_UNDERLINE.equals( style.getTextUnderline( ) );		boolean fstrike = DesignChoiceConstants.TEXT_LINE_THROUGH_LINE_THROUGH.equals( style.getTextLineThrough( ) );		HorizontalAlignment ha = HorizontalAlignment.LEFT_LITERAL;		if ( DesignChoiceConstants.TEXT_ALIGN_CENTER.equals( style.getTextAlign( ) ) )		{			ha = HorizontalAlignment.CENTER_LITERAL;		}		else if ( DesignChoiceConstants.TEXT_ALIGN_RIGHT.equals( style.getTextAlign( ) ) )		{			ha = HorizontalAlignment.RIGHT_LITERAL;		}		VerticalAlignment va = VerticalAlignment.TOP_LITERAL;		if ( DesignChoiceConstants.VERTICAL_ALIGN_MIDDLE.equals( style.getVerticalAlign( ) ) )		{			va = VerticalAlignment.CENTER_LITERAL;		}		else if ( DesignChoiceConstants.VERTICAL_ALIGN_BOTTOM.equals( style.getVerticalAlign( ) ) )		{			va = VerticalAlignment.BOTTOM_LITERAL;		}		TextAlignment ta = TextAlignmentImpl.create( );		ta.setHorizontalAlignment( ha );		ta.setVerticalAlignment( va );		FontDefinition fd = FontDefinitionImpl.create( fname,				(float) fsize,				fbold,				fitalic,				funder,				fstrike,				true,				0,				ta );		ss.setFont( fd );		ColorHandle ch = style.getColor( );		if ( ch != null && ch.getRGB( ) != -1 )		{			int rgb = ch.getRGB( );			ColorDefinition cd = ColorDefinitionImpl.create( ( rgb >> 16 ) & 0xff,					( rgb >> 8 ) & 0xff,					rgb & 0xff );			ss.setColor( cd );		}		else		{			ss.setColor( ColorDefinitionImpl.BLACK( ) );		}		ch = style.getBackgroundColor( );		if ( ch != null && ch.getRGB( ) != -1 )		{			int rgb = ch.getRGB( );			ColorDefinition cd = ColorDefinitionImpl.create( ( rgb >> 16 ) & 0xff,					( rgb >> 8 ) & 0xff,					rgb & 0xff );			ss.setBackgroundColor( cd );		}		if ( style.getBackgroundImage( ) != null				&& style.getBackgroundImage( ).length( ) > 0 )		{			ss.setBackgroundImage( ImageImpl.create( style.getBackgroundImage( ) ) );		}		double pt = CSSUtil.convertToPixel( style.getPaddingTop( ) );		double pb = CSSUtil.convertToPixel( style.getPaddingBottom( ) );		double pl = CSSUtil.convertToPixel( style.getPaddingLeft( ) );		double pr = CSSUtil.convertToPixel( style.getPaddingRight( ) );		ss.setPadding( InsetsImpl.create( pt, pl, pb, pr ) );		return ss;	}