|
|
@ -7,8 +7,6 @@ import com.fr.base.GraphHelper; |
|
|
|
import com.fr.base.vcs.DesignerMode; |
|
|
|
import com.fr.base.vcs.DesignerMode; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
import com.fr.design.designer.beans.AdapterBus; |
|
|
|
|
|
|
|
import com.fr.design.designer.beans.ComponentAdapter; |
|
|
|
|
|
|
|
import com.fr.design.designer.beans.events.DesignerEditor; |
|
|
|
import com.fr.design.designer.beans.events.DesignerEditor; |
|
|
|
import com.fr.design.designer.beans.models.SelectionModel; |
|
|
|
import com.fr.design.designer.beans.models.SelectionModel; |
|
|
|
import com.fr.design.designer.ui.SelectedPopupDialog; |
|
|
|
import com.fr.design.designer.ui.SelectedPopupDialog; |
|
|
@ -28,10 +26,12 @@ import com.fr.design.plugin.DesignerPluginContext; |
|
|
|
import com.fr.design.utils.gui.LayoutUtils; |
|
|
|
import com.fr.design.utils.gui.LayoutUtils; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.container.WTitleLayout; |
|
|
|
import com.fr.form.ui.container.WTitleLayout; |
|
|
|
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.event.MouseListener; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JFrame; |
|
|
|
import javax.swing.JFrame; |
|
|
@ -546,21 +546,31 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo |
|
|
|
* @param e 鼠标点击事件 |
|
|
|
* @param e 鼠标点击事件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){ |
|
|
|
public void respondClick(EditingMouseListener editingMouseListener,MouseEvent e){ |
|
|
|
FormDesigner designer = editingMouseListener.getDesigner(); |
|
|
|
|
|
|
|
SelectionModel selectionModel = editingMouseListener.getSelectionModel(); |
|
|
|
SelectionModel selectionModel = editingMouseListener.getSelectionModel(); |
|
|
|
|
|
|
|
|
|
|
|
if (e.getClickCount() <= 1) { |
|
|
|
if (e.getClickCount() <= 1) { |
|
|
|
selectionModel.selectACreatorAtMouseEvent(e); |
|
|
|
selectionModel.selectACreatorAtMouseEvent(e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
editingMouseListener.refreshTopXCreator(); |
|
|
|
editingMouseListener.refreshTopXCreator(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (editingMouseListener.stopEditing() && this != designer.getRootComponent()) { |
|
|
|
/** |
|
|
|
ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); |
|
|
|
* |
|
|
|
editingMouseListener.startEditing(this, adapter.getDesignerEditor(), adapter); |
|
|
|
* 进入编辑模式 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void startEditing() { |
|
|
|
|
|
|
|
FormDesigner designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); |
|
|
|
|
|
|
|
MouseListener[] listeners = designer.getMouseListeners(); |
|
|
|
|
|
|
|
if (ArrayUtils.isNotEmpty(listeners) && listeners[0] instanceof EditingMouseListener) { |
|
|
|
|
|
|
|
startEditing(((EditingMouseListener) listeners[0]), designer, true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void startEditing(EditingMouseListener editingMouseListener, FormDesigner designer, boolean editing) { |
|
|
|
|
|
|
|
// do nothing
|
|
|
|
|
|
|
|
// 子类按需实现
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 删除相关组件 |
|
|
|
* 删除相关组件 |
|
|
|
* |
|
|
|
* |
|
|
|