Browse Source

REPORT-3163 合作开发9.0设计器=>入口跳转=>超级链接

master
plough 7 years ago
parent
commit
b07d610c66
  1. 29
      designer/src/com/fr/design/actions/edit/HyperlinkAction.java
  2. 2
      designer/src/com/fr/design/cell/editor/AbstractCellEditor.java
  3. 3
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  4. 2
      designer/src/com/fr/grid/selection/CellSelection.java
  5. 7
      designer/src/com/fr/grid/selection/FloatSelection.java
  6. 2
      designer/src/com/fr/poly/creator/ECBlockPane.java

29
designer/src/com/fr/design/actions/edit/HyperlinkAction.java

@ -0,0 +1,29 @@
/*
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
package com.fr.design.actions.edit;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.menu.KeySetUtils;
import java.awt.event.ActionEvent;
/**
* HyperlinkAction.
*/
public class HyperlinkAction extends UpdateAction {
public HyperlinkAction() {
this.setMenuKeySet(KeySetUtils.HYPER_LINK);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/hyperLink.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_HYPERLINK);
}
}

2
designer/src/com/fr/design/cell/editor/AbstractCellEditor.java

@ -7,6 +7,7 @@ import java.awt.Point;
import javax.swing.event.EventListenerList;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.event.CellEditorEvent;
import com.fr.grid.event.CellEditorListener;
@ -114,6 +115,7 @@ public abstract class AbstractCellEditor implements CellEditor {
}
if(ePane != null) {
ePane.fireSelectionChangeListener();
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ELEMENT);
}
}

3
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.fun.MenuHandler;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.menu.KeySetUtils;
@ -174,7 +175,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
// 单元格形态
menuDef.addShortCut(DeprecatedActionManager.getPresentMenu(this));
menuDef.addShortCut(new HyperlinkAction());
menuDef.addShortCut(SeparatorDef.DEFAULT);
menuDef.addShortCut(new MergeCellAction(this));
menuDef.addShortCut(new UnmergeCellAction(this));

2
designer/src/com/fr/grid/selection/CellSelection.java

@ -8,6 +8,7 @@ import com.fr.design.actions.cell.GlobalStyleMenuDef.GlobalStyleSelection;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.edit.CopyAction;
import com.fr.design.actions.edit.CutAction;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.actions.edit.PasteAction;
import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.cell.clipboard.CellElementsClip;
@ -461,6 +462,7 @@ public class CellSelection extends Selection {
popup.add(new CellExpandAttrAction().createMenuItem());
popup.add(DeprecatedActionManager.getPresentMenu(ePane).createJMenu());
popup.add(new CellAttributeAction().createMenuItem());
popup.add(new HyperlinkAction().createMenuItem());
// cut, copy and paste
popup.addSeparator();
popup.add(new CutAction(ePane).createMenuItem());

7
designer/src/com/fr/grid/selection/FloatSelection.java

@ -9,11 +9,7 @@ import com.fr.base.FRContext;
import com.fr.design.actions.cell.CleanAuthorityAction;
import com.fr.design.actions.cell.FloatStyleAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.edit.CopyAction;
import com.fr.design.actions.edit.CutAction;
import com.fr.design.actions.edit.DeleteAction;
import com.fr.design.actions.edit.EditFloatElementNameAction;
import com.fr.design.actions.edit.PasteAction;
import com.fr.design.actions.edit.*;
import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.cell.clipboard.CellElementsClip;
import com.fr.design.cell.clipboard.ElementsTransferable;
@ -125,6 +121,7 @@ public class FloatSelection extends Selection {
}
popup.add(DeprecatedActionManager.getCellMenu(ePane).createJMenu());
popup.add(new FloatStyleAction(ePane).createMenuItem());
popup.add(new HyperlinkAction().createMenuItem());
// cut, copy and paste
popup.addSeparator();

2
designer/src/com/fr/poly/creator/ECBlockPane.java

@ -4,6 +4,7 @@
package com.fr.poly.creator;
import com.fr.base.BaseUtils;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.menu.KeySetUtils;
import com.fr.general.Inter;
import com.fr.page.ReportSettingsProvider;
@ -148,6 +149,7 @@ public class ECBlockPane extends PolyElementCasePane {
// 单元格形态
menuDef.addShortCut(DeprecatedActionManager.getPresentMenu(this));
menuDef.addShortCut(new HyperlinkAction());
menuDef.addShortCut(SeparatorDef.DEFAULT);
menuDef.addShortCut(new MergeCellAction(this));
menuDef.addShortCut(new UnmergeCellAction(this));

Loading…
Cancel
Save