Commit a1a41e44 authored by Simon Barner's avatar Simon Barner

Add "Text createDecoratedText()" (CAVEAT: new semantics)

* Creates a Text widget (with undo) and adds ControlDecoration
* "Label createDecoratedFormText()" retains the previous semantics of
  these methods, i.e. it wraps the created Text into a form entry

Issue-Ref: 3582
Issue-Url: https://af3-developer.fortiss.org/issues/3582Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent e2ae649d
......@@ -8,7 +8,7 @@ ModelEditorBindingBase.java 4c5ac569c0b6e7678fc8191096b26dfd09fdcb98 GREEN
ModelElementHandlerBase.java 384727748f125c9d43f19d9c0eba4ba1be5a7a26 GREEN
MultiEObjectActionBase.java 9e237d8ea640c4194e4877af4a9cfce88698e543 GREEN
NamedCommentedModelElementHandlerBase.java 681b98b50b362f01abb7a36f108f4f11b9e51829 GREEN
PropertySectionBase.java c2f5c7b815925349f0963cad7a96e6783bb7ee66 YELLOW
PropertySectionBase.java 2744f0668de50938d3015a0efbf2b1be229e30ae YELLOW
TutorialStepUIAtomicBase.java cea2a158158b476de2108d2309afcf47f217b6d9 GREEN
TutorialStepUIAtomicWithWhitelistBase.java a9788ae514f62d27169c737ef59fb583234b5d43 GREEN
TutorialStepUICompositeBase.java 8225210eacb5b88de47d78280c5819f572f00ffa GREEN
......
......@@ -150,6 +150,24 @@ public abstract class PropertySectionBase extends AbstractPropertySection {
/** This is used to set the single section input. The parameter may be null! */
protected abstract void setSectionInput(Object input);
/**
* Creates a {@link Text} control which has a {@link ControlDecoration} attached.
* The decoration is stored as widget data for convenience.
*/
protected Text createDecoratedText(String value, int style) {
Text text = createTextWithUndo(getWidgetFactory(), composite, value, style);
text.setData(DECORATION_KEY, new ControlDecoration(text, SWT.LEFT | SWT.TOP));
return text;
}
/**
* Creates a {@link Text} control which has a {@link ControlDecoration} attached.
* The decoration is stored as widget data for convenience.
*/
protected Text createDecoratedText(String value) {
return createDecoratedText(value, SWT.NONE);
}
/**
* Creates a form text field, which has a {@link ControlDecoration} attached.
* The decoration is stored as widget data for convenience.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment