You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
41 lines
1.4 KiB
package com.fr.plugin.designer; |
|
|
|
import com.fr.design.actions.UpdateAction; |
|
import com.fr.design.designer.TargetComponent; |
|
import com.fr.design.fun.impl.AbstractRightSelectionHandlerProvider; |
|
import com.fr.design.gui.imenu.UIPopupMenu; |
|
import com.fr.design.mainframe.BaseFormDesigner; |
|
import com.fr.design.mainframe.FormDesigner; |
|
import com.fr.design.selection.SelectableElement; |
|
import com.fr.grid.selection.CellSelection; |
|
import com.fr.grid.selection.FloatSelection; |
|
import com.fr.plugin.transform.ExecuteFunctionRecord; |
|
import com.fr.plugin.transform.FunctionRecorder; |
|
|
|
import java.util.List; |
|
|
|
@FunctionRecorder |
|
public class MyActionImpl extends AbstractRightSelectionHandlerProvider { |
|
|
|
|
|
@Override |
|
@ExecuteFunctionRecord |
|
public void dmlMenu(TargetComponent ePane, UIPopupMenu popupMenu) { |
|
popupMenu.add(new MyCopyAction(ePane).createMenuItem()); |
|
} |
|
|
|
@Override |
|
public boolean accept(SelectableElement selectableElement) { |
|
return selectableElement instanceof CellSelection || selectableElement instanceof FloatSelection; |
|
} |
|
|
|
@Override |
|
public void dmlUpdateActions(BaseFormDesigner formDesigner ,List<UpdateAction> actions) { |
|
actions.add(new MyCutAction((FormDesigner) formDesigner)); |
|
} |
|
|
|
@Override |
|
public boolean accept(BaseFormDesigner formDesigner) { |
|
return formDesigner instanceof FormDesigner; |
|
} |
|
} |