Commit 522cb19f authored by Christoph Döbber's avatar Christoph Döbber
Browse files

fixed OPLabels

refs 903
parent fbcad26e
......@@ -18,6 +18,8 @@ $Id$
package org.fortiss.af3.operatorpanel.ui.simulator.views;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.fortiss.af3.operatorpanel.model.OPLabel;
......@@ -29,9 +31,9 @@ import org.fortiss.af3.operatorpanel.model.OPLabel;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 1E398D4044F7DF9B5697E7EA45DFD299
* @ConQAT.Rating YELLOW Hash: 67D2B3CD583B6847452ABBC98007B202
*/
/* package */class OPVCLabel extends OPViewControlBase<OPLabel, Label> {
/* package */class OPVCLabel extends OPViewControlBase<OPLabel, Composite> {
/** Constructor. */
public OPVCLabel(OPLabel item, Composite parent) {
......@@ -40,9 +42,13 @@ import org.fortiss.af3.operatorpanel.model.OPLabel;
/** {@inheritDoc} */
@Override
protected Label createControl(Composite parent) {
Label label = new Label(parent, SWT.NONE);
protected Composite createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NO_BACKGROUND);
container.setLayout(new GridLayout(1, false));
Label label = new Label(container, SWT.NONE);
label.setText(modelItem.getComment());
return label;
label.setAlignment(SWT.CENTER);
label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1));
return container;
}
}
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