ComboViewer v = new ComboViewer( container, SWT.READ_ONLY );
v.setLabelProvider( new LabelProvider() );
v.setContentProvider( ArrayContentProvider.getInstance() );
v.setInput( IconType.VALUES );
IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__KIND );
dbContext.bindValue( selProp.observe( v ), prop.observe( o ), new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ),
new EMFUpdateValueStrategy() );
}
{
Label l = new Label( container, SWT.NONE );
l.setText( "URL*:" );
tUrl = new Text( container, SWT.BORDER );
tUrl.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__HREF );
dbContext.bindValue( tProp.observeDelayed( DELAY, tUrl ), prop.observe( o ),
new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
}
{
Label l = new Label( container, SWT.NONE );
l.setText( "Depth:" );
ComboViewer v = new ComboViewer( container, SWT.READ_ONLY );
v.setLabelProvider( new LabelProvider() );
v.setContentProvider( ArrayContentProvider.getInstance() );
// TODO not hard coded here
v.setInput( new String[] { "8", "24", "32" } );
IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__DEPTH );
dbContext.bindValue( selProp.observe( v ), prop.observe( o ), new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ),
new EMFUpdateValueStrategy() );
}
{
Label l = new Label( container, SWT.NONE );
l.setText( "Width:" );
tWidth = new Text( container, SWT.BORDER );
tWidth.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__WIDTH );
dbContext.bindValue( tProp.observeDelayed( DELAY, tWidth ), prop.observe( o ),
new EMFUpdateValueStrategy( EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
}
{
Label l = new Label( container, SWT.NONE );
l.setText( "Height:" );
tHeight = new Text( container, SWT.BORDER );
tHeight.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ICON__HEIGHT );
dbContext.bindValue( tProp.observeDelayed( DELAY, tHeight ), prop.observe( o ), new EMFUpdateValueStrategy(
EMFUpdateValueStrategy.POLICY_ON_REQUEST ), new EMFUpdateValueStrategy() );
}
return area;
}