myTracker = tracker;
myTracker.init(this);
+ Position originalPreferred = position;
+
JRootPane root = null;
JDialog dialog = IJSwingUtilities.findParentOfType(tracker.getComponent(), JDialog.class);
if (dialog != null) {
myLayeredPane.addComponentListener(myComponentListener);
- myTargetPoint = myTracker.recalculateLocation(this).getPoint(myLayeredPane);
+ myTargetPoint = myPosition.getShiftedPoint(myTracker.recalculateLocation(this).getPoint(myLayeredPane), myCalloutshift);
if (myShowPointer) {
}
}
+ if (myPosition != originalPreferred) {
+ myTargetPoint = myPosition.getShiftedPoint(myTracker.recalculateLocation(this).getPoint(myLayeredPane), myCalloutshift);
+ }
+
createComponent();
myComp.validate();
Rectangle rec = new Rectangle(new Point(0, 0), size);
- position.setRecToRelativePosition(rec, position.getShiftedPoint(myTargetPoint, myCalloutshift));
+ position.setRecToRelativePosition(rec, myTargetPoint);
if (adjust) {
rec = myPosition
RelativePoint newPosition = tracker.recalculateLocation(this);
if (newPosition != null) {
- myTargetPoint = newPosition.getPoint(myLayeredPane);
+ myTargetPoint = myPosition.getShiftedPoint(newPosition.getPoint(myLayeredPane), myCalloutshift);
myPosition.updateBounds(this);
}
}
Rectangle forcedBounds,
Dimension preferredSize,
boolean showPointer,
- Point targetPoint, Insets containerInsets, int calloutShift) {
+ Point point, Insets containerInsets, int calloutShift) {
Rectangle bounds = forcedBounds;
- Point point = showPointer ? getShiftedPoint(targetPoint, calloutShift) : targetPoint;
-
if (bounds == null) {
Point location = showPointer
? getLocation(layeredPaneSize, point, preferredSize)