GridData gdTXTScaleMin = new GridData( GridData.HORIZONTAL_ALIGN_FILL ); txtScaleMin.setLayoutData( gdTXTScaleMin ); txtScaleMin.setText( getValue( getAxisForProcessing( ).getScale( ) .getMin( ) ) ); txtScaleMin.addListener( this ); txtScaleMin.setDefaultValue( "" );
{ GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.widthHint = 100; txtScaleMin.setLayoutData( gd ); txtScaleMin.setText( getValue( getAxisForProcessing( ).getScale( ) .getMin( ) ) ); txtScaleMin.addListener( this ); txtScaleMin.setDefaultValue( "" ); }
	public Composite getComponent( Composite parent )	{		GridLayout glContent = new GridLayout( 2, true );		glContent.marginHeight = 7;		glContent.marginWidth = 7;		glContent.horizontalSpacing = 2;		glContent.verticalSpacing = 5;		cmpContent = new Composite( parent, SWT.NONE );		cmpContent.setLayout( glContent );		if ( isAxisX( ) )		{			Composite cmpLeftPane = new Composite( cmpContent, SWT.NONE );			{				GridLayout glLeftPane = new GridLayout( 3, false );				glLeftPane.horizontalSpacing = 2;				glLeftPane.verticalSpacing = 5;				glLeftPane.marginHeight = 0;				glLeftPane.marginWidth = 2;				cmpLeftPane.setLayout( glLeftPane );				GridData gd = new GridData( GridData.FILL_HORIZONTAL );				cmpLeftPane.setLayoutData( gd );			}			Label lblType = new Label( cmpLeftPane, SWT.NONE );			GridData gdLBLType = new GridData( );			lblType.setLayoutData( gdLBLType );			lblType.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Type" ) ); //$NON-NLS-1$			cmbTypes = new Combo( cmpLeftPane, SWT.DROP_DOWN | SWT.READ_ONLY );			GridData gdCMBTypes = new GridData( GridData.FILL_HORIZONTAL );			cmbTypes.setLayoutData( gdCMBTypes );			cmbTypes.addSelectionListener( this );			btnFormatSpecifier = new Button( cmpLeftPane, SWT.PUSH );			GridData gdBTNFormatSpecifier = new GridData( GridData.VERTICAL_ALIGN_END );			gdBTNFormatSpecifier.widthHint = 20;			gdBTNFormatSpecifier.heightHint = 20;			btnFormatSpecifier.setLayoutData( gdBTNFormatSpecifier );			btnFormatSpecifier.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); //$NON-NLS-1$			btnFormatSpecifier.setToolTipText( Messages.getString( "Shared.Tooltip.FormatSpecifier" ) ); //$NON-NLS-1$			btnFormatSpecifier.addSelectionListener( this );			btnFormatSpecifier.getImage( )					.setBackground( btnFormatSpecifier.getBackground( ) );			Composite cmpRightPane = new Composite( cmpContent, SWT.NONE );			{				GridLayout glRightPane = new GridLayout( 2, false );				glRightPane.marginHeight = 0;				cmpRightPane.setLayout( glRightPane );				GridData gd = new GridData( GridData.FILL_BOTH );				cmpRightPane.setLayoutData( gd );			}			Label lblOrigin = new Label( cmpLeftPane, SWT.NONE );			GridData gdLBLOrigin = new GridData( );			lblOrigin.setLayoutData( gdLBLOrigin );			lblOrigin.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Origin" ) ); //$NON-NLS-1$			cmbOrigin = new Combo( cmpLeftPane, SWT.DROP_DOWN | SWT.READ_ONLY );			{				GridData gd = new GridData( GridData.FILL_HORIZONTAL );				gd.horizontalSpan = 2;				gd.widthHint = 120;				cmbOrigin.setLayoutData( gd );				cmbOrigin.addSelectionListener( this );			}			boolean bValueOrigin = false;			if ( getAxisForProcessing( ).getOrigin( ) != null )			{				if ( getAxisForProcessing( ).getOrigin( )						.getType( )						.equals( IntersectionType.VALUE_LITERAL ) )				{					bValueOrigin = true;				}			}			lblValue = new Label( cmpRightPane, SWT.NONE );			{				GridData gd = new GridData( );				// gd.grabExcessVerticalSpace = true;				gd.verticalAlignment = SWT.END;				lblValue.setLayoutData( gd );				lblValue.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Value" ) ); //$NON-NLS-1$				lblValue.setEnabled( bValueOrigin );			}			txtValue = new TextEditorComposite( cmpRightPane, SWT.BORDER					| SWT.SINGLE, true );			{				GridData gd = new GridData( GridData.FILL_HORIZONTAL );				gd.grabExcessVerticalSpace = true;				gd.verticalAlignment = SWT.END;				gd.widthHint = 120;				txtValue.setLayoutData( gd );				txtValue.addListener( this );				txtValue.setEnabled( bValueOrigin );				txtValue.setDefaultValue( "" ); //$NON-NLS-1$			}		}		Group grpScale = new Group( cmpContent, SWT.NONE );		{			GridData gdGRPScale = new GridData( GridData.FILL_BOTH );			gdGRPScale.horizontalSpan = 4;			grpScale.setLayoutData( gdGRPScale );			GridLayout glScale = new GridLayout( );			glScale.numColumns = 4;			glScale.horizontalSpacing = 5;			glScale.verticalSpacing = 5;			glScale.marginHeight = 2;			glScale.marginWidth = 7;			grpScale.setLayout( glScale );			grpScale.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Scale" ) ); //$NON-NLS-1$		}		lblMin = new Label( grpScale, SWT.NONE );		GridData gdLBLMin = new GridData( );		lblMin.setLayoutData( gdLBLMin );		lblMin.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Minimum" ) ); //$NON-NLS-1$		txtScaleMin = new TextEditorComposite( grpScale, SWT.BORDER				| SWT.SINGLE, true );		GridData gdTXTScaleMin = new GridData( GridData.HORIZONTAL_ALIGN_FILL );		txtScaleMin.setLayoutData( gdTXTScaleMin );		txtScaleMin.setText( getValue( getAxisForProcessing( ).getScale( )				.getMin( ) ) );		txtScaleMin.addListener( this );		txtScaleMin.setDefaultValue( "" ); //$NON-NLS-1$		lblMax = new Label( grpScale, SWT.NONE );		GridData gdLBLMax = new GridData( );		lblMax.setLayoutData( gdLBLMax );		lblMax.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Maximum" ) ); //$NON-NLS-1$		txtScaleMax = new TextEditorComposite( grpScale, SWT.BORDER				| SWT.SINGLE, true );		GridData gdTXTScaleMax = new GridData( GridData.HORIZONTAL_ALIGN_FILL );		txtScaleMax.setLayoutData( gdTXTScaleMax );		txtScaleMax.setText( getValue( getAxisForProcessing( ).getScale( )				.getMax( ) ) );		txtScaleMax.addListener( this );		txtScaleMax.setDefaultValue( "" ); //$NON-NLS-1$		boolean bDateTimeAxisType = getAxisForProcessing( ).getType( )				.equals( AxisType.DATE_TIME_LITERAL );		lblStep = new Label( grpScale, SWT.NONE );		GridData gdLBLStep = new GridData( );		lblStep.setLayoutData( gdLBLStep );		lblStep.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Step" ) ); //$NON-NLS-1$		lblStep.setEnabled( !bDateTimeAxisType );		txtScaleStep = new TextEditorComposite( grpScale, SWT.BORDER				| SWT.SINGLE, true );		GridData gdTXTScaleStep = new GridData( GridData.FILL_HORIZONTAL );		txtScaleStep.setLayoutData( gdTXTScaleStep );		String str = ""; //$NON-NLS-1$		if ( getAxisForProcessing( ).getScale( )				.eIsSet( ComponentPackage.eINSTANCE.getScale_Step( ) ) )		{			str = String.valueOf( getAxisForProcessing( ).getScale( ).getStep( ) );		}		txtScaleStep.setText( str );		txtScaleStep.addListener( this );		txtScaleStep.setEnabled( !bDateTimeAxisType );		txtScaleStep.setDefaultValue( "" ); //$NON-NLS-1$		lblUnit = new Label( grpScale, SWT.NONE );		GridData gdLBLUnit = new GridData( );		lblUnit.setLayoutData( gdLBLUnit );		lblUnit.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.Unit" ) ); //$NON-NLS-1$		lblUnit.setEnabled( false );		cmbScaleUnit = new Combo( grpScale, SWT.DROP_DOWN | SWT.READ_ONLY );		GridData gdCMBScaleUnit = new GridData( GridData.FILL_HORIZONTAL );		cmbScaleUnit.setLayoutData( gdCMBScaleUnit );		cmbScaleUnit.addSelectionListener( this );		cmbScaleUnit.setEnabled( false );		GridLayout glGridCount = new GridLayout( );		glGridCount.numColumns = 2;		glGridCount.horizontalSpacing = 5;		glGridCount.marginHeight = 0;		glGridCount.marginWidth = 0;		Composite cmpGridCount = new Composite( grpScale, SWT.NONE );		GridData gdCMPGridCount = new GridData( GridData.FILL_HORIZONTAL );		gdCMPGridCount.horizontalSpan = 4;		cmpGridCount.setLayoutData( gdCMPGridCount );		cmpGridCount.setLayout( glGridCount );		lblGridCount = new Label( cmpGridCount, SWT.NONE );		GridData gdLBLGridCount = new GridData( );		lblGridCount.setLayoutData( gdLBLGridCount );		lblGridCount.setText( Messages.getString( "BaseAxisDataSheetImpl.Lbl.MinorGridCount" ) ); //$NON-NLS-1$		iscGridCount = new IntegerSpinControl( cmpGridCount,				SWT.NONE,				getAxisForProcessing( ).getScale( ).getMinorGridsPerUnit( ) );		GridData gdISCGridCount = new GridData( GridData.FILL_HORIZONTAL );		iscGridCount.setLayoutData( gdISCGridCount );		iscGridCount.addListener( this );		GridLayout glSeriesDefinitionCount = new GridLayout( );		glSeriesDefinitionCount.numColumns = 2;		glSeriesDefinitionCount.marginHeight = 0;		glSeriesDefinitionCount.marginWidth = 0;		glSeriesDefinitionCount.horizontalSpacing = 5;		populateLists( );		return cmpContent;	}