final int style = ( def.getShowBorder().content() == true ? SWT.BORDER : SWT.NONE );
try
{
final Browser browser = new Browser( composite(), style );
browser.setLayoutData( gd );
register( browser );
if( def.getContentSourceType().content() == HtmlContentSourceType.EMBEDDED )
{
browser.setText( part.content() );
attachPartListener
(
new FilteredListener<ContentEvent>()
{
@Override
protected void handleTypedEvent( final ContentEvent event )
{
browser.setText( part.content() );
}
}
);
}
else
{
browser.setUrl( part.url() );
attachPartListener
(
new FilteredListener<ContentEvent>()
{
@Override
protected void handleTypedEvent( final ContentEvent event )
{
browser.setUrl( part.url() );
}
}
);
}
}