Browse Source

Merge pull request #1201 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit '72662152d4344d1a6fa4dc31e67b3e1ea48f0826':
  无JIRA任务,合并冲突
master
superman 7 years ago
parent
commit
9d4f8dbb97
  1. 2
      build.performance.gradle
  2. 1
      designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java
  3. 100
      designer/src/com/fr/design/report/ReportBackgroundPane.java
  4. 2
      designer/src/com/fr/design/report/ReportExportAttrPane.java
  5. 101
      designer/src/com/fr/design/report/VerifierListPane.java
  6. 2
      designer/src/com/fr/design/webattr/WriteWebSettingPane.java
  7. 2
      designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java
  8. 3
      designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java
  9. 8
      designer/src/com/fr/design/write/submit/SubmitVisitorListPane.java
  10. 7
      designer/src/com/fr/grid/IntelliElements.java
  11. 5
      designer/src/com/fr/start/Designer.java
  12. 7
      designer_base/src/com/fr/design/data/DesignTableDataManager.java
  13. 5
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  14. 12
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java
  15. 27
      designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java
  16. 17
      designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java
  17. 3
      designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java
  18. 5
      designer_base/src/com/fr/design/gui/ilable/UILabel.java
  19. 5
      designer_base/src/com/fr/design/locale/designer.properties
  20. 5
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  21. 49
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  22. 7
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  23. 5
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  24. 5
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  25. 6
      designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogImpl.java
  26. 3
      designer_base/src/com/fr/design/mainframe/loghandler/LogDetailPane.java
  27. 4
      designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java
  28. 10
      designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  29. 17
      designer_base/src/com/fr/start/StartServer.java
  30. 45
      designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java
  31. 29
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java
  32. 2
      designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java
  33. 61
      designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java
  34. 56
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  35. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  36. 47
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  37. 347
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  38. 13
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  39. 2
      designer_form/src/com/fr/design/designer/creator/XCheckBoxGroup.java
  40. 4
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  41. 2
      designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java
  42. 2
      designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java
  43. 9
      designer_form/src/com/fr/design/mainframe/JForm.java

2
build.performance.gradle

@ -14,7 +14,7 @@ task appletJar<<{
fileset(dir:"${basicDir}/core/build/classes/main")
fileset(dir:"${basicDir}/chart/build/classes/main")
fileset(dir:"${basicDir}/report/build/classes/main")
fileset(dir:"${basicDir}/platform/build/classes/main")
fileset(dir:"${basicDir}/platform/build/classes/main")
}
unjar(src:"${libDir}/3rd.jar",dest:"./tmp")
unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp")

1
designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java

@ -238,7 +238,6 @@ public class AuthorityToolBarPane<T extends WebContent> extends BasicBeanPane<Re
dealWithWebContent(webAttr.getWebView(), widget, isSelected, selectedRole);
}
}
}
private void dealWithWebContent(WebContent wc, Widget widget, boolean isSelected, String selectedRole) {

100
designer/src/com/fr/design/report/ReportBackgroundPane.java

@ -1,55 +1,47 @@
package com.fr.design.report;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import com.fr.page.ReportSettingsProvider;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.design.style.background.BackgroundPane;
public class ReportBackgroundPane extends BasicPane {
private UICheckBox isPrintBackgroundCheckBox;
private UICheckBox isExportBackgroundCheckBox;
private BackgroundPane backgroundPane;
public ReportBackgroundPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
backgroundPane = new BackgroundPane();
this.add(backgroundPane, BorderLayout.CENTER);
isPrintBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Print_Background"));
isExportBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Export_Background"));
JPanel sourth = new JPanel();
sourth.add(isExportBackgroundCheckBox);
sourth.add(isPrintBackgroundCheckBox);
this.add(sourth, BorderLayout.SOUTH);
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText(new String[]{"paper", "Background"});
}
/**
* Populate
*/
public void populate(ReportSettingsProvider reportSettings) {
this.backgroundPane.populate(reportSettings.getBackground());
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground());
this.isExportBackgroundCheckBox.setSelected(reportSettings.isExportBackground());
}
/**
* update
*/
public void update(ReportSettingsProvider reportSettings) {
reportSettings.setBackground(this.backgroundPane.update());
reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected());
reportSettings.setExportBackground(this.isExportBackgroundCheckBox.isSelected());
}
package com.fr.design.report;
import java.awt.BorderLayout;
import com.fr.page.ReportSettingsProvider;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.design.style.background.BackgroundPane;
public class ReportBackgroundPane extends BasicPane {
private UICheckBox isPrintBackgroundCheckBox;
private BackgroundPane backgroundPane;
public ReportBackgroundPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
backgroundPane = new BackgroundPane();
this.add(backgroundPane, BorderLayout.CENTER);
isPrintBackgroundCheckBox = new UICheckBox(
Inter.getLocText("ReportGUI-Print_Background"));
this.add(isPrintBackgroundCheckBox, BorderLayout.SOUTH);
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText(new String[]{"paper", "Background"});
}
/**
* Populate
*/
public void populate(ReportSettingsProvider reportSettings) {
this.backgroundPane.populate(reportSettings.getBackground());
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground());
}
/**
* update
*/
public void update(ReportSettingsProvider reportSettings) {
reportSettings.setBackground(this.backgroundPane.update());
reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected());
}
}

2
designer/src/com/fr/design/report/ReportExportAttrPane.java

