|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
package com.fr.design.mainframe.form; |
|
|
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
|
|
|
|
|
import com.fr.design.DesignState; |
|
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
@ -9,9 +8,9 @@ import com.fr.design.actions.core.ActionFactory;
|
|
|
|
|
import com.fr.design.actions.form.FormECBackgroundAction; |
|
|
|
|
import com.fr.design.actions.form.FormECColumnsAction; |
|
|
|
|
import com.fr.design.actions.form.FormECFrozenAction; |
|
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
|
import com.fr.design.event.TargetModifiedEvent; |
|
|
|
|
import com.fr.design.event.TargetModifiedListener; |
|
|
|
|
import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
|
import com.fr.design.gui.frpane.HyperlinkGroupPane; |
|
|
|
|
import com.fr.design.mainframe.*; |
|
|
|
|
import com.fr.design.mainframe.cell.QuickEditorRegion; |
|
|
|
@ -22,13 +21,16 @@ import com.fr.design.menu.ToolBarDef;
|
|
|
|
|
import com.fr.design.present.ConditionAttributesGroupPane; |
|
|
|
|
import com.fr.form.main.Form; |
|
|
|
|
import com.fr.grid.Grid; |
|
|
|
|
import com.fr.js.NameJavaScriptGroup; |
|
|
|
|
import com.fr.page.ReportSettingsProvider; |
|
|
|
|
import com.fr.report.elementcase.TemplateElementCase; |
|
|
|
|
import com.fr.report.worksheet.FormElementCase; |
|
|
|
|
import com.fr.design.selection.SelectionEvent; |
|
|
|
|
import com.fr.design.selection.SelectionListener; |
|
|
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.KeyEvent; |
|
|
|
|
|
|
|
|
|
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
*/ |
|
|
|
|
public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase>{ |
|
|
|
@ -72,6 +74,61 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
|
|
|
|
|
EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void initInputActionMap() { |
|
|
|
|
InputMap inputMapAncestor = this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); |
|
|
|
|
ActionMap actionMap = this.getActionMap(); |
|
|
|
|
inputMapAncestor.clear(); |
|
|
|
|
actionMap.clear(); |
|
|
|
|
|
|
|
|
|
if (!DesignModeContext.isBanCopyAndCut()) { |
|
|
|
|
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, DEFAULT_MODIFIER), "cut"); |
|
|
|
|
actionMap.put("cut", new AbstractAction() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
if (cut()) { |
|
|
|
|
fireTargetModified(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER), "copy"); |
|
|
|
|
actionMap.put("copy", new AbstractAction() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
copy(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER), "paste"); |
|
|
|
|
actionMap.put("paste", new AbstractAction() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
if (paste()) { |
|
|
|
|
refreshPropertyPanes(); |
|
|
|
|
repaint(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "delete_content"); |
|
|
|
|
actionMap.put("delete_content", new AbstractAction() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
if (clearContents()) { |
|
|
|
|
fireTargetModified(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
inputMapAncestor.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, DEFAULT_MODIFIER), "delete_all"); |
|
|
|
|
actionMap.put("delete_all", new AbstractAction() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
if (clearAll()) { |
|
|
|
|
fireTargetModified(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected boolean supportRepeatedHeaderFooter() { |
|
|
|
|
return true; |
|
|
|
|