You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.5 KiB
55 lines
1.5 KiB
package com.fr.design.designer.ui; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
import com.fr.design.mainframe.DesignerContext; |
|
import com.fr.design.mainframe.FormDesigner; |
|
import java.awt.Rectangle; |
|
import javax.swing.JDialog; |
|
|
|
/** |
|
* @author hades |
|
* @version 10.0 |
|
* Created by hades on 2021/7/09 |
|
*/ |
|
public class SelectedPopupDialog extends JDialog { |
|
|
|
/** |
|
* 弹窗的相对组件的偏移 |
|
*/ |
|
public static final int OFFSET_X = 5; |
|
|
|
private final PopupControlPanel controlPanel; |
|
|
|
private boolean canVisible = true; |
|
|
|
public SelectedPopupDialog(XCreator creator, FormDesigner designer) { |
|
super(DesignerContext.getDesignerFrame()); |
|
this.setUndecorated(true); |
|
this.setModal(false); |
|
this.setFocusableWindowState(false); |
|
controlPanel = new PopupControlPanel(creator, designer); |
|
this.getContentPane().add(controlPanel); |
|
this.setSize(controlPanel.getDefaultDimension()); |
|
} |
|
|
|
public void updatePane(FormDesigner designer) { |
|
controlPanel.updatePane(designer); |
|
this.setSize(controlPanel.getDefaultDimension()); |
|
} |
|
|
|
public boolean hasVisibleButtons() { |
|
return controlPanel.hasVisibleButtons(); |
|
} |
|
|
|
public void setRelativeBounds(Rectangle rectangle) { |
|
this.controlPanel.setRelativeBounds(rectangle); |
|
} |
|
|
|
public boolean isCanVisible() { |
|
return canVisible; |
|
} |
|
|
|
public void setCanVisible(boolean canVisible) { |
|
this.canVisible = canVisible; |
|
} |
|
}
|
|
|