11/*******************************************************************************
2- * Copyright (c) 2011, 2023 Google, Inc.
2+ * Copyright (c) 2011, 2026 Google, Inc. and others .
33 *
44 * This program and the accompanying materials are made available under the
55 * terms of the Eclipse Public License 2.0 which is available at
1212 *******************************************************************************/
1313package org .eclipse .wb .internal .core .gef .part .nonvisual ;
1414
15- import org .eclipse .wb .draw2d .Figure ;
16-
15+ import org .eclipse .draw2d .Figure ;
1716import org .eclipse .draw2d .Graphics ;
1817import org .eclipse .draw2d .Label ;
1918import org .eclipse .draw2d .geometry .Dimension ;
@@ -65,9 +64,10 @@ public void update(String text, Point location) {
6564 // set all bounds
6665 setBounds (new Rectangle (location .x , location .y , width , m_imageSize .height + textSize .height ));
6766 m_imageLocation .x = width / 2 - m_imageSize .width / 2 ;
68- m_label .setBounds (new Rectangle (width / 2 - textSize .width / 2 ,
69- m_imageSize .height ,
70- textSize .width ,
67+ m_label .setBounds (new Rectangle ( //
68+ location .x + width / 2 - textSize .width / 2 , //
69+ location .y + m_imageSize .height , //
70+ textSize .width , //
7171 textSize .height ));
7272 }
7373 }
@@ -78,9 +78,9 @@ public void update(String text, Point location) {
7878 //
7979 ////////////////////////////////////////////////////////////////////////////
8080 @ Override
81- protected void paintClientArea (Graphics graphics ) {
81+ protected void paintFigure (Graphics graphics ) {
8282 Image image = m_imageDescriptor .createImage ();
83- graphics .drawImage (image , m_imageLocation );
83+ graphics .drawImage (image , bounds . x + m_imageLocation . x , bounds . y + m_imageLocation . y );
8484 image .dispose ();
8585 }
8686}
0 commit comments