|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
package com.fr.design.designer.beans.painters; |
|
|
|
|
|
|
|
|
|
import com.fr.design.designer.beans.painters.AbstractPainter; |
|
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
|
import com.fr.design.designer.creator.XLayoutContainer; |
|
|
|
|
import com.fr.design.designer.creator.XOccupiedLayout; |
|
|
|
@ -36,8 +35,8 @@ public class FRFixLayoutPainter extends AbstractPainter {
|
|
|
|
|
@Override |
|
|
|
|
public void paint(Graphics g, int startX, int startY) { |
|
|
|
|
super.paint(g, startX, startY); |
|
|
|
|
int x = hotspot.x - hotspot_bounds.x; |
|
|
|
|
int y = hotspot.y - hotspot_bounds.y; |
|
|
|
|
int x = hotspot.x - hotspot_bounds.x ; |
|
|
|
|
int y = hotspot.y - hotspot_bounds.y ; |
|
|
|
|
Component currentComp = container.getComponentAt(x, y); |
|
|
|
|
if (currentComp == null) { |
|
|
|
|
return; |
|
|
|
@ -50,7 +49,8 @@ public class FRFixLayoutPainter extends AbstractPainter {
|
|
|
|
|
} else if (!((XCreator) currentComp).acceptType(XOccupiedLayout.class)) { |
|
|
|
|
state = OperateState.COMPONENT_REPLACE; |
|
|
|
|
} |
|
|
|
|
state.paint(g, creator.getBackupRectangle(), currentComp.getBounds(), new Rectangle(x, y, creator.initEditorSize().width, ((XCreator) currentComp).initEditorSize().height)); |
|
|
|
|
Rectangle currentCompRec = new Rectangle(currentComp.getX() - startX, currentComp.getY() - startY, currentComp.getWidth(), currentComp.getHeight()); |
|
|
|
|
state.paint(g, creator.getBackupRectangle(), currentCompRec, new Rectangle(x, y, creator.initEditorSize().width, ((XCreator) currentComp).initEditorSize().height)); |
|
|
|
|
} else { |
|
|
|
|
Color bColor = XCreatorConstants.LAYOUT_FORBIDDEN_COLOR; |
|
|
|
|
int[] hot_rec = new int[]{x, y, 0, 0}; |
|
|
|
|