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 @@ -13,11 +13,11 @@
package org.eclipse.wb.internal.swing.gef.part;

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.swing.model.component.JTabbedPaneInfo;
import org.eclipse.wb.internal.swing.model.component.JTabbedPaneTabInfo;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2025 Google, Inc. and others.
* 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,13 +12,10 @@
*******************************************************************************/
package org.eclipse.wb.internal.swing.gef.policy.layout;

import org.eclipse.wb.draw2d.Figure;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.MouseEvent;
import org.eclipse.draw2d.MouseListener;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.Image;

/**
Expand Down Expand Up @@ -48,11 +45,7 @@ public CardNavigationFigure(CardLayoutSelectionEditPolicy policy) {
public void mousePressed(MouseEvent event) {
event.consume();
//
Point location = Point.SINGLETON;
location.setLocation(event.x, event.y);
translateFromParent(location);
//
if (location.x < WIDTH) {
if (event.x - bounds.x < WIDTH) {
m_policy.showPrevComponent();
} else {
m_policy.showNextComponent();
Expand All @@ -67,9 +60,8 @@ public void mousePressed(MouseEvent event) {
//
////////////////////////////////////////////////////////////////////////////
@Override
protected void paintClientArea(Graphics graphics) {
Rectangle r = getClientArea();
graphics.drawImage(m_prevImage, r.x, r.y);
graphics.drawImage(m_nextImage, r.x + WIDTH, r.y);
protected void paintFigure(Graphics graphics) {
graphics.drawImage(m_prevImage, bounds.x, bounds.y);
graphics.drawImage(m_nextImage, bounds.x + WIDTH, bounds.y);
}
}
Loading