| /***************************************************************************** |
| * Copyright (c) 2019 CEA LIST. |
| * |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Xavier Le Pallec (for CEA LIST) xlepallec@lilo.org - Bug 558456 |
| * |
| *****************************************************************************/ |
| |
| package org.eclipse.papyrus.uml.diagram.clazz.lf.associationlabellayout.figures; |
| |
| import org.eclipse.draw2d.Graphics; |
| import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel; |
| |
| /** |
| * This class is only useful for redefining the low-level visual label for |
| * multiplicity source in order to set an opaque background. |
| * |
| */ |
| public class SelfLaidOutWrappingLabel extends PapyrusWrappingLabel { |
| |
| /** |
| * Paints method is the one to redefine for this opacity the background. |
| */ |
| @Override |
| public void paint(Graphics graphics) { |
| graphics.fillRectangle(this.getBounds()); |
| super.paint(graphics); |
| |
| } |
| |
| } |