Browse Source
* commit '99d5d6b30f9c4fb7e2a768120cf6df51270def42': 无JIRA任务,代码规范 无JIRA任务,代码规范 无JIRA任务,使用策略模式重构代码 REPORT-6558 组件叠加优化交互验收=>顶部工具栏中的按钮状态,与右侧控件树的按钮状态一致;form,body,不可编辑 REPORT-6645 参数面板里的bug2=>参数一个一个加会导致参数面板和body结构出问题
17 changed files with 157 additions and 50 deletions
@ -0,0 +1,13 @@ |
|||||||
|
package com.fr.design.event; |
||||||
|
|
||||||
|
import java.util.EventListener; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by plough on 2018/1/19. |
||||||
|
*/ |
||||||
|
public interface DesignerOpenedListener extends EventListener { |
||||||
|
/** |
||||||
|
* Invoked when the target of the listener has changed the rpt content. |
||||||
|
*/ |
||||||
|
public void designerOpened(); |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
package com.fr.design.designer.beans.actions.behavior; |
||||||
|
|
||||||
|
import com.fr.design.designer.beans.actions.FormWidgetEditAction; |
||||||
|
import com.fr.design.mainframe.FormDesigner; |
||||||
|
|
||||||
|
/** |
||||||
|
* 只对控件有效,对底层布局(form/body)无效 |
||||||
|
* Created by plough on 2018/1/19. |
||||||
|
*/ |
||||||
|
public class ComponentEnable implements UpdateBehavior<FormWidgetEditAction> { |
||||||
|
@Override |
||||||
|
public void doUpdate(FormWidgetEditAction action) { |
||||||
|
FormDesigner designer = action.getEditingComponent(); |
||||||
|
if (designer == null) { |
||||||
|
action.setEnabled(false); |
||||||
|
return; |
||||||
|
} |
||||||
|
action.setEnabled(!designer.isRootSelected()); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
package com.fr.design.designer.beans.actions.behavior; |
||||||
|
|
||||||
|
import com.fr.design.designer.beans.actions.FormWidgetEditAction; |
||||||
|
import com.fr.design.mainframe.FormDesigner; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by plough on 2018/1/19. |
||||||
|
*/ |
||||||
|
public class MovableDownEnable implements UpdateBehavior<FormWidgetEditAction> { |
||||||
|
@Override |
||||||
|
public void doUpdate(FormWidgetEditAction action) { |
||||||
|
FormDesigner designer = action.getEditingComponent(); |
||||||
|
if (designer == null) { |
||||||
|
action.setEnabled(false); |
||||||
|
return; |
||||||
|
} |
||||||
|
action.setEnabled(designer.isCurrentComponentMovableDown()); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
package com.fr.design.designer.beans.actions.behavior; |
||||||
|
|
||||||
|
import com.fr.design.designer.beans.actions.FormWidgetEditAction; |
||||||
|
import com.fr.design.mainframe.FormDesigner; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by plough on 2018/1/19. |
||||||
|
*/ |
||||||
|
public class MovableUpEnable implements UpdateBehavior<FormWidgetEditAction> { |
||||||
|
@Override |
||||||
|
public void doUpdate(FormWidgetEditAction action) { |
||||||
|
FormDesigner designer = action.getEditingComponent(); |
||||||
|
if (designer == null) { |
||||||
|
action.setEnabled(false); |
||||||
|
return; |
||||||
|
} |
||||||
|
action.setEnabled(designer.isCurrentComponentMovableUp()); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
package com.fr.design.designer.beans.actions.behavior; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by plough on 2018/1/19. |
||||||
|
*/ |
||||||
|
public interface UpdateBehavior<T> { |
||||||
|
public void doUpdate(T t); |
||||||
|
} |
Loading…
Reference in new issue