|
|
@ -812,12 +812,12 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
|
public BasicTopXCreator getTopXCreator() { |
|
|
|
public BasicTopXCreator getTopXCreator() { |
|
|
|
return new BasicTopXCreator(this){ |
|
|
|
return new BasicTopXCreator(this) { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void addComponent() { |
|
|
|
protected void addComponent() { |
|
|
|
BufferedImage image=getImage(); |
|
|
|
BufferedImage image = getImage(); |
|
|
|
Icon icon = new ImageIcon(image); |
|
|
|
Icon icon = new ImageIcon(image); |
|
|
|
JLabel jLabel = new JLabel(icon,JLabel.CENTER); |
|
|
|
JLabel jLabel = new JLabel(icon, JLabel.CENTER); |
|
|
|
jLabel.setSize(getSize()); |
|
|
|
jLabel.setSize(getSize()); |
|
|
|
this.add(jLabel); |
|
|
|
this.add(jLabel); |
|
|
|
} |
|
|
|
} |
|
|
@ -826,7 +826,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获得组件的图像 |
|
|
|
* 获得组件的图像 |
|
|
|
* */ |
|
|
|
*/ |
|
|
|
public BufferedImage getImage() { |
|
|
|
public BufferedImage getImage() { |
|
|
|
BufferedImage image = CoreGraphHelper.createBufferedImage(getWidth(), getHeight()); |
|
|
|
BufferedImage image = CoreGraphHelper.createBufferedImage(getWidth(), getHeight()); |
|
|
|
Graphics g = image.createGraphics(); |
|
|
|
Graphics g = image.createGraphics(); |
|
|
|