|
|
@ -116,8 +116,8 @@ public class FormDesignerUI extends ComponentUI { |
|
|
|
designer.getPainter().paint(g, designer.getArea().getHorizontalValue(), |
|
|
|
designer.getPainter().paint(g, designer.getArea().getHorizontalValue(), |
|
|
|
designer.getArea().getVerticalValue() + designer.getParaHeight()); |
|
|
|
designer.getArea().getVerticalValue() + designer.getParaHeight()); |
|
|
|
} |
|
|
|
} |
|
|
|
DraggingModel draggingModel = designer.getDraggingModel(); |
|
|
|
|
|
|
|
if (draggingModel != null && draggingModel.getCreator() != null) { |
|
|
|
if (needPaintDraggingBean()) { |
|
|
|
// 当前正在添加的组件
|
|
|
|
// 当前正在添加的组件
|
|
|
|
paintDraggingBean(g); |
|
|
|
paintDraggingBean(g); |
|
|
|
} |
|
|
|
} |
|
|
@ -217,6 +217,19 @@ public class FormDesignerUI extends ComponentUI { |
|
|
|
ComponentUtils.resetBuffer(dbcomponents); |
|
|
|
ComponentUtils.resetBuffer(dbcomponents); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean needPaintDraggingBean() { |
|
|
|
|
|
|
|
DraggingModel draggingModel = designer.getDraggingModel(); |
|
|
|
|
|
|
|
if (draggingModel == null || draggingModel.getCreator() == null) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XCreator creator = draggingModel.getCreator(); |
|
|
|
|
|
|
|
int leftTopX = draggingModel.getCreatorLeftTopX(); |
|
|
|
|
|
|
|
int leftTopY = draggingModel.getCreatorLeftTopY(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return leftTopX + creator.getWidth() > 0 && leftTopY + creator.getHeight() > 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void paintAuthorityCreator(Graphics2D g2d, Rectangle creatorBounds) { |
|
|
|
private void paintAuthorityCreator(Graphics2D g2d, Rectangle creatorBounds) { |
|
|
|
back_or_selection_rect.setRect(creatorBounds.getX(), creatorBounds.getY(), |
|
|
|
back_or_selection_rect.setRect(creatorBounds.getX(), creatorBounds.getY(), |
|
|
|