|
|
@ -3,6 +3,7 @@ package com.fr.design.designer.beans.actions; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
|
|
|
|
import com.fr.design.designer.creator.XLayoutContainer; |
|
|
|
import com.fr.design.mainframe.FormDesigner; |
|
|
|
import com.fr.design.mainframe.FormDesigner; |
|
|
|
import com.fr.design.mainframe.FormSelection; |
|
|
|
import com.fr.design.mainframe.FormSelection; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
@ -37,13 +38,13 @@ public class MoveToBottomAction extends FormEditAction { |
|
|
|
} |
|
|
|
} |
|
|
|
FormSelection selection = designer.getSelectionModel().getSelection(); |
|
|
|
FormSelection selection = designer.getSelectionModel().getSelection(); |
|
|
|
XCreator creator = selection.getSelectedCreator(); |
|
|
|
XCreator creator = selection.getSelectedCreator(); |
|
|
|
Container container = creator.getParent(); |
|
|
|
XLayoutContainer container = (XLayoutContainer) creator.getParent(); |
|
|
|
int targetIndex = container.getComponentCount() - 1; |
|
|
|
int targetIndex = container.getComponentCount() - 1; |
|
|
|
if (container.getComponentZOrder(creator) >= targetIndex) { |
|
|
|
if (container.getComponentZOrder(creator) >= targetIndex) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
container.setComponentZOrder(creator, targetIndex); |
|
|
|
container.setComponentZOrder(creator, targetIndex); |
|
|
|
designer.getEditListenerTable().fireCreatorModified(creator, DesignerEvent.CREATOR_DELETED); |
|
|
|
designer.getEditListenerTable().fireCreatorModified(creator, DesignerEvent.CREATOR_SELECTED); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|