|
|
|
@ -8,7 +8,6 @@ import com.fr.design.DesignModelAdapter;
|
|
|
|
|
import com.fr.design.data.DesignTableDataManager; |
|
|
|
|
import com.fr.design.data.datapane.TableDataTreePane; |
|
|
|
|
import com.fr.design.designer.beans.AdapterBus; |
|
|
|
|
import com.fr.design.designer.beans.ComponentAdapter; |
|
|
|
|
import com.fr.design.designer.beans.HoverPainter; |
|
|
|
|
import com.fr.design.designer.beans.Painter; |
|
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
@ -132,7 +131,7 @@ public class FormCreatorDropTarget extends DropTarget {
|
|
|
|
|
designer.getSelectionModel().setSelectedCreators( |
|
|
|
|
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget})); |
|
|
|
|
designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED); |
|
|
|
|
tryEditTabContainer(); |
|
|
|
|
tabDragInner.tryDragIn(); |
|
|
|
|
} else { |
|
|
|
|
Toolkit.getDefaultToolkit().beep(); |
|
|
|
|
} |
|
|
|
@ -142,24 +141,6 @@ public class FormCreatorDropTarget extends DropTarget {
|
|
|
|
|
designer.stopAddingState(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 尝试进入tab编辑 |
|
|
|
|
*/ |
|
|
|
|
private void tryEditTabContainer() { |
|
|
|
|
XLayoutContainer belowXLayoutContainer = tabDragInner.getBelowXLayoutContainer(); |
|
|
|
|
if (belowXLayoutContainer != null && belowXLayoutContainer.isDragInAble()) { |
|
|
|
|
EditingMouseListener editingMouseListener = new EditingMouseListener(designer); |
|
|
|
|
editingMouseListener.refreshTopXCreator(); |
|
|
|
|
belowXLayoutContainer.setEditable(true); |
|
|
|
|
if (editingMouseListener.stopEditing() && belowXLayoutContainer != designer.getRootComponent()) { |
|
|
|
|
ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, belowXLayoutContainer); |
|
|
|
|
if (adapter != null) { |
|
|
|
|
editingMouseListener.startEditing(belowXLayoutContainer, adapter.getDesignerEditor(), adapter); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void entering(int x, int y) { |
|
|
|
|
// 将要添加的组件图标移动到鼠标下的位置
|
|
|
|
|
addingModel.moveTo(x, y); |
|
|
|
@ -289,7 +270,7 @@ public class FormCreatorDropTarget extends DropTarget {
|
|
|
|
|
int x = designer.getRelativeX(loc.x); |
|
|
|
|
int y = designer.getRelativeY(loc.y); |
|
|
|
|
hovering(x, y); |
|
|
|
|
tabDragInner.dragIn(designer.getComponentAt(x, y), x, y); |
|
|
|
|
tabDragInner.canDragIn(designer.getComponentAt(x, y), x, y); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|