in plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java [143:337]
protected void createContents( final ScrolledForm detailForm )
{
this.detailForm = detailForm;
detailForm.getBody().setLayout( new GridLayout() );
// create main section
mainSection = toolkit.createSection( detailForm.getBody(), SWT.NONE );
mainSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.Details" ) ); //$NON-NLS-1$
mainSection.marginWidth = 0;
mainSection.marginHeight = 0;
mainSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( mainSection );
// create flag section
flagSection = toolkit.createSection( detailForm.getBody(), SWT.NONE );
flagSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.Flags" ) ); //$NON-NLS-1$
flagSection.marginWidth = 0;
flagSection.marginHeight = 0;
flagSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( flagSection );
// create flags content
Composite flagClient = toolkit.createComposite( flagSection, SWT.WRAP );
GridLayout flagLayout = new GridLayout();
flagLayout.numColumns = 4;
flagLayout.marginWidth = 0;
flagLayout.marginHeight = 0;
flagClient.setLayout( flagLayout );
flagSection.setClient( flagClient );
singleValuedLabel = toolkit.createLabel( flagClient, Messages
.getString( "AttributeTypeDescriptionDetailsPage.SingleValued" ), SWT.CHECK ); //$NON-NLS-1$
singleValuedLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
noUserModificationLabel = toolkit.createLabel( flagClient, Messages
.getString( "AttributeTypeDescriptionDetailsPage.ReadOnly" ), SWT.CHECK ); //$NON-NLS-1$
noUserModificationLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
collectiveLabel = toolkit.createLabel( flagClient, Messages
.getString( "AttributeTypeDescriptionDetailsPage.Collective" ), SWT.CHECK ); //$NON-NLS-1$
collectiveLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
isObsoleteLabel = toolkit.createLabel( flagClient, Messages
.getString( "AttributeTypeDescriptionDetailsPage.Obsolete" ), SWT.CHECK ); //$NON-NLS-1$
isObsoleteLabel.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
// create syntax section
syntaxSection = toolkit.createSection( detailForm.getBody(), SWT.NONE );
syntaxSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.Syntax" ) ); //$NON-NLS-1$
syntaxSection.marginWidth = 0;
syntaxSection.marginHeight = 0;
syntaxSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( syntaxSection );
// create syntax content
Composite syntaxClient = toolkit.createComposite( syntaxSection, SWT.WRAP );
GridLayout syntaxLayout = new GridLayout();
syntaxLayout.numColumns = 2;
syntaxLayout.marginWidth = 0;
syntaxLayout.marginHeight = 0;
syntaxClient.setLayout( syntaxLayout );
syntaxSection.setClient( syntaxClient );
toolkit.createLabel( syntaxClient,
Messages.getString( "AttributeTypeDescriptionDetailsPage.SyntaxOID" ), SWT.NONE ); //$NON-NLS-1$
syntaxLink = toolkit.createHyperlink( syntaxClient, "", SWT.WRAP ); //$NON-NLS-1$
syntaxLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
syntaxLink.addHyperlinkListener( this );
toolkit.createLabel( syntaxClient,
Messages.getString( "AttributeTypeDescriptionDetailsPage.SyntaxDescription" ), SWT.NONE ); //$NON-NLS-1$
syntaxDescText = toolkit.createText( syntaxClient, "", SWT.NONE ); //$NON-NLS-1$
syntaxDescText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
syntaxDescText.setEditable( false );
toolkit
.createLabel( syntaxClient, Messages.getString( "AttributeTypeDescriptionDetailsPage.Length" ), SWT.NONE ); //$NON-NLS-1$
lengthText = toolkit.createText( syntaxClient, "", SWT.NONE ); //$NON-NLS-1$
lengthText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
lengthText.setEditable( false );
// create matching rules section
matchingRulesSection = toolkit.createSection( detailForm.getBody(), SWT.NONE );
matchingRulesSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.MatchingRules" ) ); //$NON-NLS-1$
matchingRulesSection.marginWidth = 0;
matchingRulesSection.marginHeight = 0;
matchingRulesSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( matchingRulesSection );
// create matching rules content
Composite matchClient = toolkit.createComposite( matchingRulesSection, SWT.WRAP );
GridLayout matchLayout = new GridLayout();
matchLayout.numColumns = 2;
matchLayout.marginWidth = 0;
matchLayout.marginHeight = 0;
matchClient.setLayout( matchLayout );
matchingRulesSection.setClient( matchClient );
toolkit.createLabel( matchClient,
Messages.getString( "AttributeTypeDescriptionDetailsPage.EqualityMatch" ), SWT.NONE ); //$NON-NLS-1$
equalityLink = toolkit.createHyperlink( matchClient, "", SWT.WRAP ); //$NON-NLS-1$
equalityLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
equalityLink.addHyperlinkListener( this );
toolkit.createLabel( matchClient,
Messages.getString( "AttributeTypeDescriptionDetailsPage.SubstringMatch" ), SWT.NONE ); //$NON-NLS-1$
substringLink = toolkit.createHyperlink( matchClient, "", SWT.WRAP ); //$NON-NLS-1$
substringLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
substringLink.addHyperlinkListener( this );
toolkit.createLabel( matchClient,
Messages.getString( "AttributeTypeDescriptionDetailsPage.OrderingMatch" ), SWT.NONE ); //$NON-NLS-1$
orderingLink = toolkit.createHyperlink( matchClient, "", SWT.WRAP ); //$NON-NLS-1$
orderingLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
orderingLink.addHyperlinkListener( this );
// create other matching rules section
otherMatchSection = toolkit.createSection( detailForm.getBody(), Section.TWISTIE );
otherMatchSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.OtherMatchingRules" ) ); //$NON-NLS-1$
otherMatchSection.marginWidth = 0;
otherMatchSection.marginHeight = 0;
otherMatchSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( otherMatchSection );
otherMatchSection.addExpansionListener( new ExpansionAdapter()
{
public void expansionStateChanged( ExpansionEvent e )
{
detailForm.reflow( true );
}
} );
// create used as must section
usedAsMustSection = toolkit.createSection( detailForm.getBody(), Section.TWISTIE );
usedAsMustSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.UsedAsMust" ) ); //$NON-NLS-1$
usedAsMustSection.marginWidth = 0;
usedAsMustSection.marginHeight = 0;
usedAsMustSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( usedAsMustSection );
usedAsMustSection.addExpansionListener( new ExpansionAdapter()
{
public void expansionStateChanged( ExpansionEvent e )
{
detailForm.reflow( true );
}
} );
// create used as may section
usedAsMaySection = toolkit.createSection( detailForm.getBody(), Section.TWISTIE );
usedAsMaySection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.UsedAsMay" ) ); //$NON-NLS-1$
usedAsMaySection.marginWidth = 0;
usedAsMaySection.marginHeight = 0;
usedAsMaySection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( usedAsMaySection );
usedAsMaySection.addExpansionListener( new ExpansionAdapter()
{
public void expansionStateChanged( ExpansionEvent e )
{
detailForm.reflow( true );
}
} );
// create supertype section
supertypeSection = toolkit.createSection( detailForm.getBody(), Section.TWISTIE );
supertypeSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.Supertype" ) ); //$NON-NLS-1$
supertypeSection.marginWidth = 0;
supertypeSection.marginHeight = 0;
supertypeSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( supertypeSection );
supertypeSection.addExpansionListener( new ExpansionAdapter()
{
public void expansionStateChanged( ExpansionEvent e )
{
detailForm.reflow( true );
}
} );
// create subtypes section
subtypesSection = toolkit.createSection( detailForm.getBody(), Section.TWISTIE );
subtypesSection.setText( Messages.getString( "AttributeTypeDescriptionDetailsPage.Subtypes" ) ); //$NON-NLS-1$
subtypesSection.marginWidth = 0;
subtypesSection.marginHeight = 0;
subtypesSection.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
toolkit.createCompositeSeparator( subtypesSection );
subtypesSection.addExpansionListener( new ExpansionAdapter()
{
public void expansionStateChanged( ExpansionEvent e )
{
detailForm.reflow( true );
}
} );
// create raw section
createRawSection();
}