Browse Source

Merge pull request #918 in BA/design from ~XIAOXIA/design:9.0 to 9.0

* commit 'aa8fc97a5fa702bca04ae0e0435f2580a9c4e790':
  bug fix
  bug fix
master
superman 8 years ago
parent
commit
1186ad21ae
  1. 8
      designer/src/com/fr/design/actions/report/ReportExportAttrAction.java
  2. 6
      designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
  3. 13
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

8
designer/src/com/fr/design/actions/report/ReportExportAttrAction.java

@ -1,17 +1,15 @@
package com.fr.design.actions.report;
import java.awt.event.ActionEvent;
import com.fr.base.BaseUtils;
import com.fr.design.actions.JWorkBookAction;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JWorkBook;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.report.ReportExportAttrPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.general.IOUtils;
import com.fr.main.TemplateWorkBook;
import com.fr.plugin.chart.designer.other.HyperlinkMapFactory;
import java.awt.event.ActionEvent;
public class ReportExportAttrAction extends JWorkBookAction {

6
designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java

@ -4,6 +4,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel;
import com.fr.design.mainframe.alphafine.cell.model.MoreModel;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
@ -38,8 +39,9 @@ public class ContentCellRender implements ListCellRenderer<Object> {
name.setForeground(AlphaFineConstants.BLACK);
name.setVerticalTextPosition(SwingConstants.CENTER);
name.setHorizontalTextPosition(SwingConstants.RIGHT);
if (model.getDescription() != null) {
content.setText("-" + model.getDescription());
String description = model.getDescription();
if (StringUtils.isNotBlank(description)) {
content.setText("-" + description);
content.setForeground(AlphaFineConstants.LIGHT_GRAY);
panel.add(content, BorderLayout.CENTER);
}

13
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -34,6 +34,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
@ -157,7 +158,7 @@ public abstract class ToolBarMenuDock {
private void addAllUpdateActionsToList(List<MenuDef> menuList) {
shortCutsList = new ArrayList<>();
for (MenuDef menuDef : menuList) {
addUpdateActionToList(menuDef);
addUpdateActionToList(menuDef, 0);
}
}
@ -165,16 +166,20 @@ public abstract class ToolBarMenuDock {
* 递归获取所有UpdateAction
* @param menuDef
*/
private void addUpdateActionToList(MenuDef menuDef) {
private void addUpdateActionToList(MenuDef menuDef, int level) {
if (menuDef instanceof OpenRecentReportMenuDef) {
return;
}
String parentName = menuDef.getName();
String parentName = StringUtils.EMPTY;
if (level > 0) {
parentName = menuDef.getName();
}
level++;
for (ShortCut shortCut : menuDef.getShortcutList()) {
if (shortCut instanceof UpdateAction) {
shortCutsList.add(new UpdateActionModel(parentName, (UpdateAction) shortCut));
} else if (shortCut instanceof MenuDef) {
addUpdateActionToList((MenuDef) shortCut);
addUpdateActionToList((MenuDef) shortCut, level);
}
}
}

Loading…
Cancel
Save