blob: 2dfab18b831f5f4b7b4742e993968cde97cb6db2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*****************************************************************************
* Copyright (c) 2009 Atos Origin.
*
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Atos Origin - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.figure.node;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
/**
* This class is a {@link WrappingLabel}, which default behavior is set
* differently :
*
* The text is centered and automatically wraps on several lines.
*/
public class CenteredWrappedLabel extends WrappingLabel {
/**
* Construct an empty wrapping label with customized alignment.
*/
public CenteredWrappedLabel() {
super();
setTextJustification(PositionConstants.CENTER);
setAlignment(PositionConstants.CENTER);
setTextWrap(true);
}
}
|