this.isMultiLine = isMultiLine;
- init(formFactory, labelString, initialText, textHeight, textLimit, isMultiLine, style, getLayoutComposite());
- }
+ initLabel(formFactory, labelString, isMultiLine, getLayoutComposite());
- protected void init(CdmFormFactory formFactory, String labelString, String initialText, Integer textHeight,
- Integer textLimit, boolean isMultiLine, int style, Composite layoutComposite) {
- if (labelString != null) {
- label = formFactory.createLabel(layoutComposite, CdmUtils.Nz(labelString), SWT.NULL);
- addControl(label);
- if(isMultiLine){
- label.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- }
- else{
- label.setLayoutData(LayoutConstants.LEFT());
- }
- }
+ initText(formFactory, initialText, textHeight, textLimit, isMultiLine, style, getLayoutComposite());
+ }
+ protected void initText(CdmFormFactory formFactory, String initialText, Integer textHeight, Integer textLimit,
+ boolean isMultiLine, int style, Composite layoutComposite) {
int scrollStyle = textHeight == null ? SWT.NULL : (SWT.V_SCROLL | SWT.MULTI);
int combinedStyle = style | SWT.BORDER | scrollStyle;
setText(initialText);
}
+ protected void initLabel(CdmFormFactory formFactory, String labelString, boolean isMultiLine, Composite layoutComposite) {
+ if (labelString != null) {
+ label = formFactory.createLabel(layoutComposite, CdmUtils.Nz(labelString), SWT.NULL);
+ addControl(label);
+ if(isMultiLine){
+ label.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ }
+ else{
+ label.setLayoutData(LayoutConstants.LEFT());
+ }
+ }
+ }
+
/**
* Get the text of this composites text composite
*