@ -31,7 +31,7 @@ public class ReportExportAttrPane extends BasicPane {
wordExportPane = new WordExportPane();
uiTabbedPane.addTab("Word", wordExportPane);
Set<ExportAttrTabProvider> providers = ExtraDesignClassManager.getInstance().getArray(ExportAttrTabProvider.XML_TAG);
paneList = new ArrayList<AbstractExportPane>();
paneList = new ArrayList<>();
for (ExportAttrTabProvider provider : providers) {
uiTabbedPane.addTab(provider.title(), provider.toSwingComponent());
paneList.add(provider.toExportPane());

101
designer/src/com/fr/design/report/VerifierListPane.java

@ -1,100 +1 @@
package com.fr.design.report;
import com.fr.data.Verifier;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.VerifyDefineProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ObjectJControlPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.report.write.ReportWriteAttr;
import com.fr.report.write.ValueVerifier;
import com.fr.report.write.WClassVerifier;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import java.util.ArrayList;
import java.util.Set;
/**
* 校验列表
*/
public class VerifierListPane extends ObjectJControlPane {
public VerifierListPane(ElementCasePane ePane) {
super(ePane);
}
/**
* 创建选项
*
* @return 选项
*/
public NameableCreator[] createNameableCreators() {
NameableCreator[] creators = new NameableCreator[]{
new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}),
"/com/fr/web/images/reportlet.png",
ValueVerifier.class,
BuildInVerifierPane.class)
};
Set<VerifyDefineProvider> set = ExtraDesignClassManager.getInstance().getArray(VerifyDefineProvider.MARK_STRING);
for (VerifyDefineProvider provider : set) {
creators = ArrayUtils.add(creators, new NameObjectCreator(
provider.nameForVerifier(),
provider.iconPath(),
provider.classForVerifier(),
provider.appearanceForVerifier()
) {
});
}
creators = ArrayUtils.add(creators, new NameObjectCreator(
Inter.getLocText(new String[]{"Custom", "Verify"}),
"/com/fr/web/images/reportlet.png",
WClassVerifier.class,
CustomVerifierPane.class));
return creators;
}
@Override
protected String title4PopupWindow() {
return "Verify Collections";
}
public void populate(ReportWriteAttr reportWriteAttr) {
if (reportWriteAttr == null) {
return;
}
java.util.List<NameObject> nameObjectList = new ArrayList<NameObject>();
int verifierCount = reportWriteAttr.getVerifierCount();
for (int i = 0; i < verifierCount; i++) {
Verifier verifier = reportWriteAttr.getVerifier(i);
nameObjectList.add(new NameObject(verifier.getName(), verifier));
}
this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()]));
}
public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) {
// Nameable[]居然不能强转成NameObject[],一定要这么写...
Nameable[] res = this.update();
NameObject[] res_array = new NameObject[res.length];
java.util.Arrays.asList(res).toArray(res_array);
reportWriteAttr.clearVerifiers();
for (int i = 0; i < res_array.length; i++) {
NameObject nameObject = res_array[i];
if (nameObject.getObject() instanceof Verifier) {
Verifier verifier = (Verifier) nameObject.getObject();
verifier.setName(nameObject.getName());
reportWriteAttr.addVerifier(verifier);
}
}
}
}
package com.fr.design.report; import com.fr.data.Verifier; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.VerifyDefineProvider; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.ObjectJControlPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.general.Inter; import com.fr.general.NameObject; import com.fr.report.write.ReportWriteAttr; import com.fr.report.write.ValueVerifier; import com.fr.report.write.WClassVerifier; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import java.util.ArrayList; import java.util.Set; /** * 校验列表 */ public class VerifierListPane extends ObjectJControlPane { public VerifierListPane(ElementCasePane ePane) { super(ePane); } /** * 创建选项 * * @return 选项 */ public NameableCreator[] createNameableCreators() { NameableCreator[] creators = new NameableCreator[]{ new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}), "/com/fr/web/images/reportlet.png", ValueVerifier.class, BuildInVerifierPane.class) }; Set<VerifyDefineProvider> set = ExtraDesignClassManager.getInstance().getArray(VerifyDefineProvider.MARK_STRING); for (VerifyDefineProvider provider : set) { creators = ArrayUtils.add(creators, new NameObjectCreator( provider.nameForVerifier(), provider.iconPath(), provider.classForVerifier(), provider.appearanceForVerifier() ) { }); } creators = ArrayUtils.add(creators, new NameObjectCreator( Inter.getLocText(new String[]{"Custom", "Verify"}), "/com/fr/web/images/reportlet.png", WClassVerifier.class, CustomVerifierPane.class)); return creators; } @Override protected String title4PopupWindow() { return "Verify Collections"; } public void populate(ReportWriteAttr reportWriteAttr) { if (reportWriteAttr == null) { return; } java.util.List<NameObject> nameObjectList = new ArrayList<>(); int verifierCount = reportWriteAttr.getVerifierCount(); for (int i = 0; i < verifierCount; i++) { Verifier verifier = reportWriteAttr.getVerifier(i); nameObjectList.add(new NameObject(verifier.getName(), verifier)); } this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); } public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) { // Nameable[]居然不能强转成NameObject[],一定要这么写... Nameable[] res = this.update(); NameObject[] res_array = new NameObject[res.length]; java.util.Arrays.asList(res).toArray(res_array); reportWriteAttr.clearVerifiers(); for (int i = 0; i < res_array.length; i++) { NameObject nameObject = res_array[i]; if (nameObject.getObject() instanceof Verifier) { Verifier verifier = (Verifier) nameObject.getObject(); verifier.setName(nameObject.getName()); reportWriteAttr.addVerifier(verifier); } } } }

2
designer/src/com/fr/design/webattr/WriteWebSettingPane.java

@ -56,7 +56,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
//sheet标签页显示位置
topRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Top"));
bottomRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Bottom"));
sheetShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Sheet_Label_Page_Display_Position"), UILabel.LEFT);
sheetShowLocationLabel = new UILabel("sheet" + Inter.getLocText(new String[]{"Label", "Page_Number", "Display position"}) + ":", UILabel.LEFT);
ButtonGroup buttonGroup = new ButtonGroup();
bottomRadioButton.setSelected(true);
buttonGroup.add(topRadioButton);

2
designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java

@ -36,7 +36,7 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
@Override
protected JPanel setFirstContentPane() {
JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
checkbox = new UICheckBox(Inter.getLocText(new String[]{"Provide", "Choose_All"}));
checkbox = new UICheckBox(Inter.getLocText("FR-Designer_Advanced"));
checkbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
buttonGroupDictPane = new ButtonGroupDictPane();
checkBoxDictPane = new CheckBoxDictPane();

3
designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java

@ -74,7 +74,6 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
return content;
}
public JPanel setValidatePane() {
initListeners();
@ -101,7 +100,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
this.setMinValueCheckBox.addActionListener(setMinListener);
this.minValueSpinner.addChangeListener(minValueChangeListener);
UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"}));
UILabel numberLabel = new UILabel(Inter.getLocText("FR-Designer_Decimal_Places"));
limitNumberPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{numberLabel, decimalLength}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;

8
designer/src/com/fr/design/write/submit/SubmitVisitorListPane.java

@ -68,7 +68,7 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
return;
}
List<NameObject> nameObjectList = new ArrayList<NameObject>();
List<NameObject> nameObjectList = new ArrayList<>();
int submiterCount = reportWriteAttr.getSubmitVisitorCount();
for (int i = 0; i < submiterCount; i++) {
@ -169,8 +169,8 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
public CustomPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
customCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
customSubmitPanes = new HashMap<String, BasicBeanPane>();
comboItemsMap = new HashMap<String, String>();
customSubmitPanes = new HashMap<>();
comboItemsMap = new HashMap<>();
Set<SubmitProvider> providers = ExtraDesignClassManager.getInstance().getArray(SubmitProvider.MARK_STRING);
addSubmitPane(new DefaultSubmit());
@ -178,7 +178,7 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
addSubmitPane(provider);
}
configTypes = new ArrayList<String>();
configTypes = new ArrayList<>();
for (Map.Entry<String, BasicBeanPane> entry : customSubmitPanes.entrySet()) {
String key = entry.getKey();
configTypes.add(comboItemsMap.get(key));

7
designer/src/com/fr/grid/IntelliElements.java

@ -194,12 +194,7 @@ public class IntelliElements {
TemplateCellElement newCellElement = new DefaultTemplateCellElement(colIndex, rowIndex);
applyStyle(newCellElement, sourceCellElement);//style
if (sourceCellElement.getValue() instanceof DSColumn) {
DSColumn dsColumn = null;
try {
dsColumn = (DSColumn) ((DSColumn) sourceCellElement.getValue()).clone();
} catch (CloneNotSupportedException e) {
FRContext.getLogger().error(e.getMessage(), e);
}
DSColumn dsColumn = (DSColumn) sourceCellElement.getValue();
newCellElement.setValue(dsColumn);
newCellElement.setCellExpandAttr(sourceCellElement.getCellExpandAttr());
} else if (sourceCellElement.getValue() instanceof Number) {

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

@ -1,7 +1,6 @@
package com.fr.start;
import com.fr.base.BaseUtils;
import com.fr.base.Env;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.core.ActionFactory;
@ -37,6 +36,7 @@ import com.fr.general.Inter;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.web.ServletContext;
import com.fr.stable.xml.XMLTools;
import javax.swing.*;
@ -450,8 +450,7 @@ public class Designer extends BaseDesigner {
InformationCollector collector = InformationCollector.getInstance();
collector.collectStopTime();
collector.saveXMLFile();
Env currentEnv = FRContext.getCurrentEnv();
currentEnv.doWhenServerShutDown();
ServletContext.fireServletStopListener();
}
}

7
designer_base/src/com/fr/design/data/DesignTableDataManager.java

@ -36,7 +36,6 @@ import java.io.ByteArrayOutputStream;
import java.text.Collator;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
/**
* 设计器管理操作数据集的类:
@ -55,11 +54,11 @@ public abstract class DesignTableDataManager {
* 其实globalDsCache没有绝对的必要只是为了操作方便如果没有它那么每次清空服务器数据集或者存储过程的时候还要去遍历找一下
* 这个操作可能比较复杂 从减少代码复杂度的角度看还是很有必要的
*/
private static java.util.Map<String, TableDataWrapper> globalDsCache = new ConcurrentHashMap<String, TableDataWrapper>();
private static java.util.Map<String, String> dsNameChangedMap = new ConcurrentHashMap<String, String>();
private static java.util.Map<String, TableDataWrapper> globalDsCache = new java.util.HashMap<String, TableDataWrapper>();
private static java.util.Map<String, String> dsNameChangedMap = new HashMap<String, String>();
// private static List<ChangeListener> dsListeners = new ArrayList<ChangeListener>();
private static Map<String, List<ChangeListener>> dsListenersMap = new ConcurrentHashMap<String, List<ChangeListener>>();;
private static Map<String, List<ChangeListener>> dsListenersMap = new HashMap<String, List<ChangeListener>>();
public static String NO_PARAMETER = "no_paramater_pane";

5
designer_base/src/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -18,7 +18,6 @@ import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import javax.swing.*;
@ -161,10 +160,6 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
@Override
public void populateBean(ClassTableData ob) {
if(StringUtils.isEmpty(ob.getClassName())) {
return;
}
this.editorPane.populate(ob.getParameters(Calculator.createCalculator()));
this.classNameTextField.setText(ob.getClassName());
}

12
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -36,12 +36,8 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override
public void itemStateChanged(ItemEvent e) {
TableDataWrapper tableDataWrapper = tableDataComboBox.getSelectedItem();
if (tableDataWrapper == null) {
return;
}
//这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。
List<String> nameList = tableDataWrapper.calculateColumnNameList();
List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList();
columnNames = new String[nameList.size()];
columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames);
columnNameComboBox.removeAllItems();
@ -68,7 +64,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
dsColumn.setDsName(tableDataWrappe.getTableDataName());
TableDataColumn column;
String columnExp = (String) this.columnNameComboBox.getSelectedItem();
if (StringUtils.isNotBlank(columnExp) && checkColumnExp(columnExp)) {
if (StringUtils.isNotBlank(columnExp) && (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#")) {
String number = columnExp.substring(1);
Pattern pattern = Pattern.compile("[^\\d]");
if (pattern.matcher(number).find()) {
@ -84,10 +80,6 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
return dsColumn;
}
private boolean checkColumnExp (String columnExp) {
return (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#");
}
public String getIconName() {
return "ds_column";
}

27
designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java

@ -4,7 +4,6 @@ import com.fr.base.BaseUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject;
import com.fr.js.JavaScript;
import javax.swing.*;
@ -15,7 +14,7 @@ public abstract class AbstractNameableCreator implements NameableCreator {
protected Class clazzOfObject;
protected Class clazzOfInitCase;
protected Class<? extends BasicBeanPane> clazzOfEditor;
public AbstractNameableCreator(String menuName, Class clazz, Class<? extends BasicBeanPane> clazzOfEditor) {
this.menuName = menuName;
this.clazzOfObject = clazz;
@ -29,7 +28,7 @@ public abstract class AbstractNameableCreator implements NameableCreator {
this.clazzOfObject = clazz;
this.clazzOfInitCase = clazz;
}
public AbstractNameableCreator(String menuName, String iconPath, Class clazz, Class<? extends BasicBeanPane> clazzOfEditor) {
this.menuName = menuName;
this.menuIcon = BaseUtils.readIcon(iconPath);
@ -37,7 +36,7 @@ public abstract class AbstractNameableCreator implements NameableCreator {
this.clazzOfEditor = clazzOfEditor;
this.clazzOfInitCase = clazz;
}
public AbstractNameableCreator(String menuName, String iconPath, Class clazz, Class clazz4Init, Class<? extends BasicBeanPane> clazzOfEditor) {
this.menuName = menuName;
this.menuIcon = BaseUtils.readIcon(iconPath);
@ -51,7 +50,7 @@ public abstract class AbstractNameableCreator implements NameableCreator {
* get menuName
* @return
*/
public String menuName() {
public String menuName() {
return this.menuName;
}
@ -71,14 +70,6 @@ public abstract class AbstractNameableCreator implements NameableCreator {
return this.clazzOfEditor;
}
/**
* get clazzOfObject
* @return clazzOfObject
*/
public Class <? extends JavaScript> getHyperlink() {
return this.clazzOfObject;
}
/**
*
* @param ob
@ -92,12 +83,12 @@ public abstract class AbstractNameableCreator implements NameableCreator {
doSthChanged4Icon(ob);
return ob;
}
return null;
}
protected void doSthChanged4Icon(Object ob){
}
/**
@ -108,9 +99,9 @@ public abstract class AbstractNameableCreator implements NameableCreator {
return null;
}
public boolean isNeedParameterWhenPopulateJControlPane(){
return false;
}
public boolean isNeedParameterWhenPopulateJControlPane(){
return false;
}
public boolean equals(Object obj) {
return obj instanceof AbstractNameableCreator

17
designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java

@ -2,27 +2,24 @@ package com.fr.design.gui.controlpane;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.js.JavaScript;
import com.fr.stable.Nameable;
import javax.swing.*;
public interface NameableCreator {
public String menuName();
public Icon menuIcon();
public String createTooltip();
public Nameable createNameable(UnrepeatedNameHelper helper);
public Class<? extends BasicBeanPane> getUpdatePane();
public Class <? extends JavaScript> getHyperlink();
public Object acceptObject2Populate(Object ob);
public void saveUpdatedBean(ListModelElement wrapper, Object bean);
public boolean isNeedParameterWhenPopulateJControlPane();
public boolean isNeedParameterWhenPopulateJControlPane();
}

3
designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java

@ -237,8 +237,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
public Dimension getPreferredSize() {
Dimension dimension = new Dimension();
dimension.height = super.getPreferredSize().height;
// 不能写死,否则出现国际化显示不全的问题
dimension.width = Math.max(addButton.getWidth() - 2, super.getPreferredSize().width);
dimension.width = addButton.getWidth() - 2;
return dimension;
}
};

5
designer_base/src/com/fr/design/gui/ilable/UILabel.java

@ -29,11 +29,6 @@ public class UILabel extends JLabel {
super(text);
}
public UILabel(String text, boolean enable) {
super(text);
this.setEnabled(enable);
}
public UILabel(Icon image, int horizontalAlignment) {
super(image, horizontalAlignment);
}

5
designer_base/src/com/fr/design/locale/designer.properties

@ -2141,3 +2141,8 @@ FR-Designer_Cell_Visible=
FR-Designer_Show=
FR-Designer_Float_Visible=
FR-Designer_Cell_Value=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

5
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2141,3 +2141,8 @@ FR-Designer_Float_Visible=
FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Widget_Enabled=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

49
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -229,16 +229,16 @@ FR-Designer-Collect_Information_free=\u7121\u6599
FR-Designer-Collect_Information_Description=\u8A18\u8FF0
FR-Designer-Collect_Information_Successfully=\u53CE\u96C6\u6210\u529F
FR-Designer_Event_Set=\u30A4\u30D9\u30F3\u30C8\u8A2D\u5B9A
FR-Designer_Blow_set=\u4EE5\u4E0B\u8A2D\u5B9A
FR-Designer_I_Want_To_Set_Single=\u5F53\u8A72\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u5358\u72EC\u8A2D\u5B9A
FR-Designer_Using_Server_Report_View_Settings=\u30B5\u30FC\u30D0\u30FC\u8A2D\u5B9A\u63A1\u7528
FR-Designer_ErrorHandlerTemplate=\u51FA\u9519\u6A21\u677F\u5B9A\u4E49
FR-Designer_Save_Path=\u4FDD\u5B58\u8DEF\u5F84
FR-Designer_Chart_Acc_Set=\u7CBE\u78BA\u8A2D\u5B9A
FR-Designer_Gradient-Color=\u8272\u3092\u5F90\u3005\u306B\u5909\u5316
FR-Designer_DEFAULT=\u30C7\u30D5\u30A9\u30EB\u30C8
FR-Designer_chart-PreStyle=\u30C1\u30E3\u30FC\u30C8\u306E\u5B9A\u7FA9\u3055\u308C\u305F\u30AB\u30E9\u30FC
FR-Designer_Chart-PreStyle=\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30AB\u30E9\u30FC\u30C1\u30E3\u30FC\u30C8
FR-Designer_Blow_set=\u6B21\u306E\u8A2D\u5B9A
FR-Designer_I_Want_To_Set_Single=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u500B\u5225\u8A2D\u5B9A
FR-Designer_Using_Server_Report_View_Settings=\u30B5\u30FC\u30D0\u8A2D\u5B9A
FR-Designer_ErrorHandlerTemplate=\u30A8\u30E9\u30FC\u60C5\u5831\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u5B9A\u7FA9
FR-Designer_Save_Path=\u4FDD\u5B58\u30D1\u30B9
FR-Designer_Chart_Acc_Set=\u500B\u5225\u8A2D\u5B9A
FR-Designer_Gradient-Color=\u30B0\u30E9\u30C7\u30FC\u30B7\u30E7\u30F3
FR-Designer_DEFAULT=\u65E2\u5B9A
FR-Designer_chart-PreStyle=\u30B0\u30E9\u30D5\u4E8B\u524D\u5B9A\u7FA9\u914D\u8272
FR-Designer_Chart-PreStyle=\u30B0\u30E9\u30D5\u4E8B\u524D\u5B9A\u7FA9\u914D\u8272
FR-Designer_Already_exist=\u73FE\u5728\u306E\u74B0\u5883\u306B\u306F\u5B58\u5728\u3057\u3066\u3044\u307E\u3059\:
FR-Designer_Database=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9
FR-Designer_Model=\u30E2\u30C7\u30EB
@ -507,8 +507,8 @@ FR-Designer_Edit_panel=\u7DE8\u96C6
FR-Designer_Property_panel=\u5C5E\u6027
FR-Designer_Select_panel=\u9078\u629E
FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\u5831\u544A\u30AB\u30EC\u30F3\u30C8\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A
FR-Designer_Unload_Check=\u63D0\u51FA\u305B\u305A\u306B\u30D2\u30F3\u30C8
FR-Designer_Set_BG_Of_Current_Row=\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A
FR-Designer_Unload_Check=\u672A\u30B3\u30DF\u30C3\u30C8\u30D2\u30F3\u30C8
FR-Designer_ReportColumns_Columns_Optional=\u6BB5\u7D44\u307F
FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u4E2D\u592E\u63C3\u3048\u8868\u793A
@ -1337,14 +1337,16 @@ Utils-File_name=\u30D5\u30A1\u30A4\u30EB\u540D
NOT_NULL_Des=\u3053\u3053\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093
Right_Border_Line=\u53F3\u30D5\u30EC\u30FC\u30E0\u30E9\u30A4\u30F3
EditRC-Entire_column=\u5217(C)
PageSetup-Top_to_bottom=\u4E0A\u304B\u3089\u4E0B\u3078
Click-Get_Default_URL=\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30C7\u30D5\u30A9\u30EB\u30C8\u306EURL\u3092\u53D6\u5F97
StyleAlignment-Wrap_Text=\u81EA\u52D5\u6298\u308A\u8FD4\u3057
Remove_All_Button=\u5168\u3066\u306E\u30DC\u30BF\u30F3\u3092\u30AF\u30EA\u30A2
FR-Designer_Component_Interval=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u9593\u9694
ReportColumns-Columns_vertically=\u5782\u76F4\u65B9\u5411\u5217
ReportGUI-Print_Background=\u5370\u5237\u80CC\u666F
Export-CSV=CSV (\u30AB\u30F3\u30DE\u533A\u5207\u308A)
PageSetup-Top_to_bottom=\u5DE6\u304B\u3089\u53F3
Click-Get_Default_URL=\u3053\u306E\u30DC\u30BF\u30F3\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u65E2\u5B9A\u306EURL\u3092\u53D6\u5F97
StyleAlignment-Wrap_Text=\u81EA\u52D5\u6539\u884C
Remove_All_Button=\u3059\u3079\u3066\u306E\u30DC\u30BF\u30F3\u3092\u30AF\u30EA\u30A2
FR-Designer_Component_Interval=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u9593\u9694
ReportColumns-Columns_vertically=\u5217\u306E\u6BB5\u7D44\u307F
ReportGUI-Print_Background=\u5E33\u7968\u80CC\u666F\u306E\u5370\u5237/\u51FA\u529B
FR-Designer_Print_Background=\u5E33\u7968\u80CC\u666F\u306E\u5370\u5237
FR-Designer_Export_Background=\u5E33\u7968\u80CC\u666F\u306E\u51FA\u529B
Export-CSV=CSV(\u30AB\u30F3\u30DE\u533A\u5207\u308A)
M_Edit-Paste=\u8CBC\u308A\u4ED8\u3051(P)
FR-Designer-Basic_Restart_Designer=\u30C7\u30B6\u30A4\u30CA\u30FC\u3092\u518D\u8D77\u52D5\u3059\u308B
ReportServerP-PDF2-INFO=LINUX/UNIX\u306B\u4E2D\u56FD\u8A9E\u30D5\u30A9\u30F3\u30C8\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u6642\u306E\u307F\u4F7F\u7528
@ -1369,7 +1371,7 @@ Not_Exsit=\u5E33\u7968\u306B\u5B58\u5728\u3057\u307E\u305B\u3093
Utils-Insert_Row=\u884C\u633F\u5165
Utils-Delete_Row=\u884C\u524A\u9664
not_support_authority_edit=\u8BE5\u5143\u7D20\u4E0D\u652F\u6301\u6743\u9650\u63A7\u5236
Formula_Tips=\u5F0F\u306F "\
Formula_Tips=\u5F0F\u306F "
FR-Action_Copy=\u30B3\u30D4\u30FC
Compile_Success=\u7DE8\u96C6\u7FFB\u8A33\u306B\u6210\u529F\u3057\u307E\u3057\u305F
BackgroundTexture-RecycledPaper=\u518D\u751F\u7D19
@ -2001,7 +2003,6 @@ FR-Product_Demo=\u88FD\u54C1\u30C7\u30E2
FR-Designer_Data_Filter=\u30C7\u30FC\u30BF\u30D5\u30A3\u30EB\u30BF
FR-Designer_Can_not_use_FormatBursh=\u9023\u7D9A\u3057\u306A\u3044\u8907\u6570\u9818\u57DF\u3067\u306F\u66F8\u5F0F\u30B3\u30D4\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
Default=\u65E2\u5B9A
FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9
FR-Designer_Cell_Element=\u30BB\u30EB\u8981\u7D20
FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027
FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20
@ -2141,3 +2142,7 @@ FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Add_Event=
FR-Designer_Widget_Enabled=
FR-Designer_Sheet_Label_Page_Display_Position=Sheet\u30E9\u30D9\u30EB\u30DA\u30FC\u30B8\u306E\u8868\u793A\u4F4D\u7F6E
FR-Designer_Provide_Choose_All=\u5168\u9078\u629E\u53EF\u80FD
FR-Designer_Decimal_Places=\u5C0F\u6570\u67A0\u6570:
FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9

7
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -2002,7 +2002,6 @@ FR-Designer_Build_Tree_Accord_Parent_Marked_Filed=\uC120\uD0DD\uD55C\uB370\uC774
FR-Product_Demo=\uC81C\uD488\uC2DC\uC5F0
FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4
Default=\uAE30\uBCF8
FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C
FR-Designer_Cell_Element=\uC140\uC694\uC18C
FR-Designer_Cell_Attributes=\uC140\uC18D\uC131
FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C
@ -2141,3 +2140,9 @@ FR-Designer_Float_Visible=
FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Widget_Enabled=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=\uC81C\uACF5\uBAA8\uB450\uC120\uD0DD
FR-Designer_Decimal_Places=\uC18C\uC218\uC218\uB7C9:
FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C
FR-Designer_Export_Background=
FR-Designer_Print_Background=

5
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2141,3 +2141,8 @@ FR-Designer_Widgetname=\u63A7\u4EF6\u540D
FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20
FR-Designer-Plugin_Has_Been_Actived=
FR-Designer-Plugin_Has_Been_Disabled=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

5
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2141,3 +2141,8 @@ FR-Designer_Float_Visible=
FR-Designer_Widget_String=
FR-Designer_Widget_Field=
FR-Designer_Widget_Enabled=
FR-Designer_Export_Background=
FR-Designer_Print_Background=
FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places=

6
designer_base/src/com/fr/design/mainframe/loghandler/DesignerLogImpl.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.loghandler;
import com.fr.stable.fun.impl.AbstractLogProvider;
import com.fr.stable.web.SessionProvider;
import com.fr.stable.xml.LogRecordTimeProvider;
import java.util.ArrayList;
@ -44,9 +43,4 @@ public class DesignerLogImpl extends AbstractLogProvider{
public void record(LogRecordTimeProvider logRecordTime) {
records.add(logRecordTime);
}
@Override
public void record(LogRecordTimeProvider logRecordTime, SessionProvider sessionProvider) {
}
}

3
designer_base/src/com/fr/design/mainframe/loghandler/LogDetailPane.java

@ -7,7 +7,6 @@ import javax.swing.JPanel;
import com.fr.base.BaseUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
public class LogDetailPane extends JPanel{
public LogDetailPane() {
@ -21,7 +20,7 @@ public class LogDetailPane extends JPanel{
fr.setSize(600, 400);
GUICoreUtils.centerWindow(fr);
fr.setResizable(false);
fr.setTitle(Inter.getLocText("FR-Designer_Log"));
fr.setTitle("日志");
fr.setIconImage(BaseUtils.readImageWithCache("com/fr/design/images/buttonicon/history.png"));
fr.getContentPane().setLayout(new BorderLayout());
fr.getContentPane().add(this, BorderLayout.CENTER);

4
designer_base/src/com/fr/design/mainframe/loghandler/LogHandlerBar.java

@ -77,15 +77,13 @@ public class LogHandlerBar extends JPanel implements ItemSelectable {
public void errorAdd() {
ERRORNUM++;
timerPaint();
}
public void serverAdd() {
SERVERNUM++;
timerPaint();
}
private AtomicBoolean painting = new AtomicBoolean(false);
public void timerPaint() {

10
designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -184,7 +184,7 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
}
private void initbuttonGroup() {
isSupportFS = VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.FS_BI.support();
isSupportFS = supportFineDecision();
Icon[] iconArray = null;
String[] textArray = null;
if (isSupportFS) {
@ -212,6 +212,11 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
buttonGroup.setNeedLeftRightOutLine(false);
}
private boolean supportFineDecision() {
byte[] bytes = FRCoreContext.getBytes();
return VT4FR.isLicAvailable(bytes) && VT4FR.FS_BI.support();
}
private int getMode(){
return isSupportFS?FS_MANAGE: REPORT_PLATEFORM_MANAGE;
}
@ -543,5 +548,4 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
tree.collapsePath(parent);
}
}
}
}

17
designer_base/src/com/fr/start/StartServer.java

@ -154,8 +154,7 @@ public class StartServer {
Desktop.getDesktop().browse(new URI(uri));
} catch (IOException e) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
startBrowserFromCommand(uri, e);
} catch (URISyntaxException e) {
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
} catch (Exception e) {
@ -164,6 +163,20 @@ public class StartServer {
}
}
private static void startBrowserFromCommand(String uri, IOException e) {
if (OperatingSystem.isWindows()) {
try {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
}
} else {
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
}
}
private static class InformationPane extends BasicPane {
private static final long serialVersionUID = 1L;

45
designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java

@ -1,13 +1,34 @@
package com.fr.design.chart.series.PlotSeries;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.GeneralPath;
import java.util.*;
import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import com.fr.base.*;
import com.fr.chart.base.MapSvgAttr;
import com.fr.chart.base.MapSvgXMLHelper;
import com.fr.chart.chartglyph.MapShapeValue;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog;
import com.fr.design.event.ChangeEvent;
import com.fr.design.event.ChangeListener;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -16,23 +37,13 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.UISelectTable;
import com.fr.design.gui.itable.UITableNoOptionUI;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.GeneralPath;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import com.fr.design.utils.gui.GUICoreUtils;
/**
* 地图 图片编辑界面 选中图片 编辑. 支持鼠标选中等事件

29
designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java

@ -96,7 +96,7 @@ public class DataLabelPane extends TooltipContentsPane {
}
delimiterBox.setPreferredSize(new Dimension(70, 20));
JPanel boxPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
boxPane.add(new UILabel(Inter.getLocText("FR-Designer_Dismenber") + ":"));
boxPane.add(new UILabel(Inter.getLocText("Form-Delimiter") + ":"));
boxPane.add(delimiterBox);
return boxPane;
}
@ -111,9 +111,34 @@ public class DataLabelPane extends TooltipContentsPane {
}
protected JPanel createJPanel4Position() {
return null;
// 标签位置:上下左右中.
bottomButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Bottom"));
leftButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Left"));
rigtButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Right"));
topButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Top"));
centerButton = new UIRadioButton(Inter.getLocText("Center"));
ButtonGroup bg = new ButtonGroup();
bg.add(bottomButton);
bg.add(leftButton);
bg.add(rigtButton);
bg.add(topButton);
bg.add(centerButton);
topButton.setSelected(true);
JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":"));
buttonPane.add(bottomButton);
buttonPane.add(leftButton);
buttonPane.add(rigtButton);
buttonPane.add(topButton);
buttonPane.add(centerButton);
return buttonPane;
}
public void populate(AttrContents seriesAttrContents) {
super.populate(seriesAttrContents);
String dataLabel = seriesAttrContents.getSeriesLabel();

2
designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java

@ -30,7 +30,7 @@ public class ChartPropertyPane extends MiddleChartPropertyPane{
return new Dimension(super.getPreferredSize().width, 18);
}
};
nameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 1, 0));
nameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 1, 0));
nameLabel.setHorizontalAlignment(SwingConstants.CENTER);
}

61
designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java

@ -16,7 +16,6 @@ import com.fr.design.gui.itabpane.TitleChangeListener;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.general.Inter;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
@ -31,11 +30,11 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
public MiddleChartPropertyPane() {
initComponenet();
}
protected void initComponenet() {
this.setLayout(new BorderLayout());
this.setBorder(null);
createNameLabel();
this.add(createNorthComponent(), BorderLayout.NORTH);
chartEditPane = StableUtils.construct(ChartEditPane.class);
@ -48,11 +47,11 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
this.createMainPane();
setSureProperty();
}
protected abstract void createNameLabel();
protected abstract JComponent createNorthComponent();
protected abstract void createMainPane();
@ -65,10 +64,10 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
chartEditPane.setContainer(container);
chartEditPane.addTitleChangeListener(titleListener);
String tabname = chartEditPane.getSelectedTabName();
nameLabel.setText(Inter.getLocText("Chart-Property_Table") + (tabname != null ? ('-' + chartEditPane.getSelectedTabName()) : StringUtils.EMPTY));
nameLabel.setText(Inter.getLocText("Chart-Property_Table") + (tabname != null ? ('-' + chartEditPane.getSelectedTabName()) : ""));
resetChartEditPane();
}
protected void resetChartEditPane() {
remove(chartEditPane);
add(chartEditPane, BorderLayout.CENTER);
@ -76,20 +75,20 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
repaint();
revalidate();
}
protected TitleChangeListener titleListener = new TitleChangeListener() {
@Override
public void fireTitleChange(String addName) {
nameLabel.setText(Inter.getLocText("Chart-Property_Table") + '-' + addName);
}
};
/**
* 感觉ChartCollection加载图表属性界面.
* @param collection 收集图表
* @param ePane 面板
*/
/**
* 感觉ChartCollection加载图表属性界面.
* @param collection 收集图表
* @param ePane 面板
*/
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
addChartEditPane(collection.getSelectedChart().getPlot().getPlotID());
setSupportCellData(true);
@ -97,11 +96,11 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
chartEditPane.populate(collection);
}
/**
* 感觉ChartCollection加载图表属性界面.
* @param collection 收集图表
* @param ePane 面板
*/
/**
* 感觉ChartCollection加载图表属性界面.
* @param collection 收集图表
* @param ePane 面板
*/
public void populateChartPropertyPane(BaseChartCollection collection, TargetComponent<?> ePane) {
if (collection instanceof ChartCollection) {
populateChartPropertyPane((ChartCollection)collection, ePane);
@ -128,18 +127,18 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
return BaseUtils.readIcon("/com/fr/design/images/m_report/qb.png");
}
/**
* 预定义定位
* @return 定位
*/
/**
* 预定义定位
* @return 定位
*/
public Location preferredLocation() {
return Location.WEST_BELOW;
}
/**
* 创建标题Panel
* @return 标题panel
*/
/**
* 创建标题Panel
* @return 标题panel
*/
public UITitlePanel createTitlePanel() {
return new UITitlePanel(this);
}
@ -149,14 +148,14 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
*/
public void refreshDockingView() {
// TODO Auto-generated method stub
}
/**
* 设置是否支持单元格数据.
*/
public void setSupportCellData(boolean supportCellData) {
if (chartEditPane != null) {
if(chartEditPane != null) {
chartEditPane.setSupportCellData(supportCellData);
}
}

56
designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

@ -21,7 +21,6 @@ import com.fr.design.mainframe.chart.gui.ChartTypePane;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -31,7 +30,7 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class ChartEditPane extends BasicPane implements AttributeChange, Prepare4DataSourceChange, ChartEditPaneProvider {
public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4DataSourceChange, ChartEditPaneProvider {
private final static int CHANGE_MIN_TIME = 80;
@ -119,7 +118,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("error in clone ChartEditPane");
}
if (ComparatorUtils.equals(selectedPane.title4PopupWindow(), PaneTitleConstants.CHART_STYLE_TITLE)) {
if(ComparatorUtils.equals(selectedPane.title4PopupWindow(),PaneTitleConstants.CHART_STYLE_TITLE)){
dealWithStyleChange();
}
@ -130,11 +129,10 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
/**
* 重新构造面板
*
* @param currentChart 图表
*/
public void reLayout(Chart currentChart) {
if (currentChart != null) {
public void reLayout(Chart currentChart){
if(currentChart != null){
int chartIndex = getSelectedChartIndex(currentChart);
this.removeAll();
this.setLayout(new BorderLayout());
@ -142,22 +140,22 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
addTypePane();
boolean isDefault = true;
String plotID = StringUtils.EMPTY;
if (currentChart.getPlot() != null) {
String plotID = "";
if(currentChart.getPlot() != null){
plotID = currentChart.getPlot().getPlotID();
isDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID);
}
if (isDefault) {
if(isDefault){
paneList.add(dataPane4SupportCell);
paneList.add(stylePane);
paneList.add(otherPane);
this.isDefaultPane = true;
} else {
}else{
ChartDataPane chartDataPane = createChartDataPane(plotID);
paneList.add(chartDataPane);
AbstractChartAttrPane[] otherPaneList = ChartTypeInterfaceManager.getInstance().getAttrPaneArray(plotID, listener);
for (int i = 0; i < otherPaneList.length; i++) {
for(int i = 0; i < otherPaneList.length; i++){
otherPaneList[i].addAttributeChangeListener(listener);
paneList.add(otherPaneList[i]);
}
@ -179,7 +177,6 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
}
protected void setSelectedTab() {
//doNothing
}
/**
@ -225,7 +222,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
return;
}
if (isNeedsReLayout(collection.getSelectedChart())) {
if(checkNeedsReLayout(collection.getSelectedChart())){
reLayout(collection.getSelectedChart());
}
@ -252,12 +249,12 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
}
}
public int getSelectedChartIndex(Chart chart) {
public int getSelectedChartIndex(Chart chart){
int index = 0;
if (typePane != null) {
if(typePane != null){
FurtherBasicBeanPane[] paneList = typePane.getPaneList();
for (; index < paneList.length; index++) {
if (paneList[index].accept(chart)) {
for(; index < paneList.length; index++){
if(paneList[index].accept(chart)){
return index;
}
}
@ -266,12 +263,12 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
}
//populate的时候看看要不要重构面板
private boolean isNeedsReLayout(Chart chart) {
if (chart != null) {
private boolean checkNeedsReLayout(Chart chart){
if(chart != null){
int lastIndex = typePane.getSelectedIndex();
int currentIndex = getSelectedChartIndex(chart);
boolean currentPane = true;
if (chart.getPlot() != null) {
if(chart.getPlot() != null){
String plotID = chart.getPlot().getPlotID();
currentPane = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID);
}
@ -282,10 +279,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
/**
* 当前界面是否是默认的界面
*
* @return 是否是默认的界面
*/
public boolean isDefaultPane() {
public boolean isDefaultPane(){
return this.isDefaultPane;
}
@ -317,17 +313,16 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
}
}
protected void dealWithStyleChange() {
//doNothing
protected void dealWithStyleChange(){
}
/**
* 主要用于图表设计器判断样式改变是否来自工具栏的全局样式按钮
*
*主要用于图表设计器判断样式改变是否来自工具栏的全局样式按钮
* @param isFromToolBar 是否来自工具栏
*/
public void styleChange(boolean isFromToolBar) {
//doNothing
public void styleChange(boolean isFromToolBar){
}
/**
@ -346,10 +341,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
DesignTableDataManager.addDsChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex());
//不显示,没有处于编辑状态,没必要更新。
if (attrPane.isShowing()) {
attrPane.refreshChartDataPane(collection);
}
attrPane.refreshChartDataPane(collection);
}
});
}

4
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -17,7 +17,6 @@ import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.item.FlexibleComboBox;
import com.fr.design.mainframe.chart.gui.item.ItemEventType;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils;
@ -239,9 +238,6 @@ public class ChartTypePane extends AbstractChartAttrPane{
for (int i = 0; i < this.cards.size(); i++) {
FurtherBasicBeanPane pane = cards.get(i);
if (pane.accept(ob)) {
GUICoreUtils.setEnabled(chartTypeComBox.getUIComboBox(), ob.isValidPlot());
pane.populateBean(ob);
Object item = pane.title4PopupWindow();
for (int j = 0; j < cardNames.length; j++) {

47
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java

@ -4,7 +4,6 @@ import com.fr.base.BaseUtils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -42,11 +41,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
private UIButton addButton;
private UIObserverListener uiobListener = null;
public List<UIComboBox> getBoxList() {
return boxList;
}
public CategoryPlotMoreCateTableDataContentPane() {
// do nothing
}
@ -94,8 +89,8 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
public void itemStateChanged(ItemEvent e) {
checkSeriseUse(categoryCombox.getSelectedItem() != null);
makeToolTipUse(categoryCombox);
checkComponent();
checkAddButton();
}
});
}
@ -134,15 +129,15 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
buttonPane.add(delButton);
boxPane.add(buttonPane);
boxList.add(combox);
checkComponent();
checkAddButton();
delButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
boxPane.remove(buttonPane);
boxList.remove(combox);
checkComponent();
checkAddButton();
relayoutPane();
}
});
@ -155,10 +150,6 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
int size = boxList.size();
addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null);
}
protected void checkComponent() {
checkAddButton();
}
private void relayoutPane() {
this.revalidate();
@ -171,8 +162,8 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
*/
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
checkComponent();
checkAddButton();
}
protected void refreshBoxListWithSelectTableData(List list) {
@ -230,23 +221,17 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
*/
public void updateBean(ChartCollection collection) {
super.updateBean(collection);
TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition();
Plot plot = collection.getSelectedChart().getPlot();
if (top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition) top;
if(top instanceof NormalTableDataDefinition) {
NormalTableDataDefinition normal = (NormalTableDataDefinition)top;
normal.clearMoreCate();
updateMoreCate(normal, plot);
}
}
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
for (int i = 0, size = boxList.size(); i < size; i++) {
UIComboBox box = boxList.get(i);
if (box.getSelectedItem() != null) {
normal.addMoreCate(box.getSelectedItem().toString());
for(int i = 0, size = boxList.size(); i < size; i++) {
UIComboBox box = boxList.get(i);
if(box.getSelectedItem() != null) {
normal.addMoreCate(box.getSelectedItem().toString());
}
}
}
}
}

347
designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

@ -12,7 +12,6 @@ import com.fr.chart.chartdata.GisMapTableDefinition;
import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chart.javascript.ChartEmailPane;
import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane;
@ -22,8 +21,6 @@ import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.frpane.UIBubbleFloatPane;
import com.fr.design.gui.frpane.UICorrelationComboBoxPane;
import com.fr.design.gui.ibutton.UIButton;
@ -56,10 +53,9 @@ import java.text.DecimalFormat;
import java.text.Format;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIObserver{
private static final long serialVersionUID = 3477409806918835992L;
private static final long serialVersionUID = 3477409806918835992L;
private static HashMap normalMap = new HashMap();
private static HashMap gisMap = new HashMap();
private static HashMap mapMap = new HashMap();
@ -73,16 +69,16 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private static final int TIME_SWITCH_GAP = 40;
private UICheckBox isChartAnimation;// 动态
private UICheckBox isChartAnimation;// 动态
private UICheckBox isSeriesDragEnable; //系列拖拽
private UICheckBox isAxisZoom;// 缩放
private UICheckBox isDatapointValue;// 数据点提示
private UIButton dataPointValueFormat;
private UICheckBox isDatapointValue;// 数据点提示
private UIButton dataPointValueFormat;
private UICheckBox isDatapointPercent;
private UIButton dataPointPercentFormat;
private UICheckBox isDatapointPercent;
private UIButton dataPointPercentFormat;
private UILabel tooltipStyleLabel;
private UIComboBox tooltipStyle;
@ -94,55 +90,55 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private UICheckBox isAddress;
private UICheckBox isAddressName;
private UICheckBox isAxisShowToolTip;// 坐标轴提示
private UICheckBox isAxisShowToolTip;// 坐标轴提示
protected UICheckBox isAutoRefresh;// 自动刷新
protected UISpinner autoRefreshTime;
protected UICheckBox isAutoRefresh;// 自动刷新
protected UISpinner autoRefreshTime;
private UICorrelationComboBoxPane superLink;// 超链
private UICorrelationComboBoxPane superLink;// 超链
private FormatPane valueFormatPane;
private FormatPane percentFormatPane;
private Format valueFormat;
private Format percentFormat;
private FormatPane valueFormatPane;
private FormatPane percentFormatPane;
private Format valueFormat;
private Format percentFormat;
private JPanel tooltipPane;
private JPanel axisShowPane;
private JPanel autoRefreshPane;
private JPanel superlinkPane;
private JPanel tooltipPane;
private JPanel axisShowPane;
private JPanel autoRefreshPane;
private JPanel superlinkPane;
private ChartOtherPane parent;
private ChartOtherPane parent;
private UICheckBox timeSwitch;
private JPanel timeSwitchContainer;
private TimeSwitchPane timeSwitchPane;
private static final int SIZEX = 258;
private static final int SIZEY = 209;
private static final int DET = 20;
public ChartInteractivePane(ChartOtherPane parent) {
super();
this.parent = parent;
}
private static final int SIZEX = 258;
private static final int SIZEY = 209;
private static final int DET = 20;
public ChartInteractivePane(ChartOtherPane parent) {
super();
this.parent = parent;
}
/**
* 界面标题.
/**
* 界面标题.
* @return 返回标题.
*/
public String title4PopupWindow() {
return Inter.getLocText("Chart-Interactive_Tab");
}
@Override
protected JPanel createContentPane() {
isChartAnimation = new UICheckBox(Inter.getLocText("Chart-Animation_JSShow"));
*/
public String title4PopupWindow() {
return Inter.getLocText("Chart-Interactive_Tab");
}
@Override
protected JPanel createContentPane() {
isChartAnimation = new UICheckBox(Inter.getLocText("Chart-Animation_JSShow"));
isSeriesDragEnable = new UICheckBox(Inter.getLocText("Chart-Series_Drag"));
isDatapointValue = new UICheckBox(Inter.getLocText("Chart-Use_Value"));
dataPointValueFormat = new UIButton(Inter.getLocText("Chart-Use_Format"));
isDatapointPercent = new UICheckBox(Inter.getLocText("Chart-Value_Percent"));
dataPointPercentFormat = new UIButton(Inter.getLocText("Chart-Use_Format"));
isDatapointValue = new UICheckBox(Inter.getLocText("Chart-Use_Value"));
dataPointValueFormat = new UIButton(Inter.getLocText("Chart-Use_Format"));
isDatapointPercent = new UICheckBox(Inter.getLocText("Chart-Value_Percent"));
dataPointPercentFormat = new UIButton(Inter.getLocText("Chart-Use_Format"));
tooltipStyle = new UIComboBox(new String []{Inter.getLocText("Chart-White_Black"), Inter.getLocText("Chart-Black_White")});
tooltipStyleLabel = new UILabel(Inter.getLocText("Chart-Style_Name"));
tooltipShowType = new UIComboBox(new String []{Inter.getLocText("Chart-Series_SingleData"), Inter.getLocText("Chart-Series_AllData")});
@ -152,13 +148,13 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
isAddress = new UICheckBox(Inter.getLocText("Chart-Gis_Address"));
isAddressName = new UICheckBox(Inter.getLocText("Chart-Address_Name"));
isAxisShowToolTip = new UICheckBox(Inter.getLocText("Chart-Interactive_AxisTooltip"));
isAxisZoom = new UICheckBox(Inter.getLocText("Chart-Use_Zoom"));
isAutoRefresh = new UICheckBox(Inter.getLocText(new String[]{"Chart-Use_Auto", "Chart-Use_Refresh"}));
autoRefreshTime = new UISpinner(1, Integer.MAX_VALUE, 1);
superLink = new UICorrelationComboBoxPane();
isAxisShowToolTip = new UICheckBox(Inter.getLocText("Chart-Interactive_AxisTooltip"));
isAxisZoom = new UICheckBox(Inter.getLocText("Chart-Use_Zoom"));
isAutoRefresh = new UICheckBox(Inter.getLocText(new String[]{"Chart-Use_Auto", "Chart-Use_Refresh"}));
autoRefreshTime = new UISpinner(1, Integer.MAX_VALUE, 1);
superLink = new UICorrelationComboBoxPane();
isAutoRefresh.addActionListener(new ActionListener() {
isAutoRefresh.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkAutoRefresh();
@ -166,9 +162,9 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
});
timeSwitch = new UICheckBox(Inter.getLocText("FR-Chart-Interactive_timeSwitch"));
timeSwitchPane = new TimeSwitchPane();
initFormatListener();
return initPaneWithListener();
}
initFormatListener();
return initPaneWithListener();
}
private void initFormatListener() {
@ -244,19 +240,19 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
});
}
private void checkAutoRefresh() {
GUICoreUtils.setEnabled(autoRefreshTime, isAutoRefresh.isSelected());
}
/**
* 反正后面还有relayout,这边init一下就好了 保证所有的init 加入界面 并且加载入事件.
* @return
*/
private JPanel initPaneWithListener() {
initDataPointToolTipPane();
initAxisShowPane();
initAutoRefreshPane();
initSuperlinkPane();
private void checkAutoRefresh() {
GUICoreUtils.setEnabled(autoRefreshTime, isAutoRefresh.isSelected());
}
/**
* 反正后面还有relayout,这边init一下就好了 保证所有的init 加入界面 并且加载入事件.
* @return
*/
private JPanel initPaneWithListener() {
initDataPointToolTipPane();
initAxisShowPane();
initAutoRefreshPane();
initSuperlinkPane();
initTimeSwitchPane();
@ -275,7 +271,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
};
//初始化界面时 加载事件
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
}
private void initTimeSwitchPane(){
timeSwitchContainer = new JPanel(new BorderLayout());
@ -287,11 +283,11 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
/**
* 全部初始化, 对所有的界面 都加入, 然后会加载事件响应. 后续再relayout.
*/
private void initDataPointToolTipPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = new double[]{p, f};
double[] rowSize = new double[]{p, p, p, p, p, p, p};
private void initDataPointToolTipPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = new double[]{p, f};
double[] rowSize = new double[]{p, p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{isDatapointValue, dataPointValueFormat},
new Component[]{isDatapointPercent, dataPointPercentFormat},
@ -302,7 +298,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
new Component[]{tooltipStyleLabel, tooltipStyle}
};
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartData-Tooltip"},components, rowSize, columnSize);
}
}
private void relayoutDataPointToolTipPane(Plot plot) {
double p = TableLayout.PREFERRED;
@ -337,8 +333,8 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
} else {
rowSize = new double[]{p, p, p};
components = new Component[][]{
new Component[]{isDatapointValue, dataPointValueFormat},
new Component[]{isDatapointPercent, dataPointPercentFormat},
new Component[]{isDatapointValue, dataPointValueFormat},
new Component[]{isDatapointPercent, dataPointPercentFormat},
getTooltipStyleComponent()
};
}
@ -374,49 +370,49 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
return new Component[] {TableLayoutHelper.createTableLayoutPane(newComponents, newRowSize, newColumnSize), null};
}
private void initAxisShowPane() {
double p = TableLayout.PREFERRED;
double[] columnSize = new double[]{p};
double[] rowSize = new double[]{p};
Component[][] components = new Component[][]{
new Component[]{isAxisShowToolTip},
};
axisShowPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Axis", "Chart-Interactive"},components, rowSize, columnSize);
}
private void initAutoRefreshPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = new double[]{p, f};
double[] rowSize = new double[]{p, p, p,p};
Component[][] components = new Component[][]{
new Component[]{isAutoRefresh,null},
new Component[]{GUICoreUtils.createFlowPane(new Component[]{
new UILabel(Inter.getLocText("Chart-Time_Interval")),
autoRefreshTime,
new UILabel(Inter.getLocText("Chart-Time_Seconds"))
}, 1)},
private void initAxisShowPane() {
double p = TableLayout.PREFERRED;
double[] columnSize = new double[]{p};
double[] rowSize = new double[]{p};
Component[][] components = new Component[][]{
new Component[]{isAxisShowToolTip},
};
axisShowPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Axis", "Chart-Interactive"},components, rowSize, columnSize);
}
private void initAutoRefreshPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = new double[]{p, f};
double[] rowSize = new double[]{p, p, p,p};
Component[][] components = new Component[][]{
new Component[]{isAutoRefresh,null},
new Component[]{GUICoreUtils.createFlowPane(new Component[]{
new UILabel(Inter.getLocText("Chart-Time_Interval")),
autoRefreshTime,
new UILabel(Inter.getLocText("Chart-Time_Seconds"))
}, 1)},
new Component[]{new UILabel("<html><font size='2' face='Microsoft Yahei' color='red'>" + Inter.getLocText("FR-Chart-AutoRefresh_NotSupportIMGAndReportData") + "</font></html>"), null},
};
autoRefreshPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data-Check"},components, rowSize, columnSize);
}
private void initSuperlinkPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = new double[]{p, f};
double[] rowSize = new double[]{p};
Component[][] components = new Component[][]{
new Component[]{superLink, null},
};
superlinkPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Hyperlink"},components, rowSize, columnSize);
}
private void relayoutWithPlot(Plot plot) {
this.removeAll();
double p = TableLayout.PREFERRED;
};
autoRefreshPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data-Check"},components, rowSize, columnSize);
}
private void initSuperlinkPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = new double[]{p, f};
double[] rowSize = new double[]{p};
Component[][] components = new Component[][]{
new Component[]{superLink, null},
};
superlinkPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Hyperlink"},components, rowSize, columnSize);
}
private void relayoutWithPlot(Plot plot) {
this.removeAll();
double p = TableLayout.PREFERRED;
double[] columnSize = new double[]{TableLayout.FILL};
double[] rowSize = new double[]{p, p, p};
@ -431,7 +427,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
double[] row = new double[]{p, p, p, p, p, p};
reloaPane(TableLayoutHelper.createTableLayoutPane(components, row, columnSize));
}
}
private Component[] getChartAnimatePane(Plot plot, double[] row, double[] col) {
@ -459,9 +455,9 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
timeSwitchContainer.add(timeSwitch, BorderLayout.CENTER);
if(timeSwitch.isSelected()){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = new double[]{TIME_SWITCH_GAP,f};
double[] rowSize = new double[]{p};
double f = TableLayout.FILL;
double[] columnSize = new double[]{TIME_SWITCH_GAP,f};
double[] rowSize = new double[]{p};
Component[][] components = new Component[][]{
new Component[]{null, timeSwitchPane},
};
@ -527,15 +523,15 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
return new Component[]{superlinkPane};
}
@Override
public void populateBean(Chart chart) {
if (chart == null || chart.getPlot() == null) {
return;
}
@Override
public void populateBean(Chart chart) {
if (chart == null || chart.getPlot() == null) {
return;
}
Plot plot = chart.getPlot();
Plot plot = chart.getPlot();
relayoutWithGis(chart, plot);
relayoutWithPlot(plot);
relayoutWithPlot(plot);
populateChartAnimate(chart, plot);
populateChartScale(plot);
@ -544,8 +540,8 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
populateAutoRefresh(chart);
populateHyperlink(plot);
checkAutoRefresh();
}
checkAutoRefresh();
}
private void relayoutWithGis(Chart chart, Plot plot) {
if(plot.isSupportAddress4Gis()) {
@ -583,7 +579,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
timeSwitch.setEnabled(false);
//只有坐标轴为时间坐标轴,并且勾选了图表缩放的时候,才支持时间切换
if(!plot.isSupportZoomCategoryAxis() || !isAxisZoom.isSelected()){
return;
return;
}
if(plot.getxAxis() ==null && !plot.getxAxis().isDate()){
@ -659,13 +655,6 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private void populateHyperlink(Plot plot) {
HashMap paneMap = renewMapWithPlot(plot);
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
paneMap.put(nc.getHyperlink(), nc.getUpdatePane());
}
List<UIMenuNameableCreator> list = refreshList(paneMap);
superLink.refreshMenuAndAddMenuAction(list);
@ -683,13 +672,13 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
superLink.doLayout();
}
@Override
public void updateBean(Chart chart) {
if (chart == null || chart.getPlot() == null) {
return;
}
@Override
public void updateBean(Chart chart) {
if (chart == null || chart.getPlot() == null) {
return;
}
Plot plot = chart.getPlot();
Plot plot = chart.getPlot();
updateChartAnimate(chart, plot);
updateChartScale(plot);
@ -697,7 +686,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
updateAxisTip(plot);
updateAutoRefresh(plot);
updateHyperlink(plot);
}
}
private void updateChartAnimate(Chart chart, Plot plot) {
if(plot.isSupportAnimate()) {
@ -829,7 +818,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
}
protected Class<? extends BasicBeanPane> getUseMap(HashMap map, Object key) {
protected Class<? extends BasicBeanPane> getUseMap(HashMap map, Object key) {
if(map.get(key) != null){
return (Class<? extends BasicBeanPane>)map.get(key);
}
@ -843,33 +832,33 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
}
}
return null;
}
}
protected List<UIMenuNameableCreator> refreshList(HashMap map) {
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>();
protected List<UIMenuNameableCreator> refreshList(HashMap map) {
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>();
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Reportlet"),
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Reportlet"),
new ReportletHyperlink(), getUseMap(map, ReportletHyperlink.class)));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), ChartEmailPane.class));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Web"),
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Mail"), new EmailJavaScript(), ChartEmailPane.class));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Web"),
new WebHyperlink(), getUseMap(map, WebHyperlink.class)));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Dynamic_Parameters"),
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Dynamic_Parameters"),
new ParameterJavaScript(), getUseMap(map, ParameterJavaScript.class)));
list.add(new UIMenuNameableCreator("JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new UIMenuNameableCreator("JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class)));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Float_Chart"),
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Float_Chart"),
new ChartHyperPoplink(), getUseMap(map, ChartHyperPoplink.class)));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Cell"),
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Cell"),
new ChartHyperRelateCellLink(), getUseMap(map, ChartHyperRelateCellLink.class)));
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Float"),
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Float"),
new ChartHyperRelateFloatLink(), getUseMap(map, ChartHyperRelateFloatLink.class)));
FormHyperlinkProvider hyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
FormHyperlinkProvider hyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Link_Form"),
hyperlink, getUseMap(map, FormHyperlinkProvider.class)));
return list;
}
hyperlink, getUseMap(map, FormHyperlinkProvider.class)));
return list;
}
private HashMap renewMapWithPlot(Plot plot) {
if(plot instanceof PiePlot) {
@ -1032,8 +1021,8 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private HashMap getNormalPlotHyperMap() {
if(normalMap.isEmpty()) {
FormHyperlinkProvider fp = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
FormHyperlinkProvider fp = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
normalMap.put(ReportletHyperlink.class, ReportletHyperlinkPane.CHART.class);
normalMap.put(EmailJavaScript.class, ChartEmailPane.class);
normalMap.put(WebHyperlink.class, WebHyperlinkPane.CHART.class);
@ -1052,27 +1041,27 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
}
return normalMap;
}
@Override
public Chart updateBean() {
return null;
}
@Override
public Chart updateBean() {
return null;
}
/**
* 给组件登记一个观察者监听事件
*
* @param listener 观察者监听事件
*/
* 给组件登记一个观察者监听事件
*
* @param listener 观察者监听事件
*/
public void registerChangeListener(UIObserverListener listener) {
timeSwitch.registerChangeListener(listener);
timeSwitchPane.registerChangeListener(listener);
}
/**
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
* 组件是否需要响应添加的观察者事件
*
* @return 如果需要响应观察者事件则返回true否则返回false
*/
public boolean shouldResponseChangeListener() {
return true;
}

13
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -43,7 +43,6 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
protected List<ChartImagePane> styleList;
protected JPanel stylePane; //样式布局的面板
private JPanel typePane;
protected abstract String[] getTypeIconPath();
protected abstract String[] getTypeTipName();
protected abstract String[] getTypeLayoutPath();
@ -71,10 +70,10 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
checkDemosBackground();
this.typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4);
JPanel typePane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(4);
for(int i = 0; i < typeDemo.size(); i++) {
ChartImagePane tmp = typeDemo.get(i);
this.typePane.add(tmp);
typePane.add(tmp);
tmp.setDemoGroup(typeDemo.toArray(new ChartSelectDemoPane[typeDemo.size()]));
}
@ -100,7 +99,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
stylePane.setVisible(false);
}
JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(this.typePane),rowSize,columnSize);
JPanel panel = TableLayoutHelper.createTableLayoutPane(getPaneComponents(typePane),rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
}
@ -134,7 +133,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
}
//子类覆盖
protected <T extends Plot> T getSelectedClonedPlot(){
protected Plot getSelectedClonedPlot(){
return null;
}
@ -587,10 +586,6 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
&& chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE;
}
protected JPanel getTypePane(){
return this.typePane;
}
public Chart getDefaultChart() {
return BarIndependentChart.barChartTypes[0];
}

