Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import org.eclipse.wb.core.gef.policy.selection.LineSelectionEditPolicy;
import org.eclipse.wb.core.model.IWrapper;
import org.eclipse.wb.core.model.IWrapperInfo;
import org.eclipse.wb.draw2d.Figure;
import org.eclipse.wb.gef.graphical.DesignEditPart;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Point;
Expand Down Expand Up @@ -74,7 +74,7 @@ protected void paintClientArea(Graphics graphics) {
ImageDescriptor imageDescriptor = m_wrapper.getWrapperInfo().getDescription().getIcon();
if (imageDescriptor != null) {
Image image = imageDescriptor.createImage();
graphics.drawImage(image, 0, 0);
graphics.drawImage(image, bounds.x, bounds.y);
image.dispose();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
package org.eclipse.wb.internal.core.gef.part.nonvisual;

import org.eclipse.wb.core.gef.policy.selection.NonResizableSelectionEditPolicy;
import org.eclipse.wb.draw2d.Figure;
import org.eclipse.wb.gef.graphical.DesignEditPart;
import org.eclipse.wb.internal.core.model.nonvisual.AbstractArrayObjectInfo;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2023 Google, Inc.
* Copyright (c) 2011, 2026 Google, Inc. and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -12,8 +12,7 @@
*******************************************************************************/
package org.eclipse.wb.internal.core.gef.part.nonvisual;

import org.eclipse.wb.draw2d.Figure;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Dimension;
Expand Down Expand Up @@ -65,9 +64,10 @@ public void update(String text, Point location) {
// set all bounds
setBounds(new Rectangle(location.x, location.y, width, m_imageSize.height + textSize.height));
m_imageLocation.x = width / 2 - m_imageSize.width / 2;
m_label.setBounds(new Rectangle(width / 2 - textSize.width / 2,
m_imageSize.height,
textSize.width,
m_label.setBounds(new Rectangle( //
location.x + width / 2 - textSize.width / 2, //
location.y + m_imageSize.height, //
textSize.width, //
textSize.height));
}
}
Expand All @@ -78,9 +78,9 @@ public void update(String text, Point location) {
//
////////////////////////////////////////////////////////////////////////////
@Override
protected void paintClientArea(Graphics graphics) {
protected void paintFigure(Graphics graphics) {
Image image = m_imageDescriptor.createImage();
graphics.drawImage(image, m_imageLocation);
graphics.drawImage(image, bounds.x + m_imageLocation.x, bounds.y + m_imageLocation.y);
image.dispose();
}
}
Loading