|
|
|
@ -25,12 +25,12 @@ import com.fr.design.utils.gui.LayoutUtils;
|
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.form.ui.container.WTitleLayout; |
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
import com.fr.stable.CoreGraphHelper; |
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.third.javax.annotation.Nullable; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.border.Border; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
@ -39,6 +39,7 @@ import java.awt.Dimension;
|
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
import java.beans.IntrospectionException; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
@ -540,6 +541,8 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
|
|
|
|
|
selectionModel.selectACreatorAtMouseEvent(e); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
editingMouseListener.refreshTopXCreator(); |
|
|
|
|
|
|
|
|
|
if (editingMouseListener.stopEditing() && this != designer.getRootComponent()) { |
|
|
|
|
ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); |
|
|
|
|
editingMouseListener.startEditing(this, adapter.getDesignerEditor(), adapter); |
|
|
|
@ -807,8 +810,30 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
|
|
|
|
|
/** |
|
|
|
|
* 获得该组件的顶层显示组件 |
|
|
|
|
*/ |
|
|
|
|
@Nullable |
|
|
|
|
public BasicTopXCreator getTopXCreator() { |
|
|
|
|
return null; |
|
|
|
|
return new BasicTopXCreator(this){ |
|
|
|
|
@Override |
|
|
|
|
protected void addComponent() { |
|
|
|
|
BufferedImage image=getImage(); |
|
|
|
|
Icon icon = new ImageIcon(image); |
|
|
|
|
JLabel jLabel = new JLabel(icon,JLabel.CENTER); |
|
|
|
|
jLabel.setSize(getSize()); |
|
|
|
|
this.add(jLabel); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获得组件的图像 |
|
|
|
|
* */ |
|
|
|
|
public BufferedImage getImage() { |
|
|
|
|
BufferedImage image = CoreGraphHelper.createBufferedImage(getWidth(), getHeight()); |
|
|
|
|
Graphics g = image.createGraphics(); |
|
|
|
|
this.paint(g); |
|
|
|
|
return image; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|