Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~mata.li/designrel into release/10.0

master
Mata.Li 6 years ago
parent
commit
af865be2db
  1. 19
      designer-base/src/com/fr/design/actions/core/ActionFactory.java
  2. 33
      designer-base/src/com/fr/design/bbs/BBSLoginUtils.java
  3. 3
      designer-base/src/com/fr/design/condition/ConditionAttributesPane.java
  4. 2
      designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java
  5. 4
      designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java
  6. 8
      designer-base/src/com/fr/design/style/background/BackgroundFactory.java
  7. 7
      designer-base/src/com/fr/file/FILEChooserPane.java
  8. 2
      designer-chart/src/com/fr/design/chart/ChartDesignerActivator.java
  9. BIN
      designer-chart/src/com/fr/design/images/EmptyChart.png
  10. BIN
      designer-chart/src/com/fr/design/images/us_emptydata.png
  11. BIN
      designer-chart/src/com/fr/design/images/zh_emptydata.png
  12. 46
      designer-chart/src/com/fr/design/module/ChartEmptyDataStyleAction.java
  13. 242
      designer-chart/src/com/fr/design/module/ChartEmptyDataStylePane.java
  14. 7
      designer-chart/src/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java
  15. 19
      designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  16. 10
      designer-chart/src/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java
  17. 10
      designer-chart/src/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java
  18. 6
      designer-chart/src/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java
  19. 7
      designer-chart/src/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java
  20. BIN
      designer-chart/src/com/fr/van/chart/map/images/marker-icon.png
  21. BIN
      designer-chart/src/com/fr/van/chart/map/images/marker-iconx2.png
  22. 5
      designer-realize/src/com/fr/start/Designer.java
  23. 2
      designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java
  24. 1
      designer-realize/src/com/fr/start/module/PreStartActivator.java

19
designer-base/src/com/fr/design/actions/core/ActionFactory.java

