|
|
@ -86,9 +86,15 @@ public class DesignerEditor<T extends JComponent> implements PropertyChangeListe |
|
|
|
int horizonMargin = marginLeft + marginRight; |
|
|
|
int horizonMargin = marginLeft + marginRight; |
|
|
|
int verticalMargin = marginTop + marginBottom; |
|
|
|
int verticalMargin = marginTop + marginBottom; |
|
|
|
|
|
|
|
|
|
|
|
comp.setSize(new Dimension(size.width - 2 - horizonMargin, size.height - 2 - verticalMargin)); |
|
|
|
int x = 1 + marginLeft; |
|
|
|
|
|
|
|
int y = 1 + marginTop; |
|
|
|
|
|
|
|
int width = size.width - 2 - horizonMargin; |
|
|
|
|
|
|
|
int height = size.height - 2 - verticalMargin; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comp.setSize(new Dimension(width, height)); |
|
|
|
LayoutUtils.layoutContainer(comp); |
|
|
|
LayoutUtils.layoutContainer(comp); |
|
|
|
Graphics clipg = g.create(1 + marginLeft, 1 + marginTop, size.width, size.height); |
|
|
|
comp.setBounds(comp.getX() + x, comp.getY() + y, width, height); |
|
|
|
|
|
|
|
Graphics clipg = g.create(x, y, width, height); |
|
|
|
this.comp.paint(clipg); |
|
|
|
this.comp.paint(clipg); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|