Henry.Wang
3 years ago
9 changed files with 81 additions and 9 deletions
@ -0,0 +1,16 @@
|
||||
package com.fr.design.designer.beans.actions.behavior; |
||||
|
||||
import com.fr.design.designer.beans.actions.FormWidgetEditAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
|
||||
public class CopyableEnable implements UpdateBehavior<FormWidgetEditAction> { |
||||
@Override |
||||
public void doUpdate(FormWidgetEditAction action) { |
||||
FormDesigner designer = action.getEditingComponent(); |
||||
if (designer == null) { |
||||
action.setEnabled(false); |
||||
return; |
||||
} |
||||
action.setEnabled(designer.isCurrentComponentCopyable()); |
||||
} |
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.fr.design.designer.beans.actions.behavior; |
||||
|
||||
import com.fr.design.designer.beans.actions.FormWidgetEditAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
|
||||
public class CutableEnable implements UpdateBehavior<FormWidgetEditAction> { |
||||
@Override |
||||
public void doUpdate(FormWidgetEditAction action) { |
||||
FormDesigner designer = action.getEditingComponent(); |
||||
if (designer == null) { |
||||
action.setEnabled(false); |
||||
return; |
||||
} |
||||
action.setEnabled(designer.isCurrentComponentCutable()); |
||||
} |
||||
} |
@ -0,0 +1,16 @@
|
||||
package com.fr.design.designer.beans.actions.behavior; |
||||
|
||||
import com.fr.design.designer.beans.actions.FormWidgetEditAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
|
||||
public class DeletableEnable implements UpdateBehavior<FormWidgetEditAction> { |
||||
@Override |
||||
public void doUpdate(FormWidgetEditAction action) { |
||||
FormDesigner designer = action.getEditingComponent(); |
||||
if (designer == null) { |
||||
action.setEnabled(false); |
||||
return; |
||||
} |
||||
action.setEnabled(designer.isCurrentComponentDeletable()); |
||||
} |
||||
} |
Loading…
Reference in new issue