@ -50,6 +50,7 @@ public class ActionFactory {
private static ConcurrentMap<Class, Class<? extends QuickEditor>> cellEditorClass = new ConcurrentHashMap<>();
private static UpdateAction chartPreStyleAction = null;
private static UpdateAction chartEmptyDataStyleAction = null;
private static UpdateAction chartMapEditorAction = null;
private ActionFactory() {
@ -159,6 +160,24 @@ public class ActionFactory {
return chartMapEditorAction;
}
/**
* 注册图表的 空数据提示样式.
*
* @param action 注册的图表空数据提示样式action
*/
public static void registerChartEmptyDataStyleAction(UpdateAction action) {
chartEmptyDataStyleAction = action;
}
/**
* 图表空数据提示样式Action
*
* @return 图表空数据提示样式Action
*/
public static UpdateAction getChartEmptyDataStyleAction() {
return chartEmptyDataStyleAction;
}
/**
* 获取图表集合类

33
designer-base/src/com/fr/design/bbs/BBSLoginUtils.java

@ -1,5 +1,6 @@
package com.fr.design.bbs;
import com.fr.config.BBSAttr;
import com.fr.config.Configuration;
import com.fr.config.MarketConfig;
import com.fr.log.FineLoggerFactory;
@ -15,12 +16,14 @@ import java.util.List;
public class BBSLoginUtils {
public static void bbsLogin(final String username, final String password) {
final BBSAttr bbsAttr = new BBSAttr();
bbsAttr.setBbsUsername(username);
bbsAttr.setBbsPassword(password);
try {
Configurations.update(new Worker() {
@Override
public void run() {
MarketConfig.getInstance().setBbsUsername(username);
MarketConfig.getInstance().setBbsPassword(password);
MarketConfig.getInstance().setBBsAttr(bbsAttr);
}
@Override
public Class<? extends Configuration>[] targets() {
@ -35,16 +38,18 @@ public class BBSLoginUtils {
public static void bbsLogin(List<String> list) {
try {
final String uid = list.get(0);
final String username = list.get(1);
final String password = list.get(2);
String uid = list.get(0);
String username = list.get(1);
String password = list.get(2);
final BBSAttr bbsAttr = new BBSAttr();
bbsAttr.setBbsUsername(username);
bbsAttr.setBbsPassword(password);
bbsAttr.setBbsUid(Integer.parseInt(uid));
bbsAttr.setInShowBBsName(username);
Configurations.update(new Worker() {
@Override
public void run() {
MarketConfig.getInstance().setBbsUsername(username);
MarketConfig.getInstance().setBbsPassword(password);
MarketConfig.getInstance().setBbsUid(Integer.parseInt(uid));
MarketConfig.getInstance().setInShowBBsName(username);
MarketConfig.getInstance().setBBsAttr(bbsAttr);
}
@Override
public Class<? extends Configuration>[] targets() {
@ -58,11 +63,13 @@ public class BBSLoginUtils {
}
public static void bbsLogout() {
final BBSAttr bbsAttr = new BBSAttr();
bbsAttr.setBbsUsername(StringUtils.EMPTY);
bbsAttr.setBbsPassword(StringUtils.EMPTY);
bbsAttr.setBbsUid(0);
bbsAttr.setInShowBBsName(StringUtils.EMPTY);
try {
MarketConfig.getInstance().setBbsUsername(StringUtils.EMPTY);
MarketConfig.getInstance().setBbsPassword(StringUtils.EMPTY);
MarketConfig.getInstance().setBbsUid(0);
MarketConfig.getInstance().setInShowBBsName(StringUtils.EMPTY);
MarketConfig.getInstance().setBBsAttr(bbsAttr);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}

3
designer-base/src/com/fr/design/condition/ConditionAttributesPane.java

@ -11,10 +11,12 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.Dimension;
import java.util.HashMap;
import java.util.Iterator;
public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
private static final int MIN_HEIGHT = 60;
protected CellHighlightAddMenuDef menuDef;
protected JPanel selectedItemPane;
@ -61,6 +63,7 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
JScrollPane selectedItemScrollPane = new JScrollPane();
selectedItemScrollPane.setViewportView(selectedItemPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT));
propertyChangePane.add(selectedItemScrollPane);
}

2
designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java

@ -103,7 +103,7 @@ public class TemplateFileTree extends EnvFileTree {
public FileNode[] listFile(String path) throws Exception {
return FRContext.getFileNodes().list(
path,
new FileExtension[]{FileExtension.CPT, FileExtension.FRM, FileExtension.CPTX, FileExtension.FRMX});
new FileExtension[]{FileExtension.CPT, FileExtension.FRM, FileExtension.CHT,FileExtension.XLS,FileExtension.XLSX});
}
/*

4
designer-base/src/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java

@ -2,7 +2,7 @@ package com.fr.design.style.background;
import com.fr.base.background.ColorBackground;
import com.fr.base.background.GradientBackground;
import com.fr.base.background.ImageBackground;
import com.fr.base.background.ImageFileBackground;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.background.gradient.GradientBackgroundPane;
import com.fr.design.style.background.impl.ColorBackgroundPane;
@ -30,7 +30,7 @@ public class BackgroundCardSwitchButtonPane extends BackgroundButtonPane {
private static void registerCardSwitchBtnBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map) {
map.put(ColorBackground.class, BackgroundUIWrapper.create()
.setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color")));
map.put(ImageBackground.class, BackgroundUIWrapper.create()
map.put(ImageFileBackground.class, BackgroundUIWrapper.create()
.setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image")));
map.put(GradientBackground.class, BackgroundUIWrapper.create()
.setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Gradient_Color")));

8
designer-base/src/com/fr/design/style/background/BackgroundFactory.java

@ -3,7 +3,7 @@ package com.fr.design.style.background;
import com.fr.base.background.ColorBackground;
import com.fr.base.background.GradientBackground;
import com.fr.base.background.ImageBackground;
import com.fr.base.background.ImageFileBackground;
import com.fr.base.background.PatternBackground;
import com.fr.base.background.TextureBackground;
import com.fr.design.ExtraDesignClassManager;
@ -104,19 +104,19 @@ public class BackgroundFactory {
}
private static void registerImageBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map) {
map.put(ImageBackground.class, BackgroundUIWrapper.create()
map.put(ImageFileBackground.class, BackgroundUIWrapper.create()
.setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image")));
}
private static void registerBrowserImageBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map) {
map.put(ImageBackground.class, BackgroundUIWrapper.create()
map.put(ImageFileBackground.class, BackgroundUIWrapper.create()
.setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("FR-Designer_Background_Image")));
}
private static void registerButtonBackground(Map<Class<? extends Background>, BackgroundUIWrapper> map){
map.put(ColorBackground.class, BackgroundUIWrapper.create()
.setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color")));
map.put(ImageBackground.class, BackgroundUIWrapper.create()
map.put(ImageFileBackground.class, BackgroundUIWrapper.create()
.setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image")));
}

7
designer-base/src/com/fr/file/FILEChooserPane.java

@ -33,6 +33,7 @@ import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@ -548,7 +549,7 @@ public class FILEChooserPane extends BasicPane {
String[] fileSuffix_local = LocalFileNodes.FILE_TYPE;
EnumSet<FileExtension> fileExtensions = EnumSet.of(FileExtension.CPT, FileExtension.CPTX, FileExtension.FRM, FileExtension.FRMX, FileExtension.CHT);
if (type == JFileChooser.OPEN_DIALOG) {
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
if (WorkContext.getCurrent().isLocal()) { //本地连接
this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"})));
} else {
this.addChooseFILEFilter(new ChooseFileFilter(fileExtensions, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"})));
@ -569,7 +570,7 @@ public class FILEChooserPane extends BasicPane {
}
// 添加 xls 文件类型过滤 kt
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
if (WorkContext.getCurrent().isLocal()) { //本地连接
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLS, Inter.getLocText("Import-Excel_Source")));
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLSX, Inter.getLocText("Import-Excel2007_Source")));
}
@ -592,7 +593,7 @@ public class FILEChooserPane extends BasicPane {
for (FILEFilter aFilterList : filterList) {
defaultComboBoxModel.addElement(aFilterList);
}
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
if (WorkContext.getCurrent().isLocal()) { //本地连接
if (!showWebReport) {
defaultComboBoxModel.addElement(Inter.getLocText("FR-Utils-App_AllFiles") + "(*.*)");
}

2
designer-chart/src/com/fr/design/chart/ChartDesignerActivator.java

@ -6,6 +6,7 @@ import com.fr.design.actions.core.ActionFactory;
import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.ChartPropertyPane;
import com.fr.design.module.ChartEmptyDataStyleAction;
import com.fr.design.module.ChartHyperlinkGroup;
import com.fr.design.module.ChartPreStyleAction;
import com.fr.design.module.DesignModuleFactory;
@ -38,6 +39,7 @@ public class ChartDesignerActivator extends Activator {
DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class);
ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction());
ActionFactory.registerChartEmptyDataStyleAction(new ChartEmptyDataStyleAction());
ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction());
ActionFactory.registerChartCollection(ChartCollection.class);

BIN
designer-chart/src/com/fr/design/images/EmptyChart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

BIN
designer-chart/src/com/fr/design/images/us_emptydata.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
designer-chart/src/com/fr/design/images/zh_emptydata.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

46
designer-chart/src/com/fr/design/module/ChartEmptyDataStyleAction.java

@ -0,0 +1,46 @@
package com.fr.design.module;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import java.awt.event.ActionEvent;
/**
* Created by mengao on 2017/11/23.
* 空数据配置action
*/
public class ChartEmptyDataStyleAction extends UpdateAction {
public ChartEmptyDataStyleAction() {
this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/EmptyChart.png"));
this.setName(Inter.getLocText("FR-Designer_Chart_Empty_Data"));
}
@Override
public void actionPerformed(ActionEvent e) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
final ChartEmptyDataStylePane pane = new ChartEmptyDataStylePane();
BasicDialog dialog = pane.showWindow(designerFrame);
dialog.addDialogActionListener(new DialogActionAdapter() {
@Override
public void doOk() {
pane.updateBean();
}
@Override
public void doCancel() {
//直接关闭弹出框
}
});
pane.populateBean();
dialog.setVisible(true);
}
}

242
designer-chart/src/com/fr/design/module/ChartEmptyDataStylePane.java

@ -0,0 +1,242 @@
package com.fr.design.module;
import com.fr.base.BaseUtils;
import com.fr.base.ChartEmptyDataStyleConf;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.style.background.image.ImageFileChooser;
import com.fr.design.style.background.image.ImagePreviewPane;
import com.fr.design.utils.ImageUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
/**
* Created by mengao on 2017/11/23.
*/
public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
private static final int WIDTH = 150;
private static final int HEIGHT = 20;
private static final int FIVE = 5;
private static final int TEN = 10;
private static final int THIRTY = 30;
private static Image DEFAULT_EMPTY_DATA_IMAGE;
private UIButtonGroup emptyData;
private UIRadioButton defaultRadioButton;
private UIRadioButton customRadioButton;
private UIButton selectPictureButton;
private ImagePreviewPane previewPane;
private ImageFileChooser imageFileChooser;
private Image emptyDataImage = DEFAULT_EMPTY_DATA_IMAGE;
private SwingWorker<Void, Void> imageWorker;
static {
DEFAULT_EMPTY_DATA_IMAGE = GeneralContext.isChineseEnv() ? IOUtils.readImage("com/fr/design/images/zh_emptydata.png")
: IOUtils.readImage("com/fr/design/images/us_emptydata.png");
}
@Override
protected JPanel createContentPane() {
JPanel content = new JPanel(new BorderLayout());
content.add(creatNorthPane(), BorderLayout.NORTH);
content.add(creatCenterPane(), BorderLayout.CENTER);
return content;
}
private JPanel creatNorthPane() {
emptyData = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
emptyData.setSelectedIndex(0);
emptyData.setPreferredSize(new Dimension(WIDTH, HEIGHT));
emptyData.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkEmptyDataStyle();
repaintPreviewPane();
}
});
UILabel promptContent = new UILabel(Inter.getLocText("FR-Designer_Tip_Content"));
JPanel northPane = GUICoreUtils.createFlowPane(new Component[]{promptContent, emptyData}, FlowLayout.LEFT, TEN, 0);
northPane.setBorder(BorderFactory.createEmptyBorder(0, FIVE, 0, 0));
return northPane;
}
private JPanel creatCenterPane() {
JPanel centerPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
// preview pane
JPanel previewContainerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPane.add(previewContainerPane, BorderLayout.CENTER);
JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Preview"));
previewOwnerPane.setLayout(new BorderLayout());
previewContainerPane.add(previewOwnerPane, BorderLayout.CENTER);
previewContainerPane.add(initSelectFilePane(), BorderLayout.EAST);
previewPane = new ImagePreviewPane();
previewOwnerPane.add(new JScrollPane(previewPane));
// init image file chooser.
imageFileChooser = new ImageFileChooser();
imageFileChooser.setMultiSelectionEnabled(false);
return centerPane;
}
public JPanel initSelectFilePane() {
JPanel selectFilePane = FRGUIPaneFactory.createBorderLayout_L_Pane();
selectFilePane.setBorder(BorderFactory.createEmptyBorder(TEN, FIVE, 0, THIRTY));
defaultRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_DEFAULT"));
customRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-Widget-Style_Custom"));
ButtonGroup buttonGroup = new ButtonGroup();
defaultRadioButton.setSelected(true);
buttonGroup.add(defaultRadioButton);
buttonGroup.add(customRadioButton);
defaultRadioButton.addActionListener(getLayoutActionListener());
customRadioButton.addActionListener(getLayoutActionListener());
JPanel jp = new JPanel(new GridLayout(3, 1, 0, TEN));
jp.add(defaultRadioButton);
jp.add(customRadioButton);
selectPictureButton = new UIButton(
Inter.getLocText("FR-Designer_Background_Image_Select"));
selectPictureButton.addActionListener(getSelectPictureActionListener());
jp.add(selectPictureButton);
selectFilePane.add(jp, BorderLayout.NORTH);
return selectFilePane;
}
private ActionListener getLayoutActionListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent evt) {
emptyDataImage = null;
checkCustomImage();
repaintPreviewPane();
}
};
}
/**
* Select picture.
*/
private ActionListener getSelectPictureActionListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent evt) {
int returnVal = imageFileChooser.showOpenDialog(ChartEmptyDataStylePane.this);
if (returnVal != JFileChooser.CANCEL_OPTION) {
final File selectedFile = imageFileChooser.getSelectedFile();
if (selectedFile != null && selectedFile.isFile()) {
previewPane.showLoading();
if (imageWorker != null && !imageWorker.isDone()) {
imageWorker = null;
}
imageWorker = new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
emptyDataImage = imageFileChooser.isCheckSelected() ? ImageUtils.defaultImageCompress(selectedFile) : BaseUtils.readImage(selectedFile.getPath());
CoreGraphHelper.waitForImage(emptyDataImage);
repaintPreviewPane();
return null;
}
};
imageWorker.execute();
} else {
previewPane.setImage(null);
}
}
}
};
}
private void checkEmptyDataStyle() {
boolean b = emptyData.getSelectedIndex() == 0;
defaultRadioButton.setEnabled(b);
customRadioButton.setEnabled(b);
selectPictureButton.setEnabled(b);
}
private void checkCustomImage() {
selectPictureButton.setVisible(customRadioButton.isSelected());
}
private void repaintPreviewPane() {
emptyDataImage = customRadioButton.isSelected() ? emptyDataImage : DEFAULT_EMPTY_DATA_IMAGE;
previewPane.setImage(emptyData.getSelectedIndex() == 0 ? emptyDataImage : null);
previewPane.repaint();
}
@Override
public String getIconPath() {
return StringUtils.EMPTY;
}
@Override
public String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Chart_Empty_Data");
}
public void populateBean() {
ChartEmptyDataStyleConf manager = ChartEmptyDataStyleConf.getInstance();
emptyData.setSelectedIndex(manager.isOpenEmptyDataStyle() == true ? 0 : 1);
customRadioButton.setSelected(manager.isCustomEmptyDataStyle());
emptyDataImage = manager.getEmptyDataImage();
checkEmptyDataStyle();
checkCustomImage();
repaintPreviewPane();
}
public void updateBean() {
ChartEmptyDataStyleConf manager = ChartEmptyDataStyleConf.getInstance();
manager.setOpenEmptyDataStyle(emptyData.getSelectedIndex() == 0);
manager.setCustomEmptyDataStyle(customRadioButton.isSelected());
manager.setEmptyDataImage(emptyDataImage);
// 通知报表整个刷新.
DesignerFrame frame = DesignerContext.getDesignerFrame();
if (frame != null) {
frame.repaint();
}
}
}

