* the FormToolKit to use
*/
private void createAsMandatoryAttributeSection( Composite parent, FormToolkit toolkit )
{
// As Mandatory Attribute Section
Section mandatoryAttributeSection = toolkit.createSection( parent, Section.DESCRIPTION | Section.EXPANDED
| Section.TITLE_BAR );
String names[] = modifiedAttributeType.getNamesRef();
if ( ( names != null ) && ( names.length > 0 ) )
{
mandatoryAttributeSection
.setDescription( NLS
.bind(
Messages.getString( "AttributeTypeEditorUsedByPage.AttributeTypeMandatory" ), new String[] { ViewUtils.concateAliases( names ) } ) ); //$NON-NLS-1$
}
else
{
mandatoryAttributeSection
.setDescription( NLS
.bind(
Messages.getString( "AttributeTypeEditorUsedByPage.AttributeTypeMandatory" ), new String[] { modifiedAttributeType.getOid() } ) ); //$NON-NLS-1$
}
mandatoryAttributeSection.setText( Messages.getString( "AttributeTypeEditorUsedByPage.AsMandatoryAttribute" ) ); //$NON-NLS-1$
// Creating the layout of the section
Composite mandatoryAttributeSectionClient = toolkit.createComposite( mandatoryAttributeSection );
mandatoryAttributeSectionClient.setLayout( new GridLayout() );
toolkit.paintBordersFor( mandatoryAttributeSectionClient );
mandatoryAttributeSection.setClient( mandatoryAttributeSectionClient );
mandatoryAttributeSection.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
mandatoryAttributeTable = toolkit.createTable( mandatoryAttributeSectionClient, SWT.NONE );
GridData gridData = new GridData( SWT.FILL, SWT.FILL, true, true );
gridData.heightHint = 1;
mandatoryAttributeTable.setLayoutData( gridData );