2
designer_form/src/com/fr/design/designer/creator/XCheckBoxGroup.java

@ -50,7 +50,7 @@ public class XCheckBoxGroup extends XFieldEditor {
new CRPropertyDescriptor("adaptive", this.data.getClass()).setI18NName(Inter.getLocText("Adaptive"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced").setEditorClass(InChangeBooleanEditor.class),
new CRPropertyDescriptor("chooseAll", this.data.getClass()).setI18NName(
Inter.getLocText("FR-Designer_Provide_Choose_All")).putKeyValue(
Inter.getLocText(new String[]{"Provide", "Choose_All"})).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("returnString", this.data.getClass()).setI18NName(
Inter.getLocText("Return-String")).setEditorClass(InChangeBooleanEditor.class)

4
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -389,8 +389,8 @@ public class XCardSwitchButton extends XButton {
return;
}
int tabLength = this.tagLayout.getComponentCount();
Map<Integer, Integer> cardWidth = new HashMap<Integer, Integer>();
Map<Integer, Integer> cardHeight = new HashMap<Integer, Integer>();
Map<Integer, Integer> cardWidth = new HashMap<>();
Map<Integer, Integer> cardHeight = new HashMap<>();
for (int i = 0; i < tabLength; i++) {
XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i);
CardSwitchButton tempCard = (CardSwitchButton) temp.toData();

2
designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java

@ -60,7 +60,7 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{
.setRendererClass(BooleanRender.class)
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer_Fit"))
};
List<CRPropertyDescriptor> defaultList = new ArrayList<CRPropertyDescriptor>();
List<CRPropertyDescriptor> defaultList = new ArrayList<>();
for (CRPropertyDescriptor propertyDescriptor: propertyTableEditor) {
defaultList.add(propertyDescriptor);

2
designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

@ -54,7 +54,7 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel {
creator.resetCreatorName(value.toString());
}
if(ComparatorUtils.equals("visible", properties[row].getName())){
creator.resetVisible((Boolean) value);
creator.resetVisible((boolean) value);
}
properties[row].firePropertyChanged();
return true;

9
designer_form/src/com/fr/design/mainframe/JForm.java

@ -528,21 +528,18 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override
protected void applyUndoState(FormUndoState u) {
try {
//JForm的target重置
this.setTarget((Form) u.getForm().clone());
if (this.index == FORM_TAB) {
//JForm的target重置
this.setTarget((Form) u.getForm().clone());
JForm.this.refreshRoot();
this.formDesign.getArea().setAreaSize(u.getAreaSize(), u.getHorizontalValue(), u.getVerticalValue(), u.getWidthValue(), u.getHeightValue(), u.getSlideValue());
//撤销的时候要重新选择的body布局
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()}));
} else {
// 只在报表块里撤销是不需要修改外部form对象的, 因为编辑的是当前报表块.
// 修改了JForm的Target需要同步修改formDesign的Target.
Form undoForm = (Form) u.getForm().clone();
String widgetName = this.formDesign.getElementCaseContainerName();
//这儿太坑了,u.getForm() 与 getTarget内容不一样
FormElementCaseProvider dataTable = undoForm.getElementCaseByName(widgetName);
FormElementCaseProvider dataTable = getTarget().getElementCaseByName(widgetName);
this.reportComposite.setSelectedWidget(dataTable);
//下面这句话是防止撤销之后直接退出编辑再编辑撤销的东西会回来,因为撤销不会保存EC
formDesign.setElementCase(dataTable);

Loading…
Cancel
Save