7
designer-chart/src/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java

@ -34,6 +34,8 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
protected UIButtonGroup<Integer> isStacked;
protected UIButtonGroup<Integer> isPercentStacked;
private ConditionAttr conditionAttr;
private LiteConditionPane liteConditionPane;
public VanChartCustomStackAndAxisConditionPane() {
@ -97,6 +99,7 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
}
public void populateBean(ConditionAttr conditionAttr) {
this.conditionAttr = conditionAttr;
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray());
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray());
@ -126,9 +129,7 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
}
public ConditionAttr updateBean() {
ConditionAttr conditionAttr = new ConditionAttr();
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();
seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex());
updateStackAndPercent(seriesStackAndAxis);

19
designer-chart/src/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -29,6 +29,8 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionEvent;
@ -165,6 +167,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
}
axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"),
Inter.getLocText("Plugin-ChartF_Close")});
axisRotation.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
checkZoomEnabled();
}
});
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation}
@ -173,6 +181,15 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel);
}
private void checkZoomEnabled() {
if (zoomWidget != null && axisRotation != null) {
zoomWidget.setSelectedIndex(1);
checkZoomPane();
zoomWidget.setEnabled(axisRotation.getSelectedIndex() == 1);
}
}
protected String[] getNameArray() {
return new String[]{Inter.getLocText("ChartF-X_Axis"), Inter.getLocText("ChartF-Y_Axis")
,Inter.getLocText("Plugin-ChartF_XYAxis"),Inter.getLocText("Chart-Use_None")};
@ -275,6 +292,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
populateAutoRefresh((VanChart)chart);
populateHyperlink(plot);
checkZoomEnabled();
}

10
designer-chart/src/com/fr/van/chart/designer/style/background/AlertLineListControlPane.java

@ -51,7 +51,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList);
String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())};
@ -63,7 +63,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName());
alertValue.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
}
}
@ -72,7 +72,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName());
alertValue.setAxisName(rectanglePlot.getYAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
}
}
@ -93,7 +93,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) {
if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value);
}
@ -104,7 +104,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) {
if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value);
}

10
designer-chart/src/com/fr/van/chart/designer/style/background/BackgroundListControlPane.java

@ -53,7 +53,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList);
String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())};
@ -66,7 +66,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName());
background.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
}
@ -75,7 +75,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName());
background.setAxisName(rectanglePlot.getYAxisName(axis));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
}
}
@ -102,7 +102,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) {
if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value);
}
@ -115,7 +115,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) {
if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value);
}

6
designer-chart/src/com/fr/van/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

@ -49,10 +49,8 @@ public class VanChartStackedAndAxisListControlPane extends VanChartUIListControl
public void populate(VanChartRectanglePlot plot) {
this.plot = plot;
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList();
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList();
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList);
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList);
String[] axisXNames = DefaultAxisHelper.getXAxisNames(plot);
String[] axisYNames = DefaultAxisHelper.getYAxisNames(plot);
java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>();
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();

7
designer-chart/src/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -1,7 +1,6 @@
package com.fr.van.chart.map.designer.type;
import com.fr.base.Parameter;
import com.fr.base.ParameterHolder;
import com.fr.base.Utils;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -599,12 +598,8 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
if (jTemplate == null){
return new String[0];
}
String[] params = new String[0];
if(jTemplate.getTarget() instanceof ParameterHolder){
params = getParamsName(((ParameterHolder)jTemplate.getTarget()).getParameters());
}
return params;
return getParamsName((jTemplate.getJTemplateParameters()));
}
private String[] getParamsName(Parameter[] parameters) {

BIN
designer-chart/src/com/fr/van/chart/map/images/marker-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
designer-chart/src/com/fr/van/chart/map/images/marker-iconx2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

5
designer-realize/src/com/fr/start/Designer.java

@ -7,7 +7,6 @@ import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.file.WebPreviewUtils;
import com.fr.design.actions.file.newReport.NewPolyReportAction;
import com.fr.design.actions.file.newReport.NewWorkBookAction;
import com.fr.design.actions.file.newReport.NewWorkBookXAction;
import com.fr.design.actions.server.ServerConfigManagerAction;
import com.fr.design.actions.server.StyleListAction;
import com.fr.design.actions.server.WidgetManagerAction;
@ -35,7 +34,6 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils;
@ -205,6 +203,9 @@ public class Designer extends BaseDesigner {
if (ActionFactory.getChartPreStyleAction() != null) {
menuDef.addShortCut(ActionFactory.getChartPreStyleAction());
}
if (ActionFactory.getChartEmptyDataStyleAction() != null) {
menuDef.addShortCut(ActionFactory.getChartEmptyDataStyleAction());
}
if (ActionFactory.getChartMapEditorAction() != null) {
menuDef.addShortCut(ActionFactory.getChartMapEditorAction());
}

2
designer-realize/src/com/fr/start/module/DesignerWorkspaceProvider.java

@ -14,6 +14,8 @@ public class DesignerWorkspaceProvider extends Activator {
@Override
public void start() {
//检查环境
DesignerEnvManager.checkNameEnvMap();
String[] args = getModule().upFindSingleton(StartupArgs.class).get();
if (args != null) {

1
designer-realize/src/com/fr/start/module/PreStartActivator.java

@ -65,7 +65,6 @@ public class PreStartActivator extends Activator {
private void initLanguage() {
//这两句的位置不能随便调换,因为会影响语言切换的问题
FRContext.setLanguage(DesignerEnvManager.getEnvManager(false).getLanguage());
DesignerEnvManager.checkNameEnvMap();
}
@Override

Loading…
Cancel
Save