frharry 8 years ago
parent
commit
40f774b8b0
  1. 21
      designer/src/com/fr/start/ReportSplashPane.java
  2. 23
      designer_base/src/com/fr/design/actions/help/AboutPane.java
  3. 155
      designer_base/src/com/fr/design/formula/FormulaPane.java
  4. 3
      designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java
  5. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/$$$.txt
  6. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/$$page_number.txt
  7. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/$$totalPage_number.txt
  8. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_authority.txt
  9. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_username.txt
  10. 4
      designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_userposition.txt
  11. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/NOFILTER.txt
  12. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/NULL.txt
  13. 4
      designer_base/src/com/fr/design/insert/formula/variable/cn/contextPath.txt
  14. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/curReport.txt
  15. 4
      designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt
  16. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/fr_submitinfo.txt
  17. 4
      designer_base/src/com/fr/design/insert/formula/variable/cn/reportName.txt
  18. 4
      designer_base/src/com/fr/design/insert/formula/variable/cn/serverName.txt
  19. 2
      designer_base/src/com/fr/design/insert/formula/variable/cn/serverPort.txt
  20. 4
      designer_base/src/com/fr/design/insert/formula/variable/cn/serverSchema.txt
  21. 4
      designer_base/src/com/fr/design/insert/formula/variable/cn/serverURL.txt
  22. 3
      designer_base/src/com/fr/design/insert/formula/variable/cn/servletURL.txt
  23. 5
      designer_base/src/com/fr/design/insert/formula/variable/cn/sessionID.txt
  24. 2
      designer_base/src/com/fr/design/insert/formula/variable/en/contextPath.txt
  25. 4
      designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt
  26. 2
      designer_base/src/com/fr/design/insert/formula/variable/en/fr_submitinfo.txt
  27. 4
      designer_base/src/com/fr/design/insert/formula/variable/en/reportName.txt
  28. 4
      designer_base/src/com/fr/design/insert/formula/variable/en/serverName.txt
  29. 4
      designer_base/src/com/fr/design/insert/formula/variable/en/serverSchema.txt
  30. 4
      designer_base/src/com/fr/design/insert/formula/variable/en/serverURL.txt
  31. 3
      designer_base/src/com/fr/design/insert/formula/variable/en/servletURL.txt
  32. 27
      designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java
  33. 2
      designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java
  34. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java
  35. 7
      designer_form/src/com/fr/design/designer/creator/XChartEditor.java
  36. 8
      designer_form/src/com/fr/design/designer/creator/XCreator.java
  37. 7
      designer_form/src/com/fr/design/designer/creator/XElementCase.java
  38. 9
      designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java
  39. 3
      designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

21
designer/src/com/fr/start/ReportSplashPane.java

@ -4,6 +4,7 @@
package com.fr.start; package com.fr.start;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.design.mainframe.bbs.BBSConstants; import com.fr.design.mainframe.bbs.BBSConstants;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
@ -18,6 +19,7 @@ import java.awt.*;
import java.awt.font.FontRenderContext; import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics; import java.awt.font.LineMetrics;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.Locale;
import java.util.Random; import java.util.Random;
import java.util.TimerTask; import java.util.TimerTask;
@ -117,9 +119,22 @@ public class ReportSplashPane extends SplashPane{
GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y); GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y);
//每次随机感谢一位论坛用户 //每次随机感谢一位论坛用户
splashG2d.setPaint(THANK_COLOR); if (shouldShowThanks()) {
String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST; splashG2d.setPaint(THANK_COLOR);
GraphHelper.drawString(splashG2d, content, THANK_INFO_X, y); String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST;
GraphHelper.drawString(splashG2d, content, THANK_INFO_X, y);
}
}
// 是否显示鸣谢文字
private boolean shouldShowThanks() {
Locale[] hideLocales = {Locale.US, Locale.KOREA, Locale.JAPAN};
for (Locale loc : hideLocales) {
if (FRContext.getLocale().equals(loc)) {
return false;
}
}
return true;
} }
private static String getRandomUser(){ private static String getRandomUser(){

23
designer_base/src/com/fr/design/actions/help/AboutPane.java

@ -68,10 +68,7 @@ public class AboutPane extends JPanel {
Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK") Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK")
})); }));
// 英文去掉服务电话和 QQ if (shouldShowPhoneAndQQ()){
if (FRContext.getLocale().equals(Locale.US)){
// do nothing
} else {
if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE); boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE);
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
@ -85,8 +82,24 @@ public class AboutPane extends JPanel {
contentPane.add(actionLabel); contentPane.add(actionLabel);
contentPane.add(emailLabel); contentPane.add(emailLabel);
if (shouldShowThanks()) {
addThankPane(contentPane);
}
}
addThankPane(contentPane); // 是否显示服务电话和 qq
private boolean shouldShowPhoneAndQQ() {
return !FRContext.getLocale().equals(Locale.US);
}
// 是否显示鸣谢面板
private boolean shouldShowThanks() {
Locale[] hideLocales = {Locale.US, Locale.KOREA, Locale.JAPAN};
for (Locale loc : hideLocales) {
if (FRContext.getLocale().equals(loc)) {
return false;
}
}
return true;
} }
//添加鸣谢面板 //添加鸣谢面板

155
designer_base/src/com/fr/design/formula/FormulaPane.java

@ -22,6 +22,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.parser.FRLexer; import com.fr.parser.FRLexer;
import com.fr.parser.FRParser; import com.fr.parser.FRParser;
import com.fr.stable.EncodeConstants;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.script.Expression; import com.fr.stable.script.Expression;
@ -38,12 +39,14 @@ import java.awt.event.*;
import java.io.*; import java.io.*;
import java.util.Locale; import java.util.Locale;
import java.util.Set; import java.util.Set;
/** /**
* 公式编辑面板 * 公式编辑面板
*
* @editor zhou * @editor zhou
* @since 2012-3-29下午1:50:53 * @since 2012-3-29下午1:50:53
*/ */
public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
protected VariableTreeAndDescriptionArea variableTreeAndDescriptionArea; protected VariableTreeAndDescriptionArea variableTreeAndDescriptionArea;
protected RSyntaxTextArea formulaTextArea; protected RSyntaxTextArea formulaTextArea;
@ -63,16 +66,16 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
initComponents(); initComponents();
} }
private void initFormulaTextAreaKeyListener(){ private void initFormulaTextAreaKeyListener() {
formulaTextArea.addKeyListener(this); formulaTextArea.addKeyListener(this);
formulaTextArea.addKeyListener(new KeyAdapter() { formulaTextArea.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
formulaTextArea.setForeground(Color.black); formulaTextArea.setForeground(Color.black);
String text = formulaTextArea.getText(); String text = formulaTextArea.getText();
// 判断在中文输入状态是否还包含提示符 要删掉 // 判断在中文输入状态是否还包含提示符 要删掉
//Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
String tip = "\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips"); String tip = "\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips");
if(text.contains(tip)) { if (text.contains(tip)) {
text = text.substring(0, text.indexOf(tip)); text = text.substring(0, text.indexOf(tip));
insertPosition = 0; insertPosition = 0;
formulaTextArea.setText(text); formulaTextArea.setText(text);
@ -81,8 +84,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initFormulaTextAreaMouseListener(){ private void initFormulaTextAreaMouseListener() {
formulaTextArea.addMouseListener(new MouseAdapter() { formulaTextArea.addMouseListener(new MouseAdapter() {
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
insertPosition = formulaTextArea.getCaretPosition(); insertPosition = formulaTextArea.getCaretPosition();
@ -107,21 +110,23 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initFormulaTextArea(){ private void initFormulaTextArea() {
formulaTextArea = new RSyntaxTextArea(); formulaTextArea = new RSyntaxTextArea();
configFormulaArea(); configFormulaArea();
initFormulaTextAreaKeyListener(); initFormulaTextAreaKeyListener();
initFormulaTextAreaMouseListener(); initFormulaTextAreaMouseListener();
} }
private void initKeyWordTextFieldKeyListener(){ private void initKeyWordTextFieldKeyListener() {
keyWordTextField.addKeyListener(new KeyListener() { keyWordTextField.addKeyListener(new KeyListener() {
@Override @Override
public void keyTyped(KeyEvent e) { public void keyTyped(KeyEvent e) {
} }
@Override @Override
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
} }
@Override @Override
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (e.getKeyCode() == KeyEvent.VK_ENTER) {
@ -134,8 +139,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initTipsPane(){ private void initTipsPane() {
// tipsPane // tipsPane
JPanel tipsPane = new JPanel(new BorderLayout(4, 4)); JPanel tipsPane = new JPanel(new BorderLayout(4, 4));
this.add(tipsPane, BorderLayout.EAST); this.add(tipsPane, BorderLayout.EAST);
@ -259,6 +264,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
this.formulaTextArea.setText(StringUtils.EMPTY); this.formulaTextArea.setText(StringUtils.EMPTY);
} }
} }
//hugh:为啥会是10呢?搞不懂~~~ //hugh:为啥会是10呢?搞不懂~~~
private static final int KEY_10 = 10; private static final int KEY_10 = 10;
//上下左右 //上下左右
@ -266,6 +272,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
private static final int KEY_38 = 38; private static final int KEY_38 = 38;
private static final int KEY_39 = 39; private static final int KEY_39 = 39;
private static final int KEY_40 = 40; private static final int KEY_40 = 40;
@Override @Override
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
int key = e.getKeyCode(); int key = e.getKeyCode();
@ -455,7 +462,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FormulaD-Formula_Definition"); return Inter.getLocText("FormulaD-Formula_Definition");
} }
/** /**
@ -562,8 +569,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
this.initComponents(); this.initComponents();
} }
private void initFunctionTypeList(JPanel functionPane){ private void initFunctionTypeList(JPanel functionPane) {
functionTypeList = new QuickList(functionTypeListModel); functionTypeList = new QuickList(functionTypeListModel);
UIScrollPane functionTypeScrollPane = new UIScrollPane(functionTypeList); UIScrollPane functionTypeScrollPane = new UIScrollPane(functionTypeList);
functionTypeScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); functionTypeScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
functionTypeScrollPane.setPreferredSize(new Dimension(140, 200)); functionTypeScrollPane.setPreferredSize(new Dimension(140, 200));
@ -573,22 +580,22 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
initTypeListSelectionListener(); initTypeListSelectionListener();
} }
private void initTypeListCellRenderer(){ private void initTypeListCellRenderer() {
functionTypeList.setCellRenderer( functionTypeList.setCellRenderer(
new DefaultListCellRenderer() { new DefaultListCellRenderer() {
@Override @Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof FunctionGroup) { if (value instanceof FunctionGroup) {
this.setText(((FunctionGroup) value).getGroupName()); this.setText(((FunctionGroup) value).getGroupName());
} }
return this; return this;
} }
}); });
} }
private void initTypeListSelectionListener(){ private void initTypeListSelectionListener() {
functionTypeList.addListSelectionListener(new ListSelectionListener() { functionTypeList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) { public void valueChanged(ListSelectionEvent evt) {
Object selectedValue = ((JList) evt.getSource()).getSelectedValue(); Object selectedValue = ((JList) evt.getSource()).getSelectedValue();
if (!(selectedValue instanceof FunctionGroup)) { if (!(selectedValue instanceof FunctionGroup)) {
@ -608,21 +615,21 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initGroupTypeModel(){ private void initGroupTypeModel() {
functionTypeListModel.addElement(FunctionConstants.COMMON); functionTypeListModel.addElement(FunctionConstants.COMMON);
for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) { for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) {
functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]); functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]);
} }
functionTypeListModel.addElement(FunctionConstants.ALL); functionTypeListModel.addElement(FunctionConstants.ALL);
functionTypeListModel.addElement(FunctionConstants.CUSTOM); functionTypeListModel.addElement(FunctionConstants.CUSTOM);
functionTypeListModel.addElement(FunctionConstants.PLUGIN); functionTypeListModel.addElement(FunctionConstants.PLUGIN);
//hugh: 从函数分组插件中添加分组 //hugh: 从函数分组插件中添加分组
FunctionConstants.addFunctionGroupFromPlugins(functionTypeListModel); FunctionConstants.addFunctionGroupFromPlugins(functionTypeListModel);
} }
private void initFunctionNameListCellRenderer(){ private void initFunctionNameListCellRenderer() {
functionNameList.setCellRenderer(new DefaultListCellRenderer() { functionNameList.setCellRenderer(new DefaultListCellRenderer() {
@Override @Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
@ -635,8 +642,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initFunctionNameListSelectionListener(){ private void initFunctionNameListSelectionListener() {
functionNameList.addListSelectionListener(new ListSelectionListener() { functionNameList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) { public void valueChanged(ListSelectionEvent evt) {
Object selectedValue = functionNameList.getSelectedValue(); Object selectedValue = functionNameList.getSelectedValue();
@ -652,8 +659,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initFunctionNameListMouseListener(){ private void initFunctionNameListMouseListener() {
functionNameList.addMouseListener(new MouseAdapter() { functionNameList.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) { public void mouseClicked(MouseEvent evt) {
if (evt.getClickCount() >= 2) { if (evt.getClickCount() >= 2) {
Object selectedValue = functionNameList.getSelectedValue(); Object selectedValue = functionNameList.getSelectedValue();
@ -676,8 +683,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initFunctionNameList(JPanel functionPane){ private void initFunctionNameList(JPanel functionPane) {
functionNameList = new JList(new DefaultListModel()); functionNameList = new JList(new DefaultListModel());
UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList); UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList);
functionNameScrollPane.setPreferredSize(new Dimension(140, 200)); functionNameScrollPane.setPreferredSize(new Dimension(140, 200));
functionPane.add( functionPane.add(
@ -689,8 +696,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
initFunctionNameListMouseListener(); initFunctionNameListMouseListener();
} }
private void initDescriptionTextArea(){ private void initDescriptionTextArea() {
// Description // Description
descriptionTextArea = new UITextArea(16, 27); descriptionTextArea = new UITextArea(16, 27);
UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea);
@ -711,15 +718,15 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
} }
private StringBuilder getText(TextUserObject selectedValue,String path) throws IOException{ private StringBuilder getText(TextUserObject selectedValue, String path) throws IOException {
Reader desReader; Reader desReader;
StringBuilder desBuf = new StringBuilder(); StringBuilder desBuf = new StringBuilder();
InputStream desInputStream = BaseUtils.readResource(path+ ((TextUserObject) selectedValue).displayText+".txt"); InputStream desInputStream = BaseUtils.readResource(path + ((TextUserObject) selectedValue).displayText + ".txt");
if (desInputStream == null) { if (desInputStream == null) {
String description = ""; String description = "";
desReader = new StringReader(description); desReader = new StringReader(description);
} else { } else {
desReader = new InputStreamReader(desInputStream); desReader = new InputStreamReader(desInputStream, EncodeConstants.ENCODING_UTF_8);
} }
BufferedReader reader = new BufferedReader(desReader); BufferedReader reader = new BufferedReader(desReader);
String lineText; String lineText;
@ -732,12 +739,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
reader.close(); reader.close();
desReader.close(); desReader.close();
return desBuf; return desBuf;
} }
private void initVariablesTreeSelectionListener(){ private void initVariablesTreeSelectionListener() {
variablesTree.addTreeSelectionListener(new TreeSelectionListener() { variablesTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) { public void valueChanged(TreeSelectionEvent e) {
Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject();
if (selectedValue == null) { if (selectedValue == null) {
return; return;
} }
@ -751,7 +758,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
path = "/com/fr/design/insert/formula/variable/en/"; path = "/com/fr/design/insert/formula/variable/en/";
} }
if (selectedValue instanceof TextUserObject) { if (selectedValue instanceof TextUserObject) {
desBuf = getText((TextUserObject)selectedValue,path); desBuf = getText((TextUserObject) selectedValue, path);
} }
} catch (IOException exp) { } catch (IOException exp) {
FRContext.getLogger().error(exp.getMessage(), exp); FRContext.getLogger().error(exp.getMessage(), exp);
@ -762,8 +769,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
}); });
} }
private void initVariablesTree(){ private void initVariablesTree() {
// vairable. // vairable.
variablesTree = new JTree(); variablesTree = new JTree();
UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); UIScrollPane variablesTreePane = new UIScrollPane(variablesTree);
variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
@ -810,10 +817,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
private void showPopupPane() { private void showPopupPane() {
BasicPane basicPane = new BasicPane() { BasicPane basicPane = new BasicPane() {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail"); return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail");
} }
}; };
basicPane.setLayout(FRGUIPaneFactory.createBorderLayout()); basicPane.setLayout(FRGUIPaneFactory.createBorderLayout());
UITextArea desArea = new UITextArea(); UITextArea desArea = new UITextArea();
@ -904,21 +911,21 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
} }
rootNode.add(new TextFolderUserObject(Inter.getLocText("FormulaD-Data_Fields"), rootNode.add(new TextFolderUserObject(Inter.getLocText("FormulaD-Data_Fields"),
BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"), BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"),
variableResolver.resolveColumnNames()).createMutableTreeNode()); variableResolver.resolveColumnNames()).createMutableTreeNode());
// Set cutReport Variable // Set cutReport Variable
rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Designer_FormulaPane_Variables"), rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Designer_FormulaPane_Variables"),
BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"),
variableResolver.resolveCurReportVariables()).createMutableTreeNode()); variableResolver.resolveCurReportVariables()).createMutableTreeNode());
rootNode.add(new TextFolderUserObject(Inter.getLocText(new String[]{"Datasource-Datasource", "Parameter"}), rootNode.add(new TextFolderUserObject(Inter.getLocText(new String[]{"Datasource-Datasource", "Parameter"}),
BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),
variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode()); variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode());
rootNode.add(new TextFolderUserObject(Inter.getLocText("ParameterD-Report_Parameter"), rootNode.add(new TextFolderUserObject(Inter.getLocText("ParameterD-Report_Parameter"),
BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"), BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"),
variableResolver.resolveReportParameterVariables()).createMutableTreeNode()); variableResolver.resolveReportParameterVariables()).createMutableTreeNode());
rootNode.add(new TextFolderUserObject(Inter.getLocText("M_Server-Global_Parameters"), rootNode.add(new TextFolderUserObject(Inter.getLocText("M_Server-Global_Parameters"),
BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),

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

@ -13,6 +13,7 @@ import com.fr.js.JavaScript;
import com.fr.js.NameJavaScript; import com.fr.js.NameJavaScript;
import com.fr.js.NameJavaScriptGroup; import com.fr.js.NameJavaScriptGroup;
import com.fr.plugin.PluginManager; import com.fr.plugin.PluginManager;
import com.fr.stable.ListMap;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import java.util.ArrayList; import java.util.ArrayList;
@ -34,7 +35,7 @@ public class HyperlinkGroupPane extends JListControlPane {
* @return 返回Nameable按钮数组. * @return 返回Nameable按钮数组.
*/ */
public NameableCreator[] createNameableCreators() { public NameableCreator[] createNameableCreators() {
Map<String, NameableCreator> nameCreators = new TreeMap<String, NameableCreator>(); Map<String, NameableCreator> nameCreators = new ListMap<>();
NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators(); NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators();
for (NameableCreator creator : creators) { for (NameableCreator creator : creators) {
nameCreators.put(creator.menuName(), creator); nameCreators.put(creator.menuName(), creator);

2
designer_base/src/com/fr/design/insert/formula/variable/cn/$$$.txt

@ -1 +1 @@
΅±Η°Φ΅ 当前值

2
designer_base/src/com/fr/design/insert/formula/variable/cn/$$page_number.txt

@ -1 +1 @@
当前的页数。 当前的页数。

2
designer_base/src/com/fr/design/insert/formula/variable/cn/$$totalPage_number.txt

@ -1 +1 @@
总页数。 总页数。

2
designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_authority.txt

@ -1 +1 @@
使用权限时保存角色的参数 使用权限时保存角色的参数

2
designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_username.txt

@ -1 +1 @@
使用权限时保存用户名的参数 使用权限时保存用户名的参数

4
designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_userposition.txt

@ -1,3 +1 @@
使用权限时,$fr_userposition就是部门角色, 使用权限时,$fr_userposition就是部门角色,格式如:{"jobTitle":"销售经理","departments":"销售"},部门角色是以部门和职务组成的数组。
格式如:{"departments":"销售","jobTitle":"销售经理"},
部门角色是以部门和职务组成的数组。

2
designer_base/src/com/fr/design/insert/formula/variable/cn/NOFILTER.txt

@ -1 +1 @@
NOFILTER是一个与任意值比较都为true的参数。 NOFILTER是一个与任意值比较都为true的参数。

2
designer_base/src/com/fr/design/insert/formula/variable/cn/NULL.txt

@ -1 +1 @@
空值的参数。 空值的参数。

4
designer_base/src/com/fr/design/insert/formula/variable/cn/contextPath.txt

@ -1,3 +1 @@
contextPath是指绝对路径的服务器别名,即虚拟目录. contextPath是指绝对路径的服务器别名,即虚拟目录.假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,contextPath是/WebReport
假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,
contextPath是/WebReport

2
designer_base/src/com/fr/design/insert/formula/variable/cn/curReport.txt

@ -1 +1 @@
当前报表。 当前报表。

4
designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt

@ -1,3 +1 @@
表单名字 表单名字假如访问:http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm,formName就是Form1.frm
假如访问:http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm,
formName就是Form1.frm

2
designer_base/src/com/fr/design/insert/formula/variable/cn/fr_submitinfo.txt

@ -1 +1 @@
提交入库事件的返回信息。 fr_submitinfo.success记录成功与否 fr_submitinfo.failinfo简单记录出错信息 提交入库事件的返回信息。fr_submitinfo.success记录成功与否fr_submitinfo.failinfo简单记录出错信息

4
designer_base/src/com/fr/design/insert/formula/variable/cn/reportName.txt

@ -1,3 +1 @@
报表名字 报表名字假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,reportName就是WorkBook1.cpt
假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,
reportName就是WorkBook1.cpt

4
designer_base/src/com/fr/design/insert/formula/variable/cn/serverName.txt

@ -1,3 +1 @@
serverName,是指服务器地址或名称. serverName,是指服务器地址或名称.假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverName指的是:localhost,即访问机子的IP
假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,
serverName指的是:localhost,即访问机子的IP

2
designer_base/src/com/fr/design/insert/formula/variable/cn/serverPort.txt

@ -1 +1 @@
serverPort指的是访问的端口 serverPort指的是访问的端口

4
designer_base/src/com/fr/design/insert/formula/variable/cn/serverSchema.txt

@ -1,3 +1 @@
serverSchema,是指协议名称. serverSchema,是指协议名称.假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverSchema指的是:http
假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,
serverSchema指的是:http

4
designer_base/src/com/fr/design/insert/formula/variable/cn/serverURL.txt

@ -1,3 +1 @@
serverURL是指访问服务的URL serverURL是指访问服务的URL假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverURL就是http://localhost:8080
假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,
serverURL就是http://localhost:8080

3
designer_base/src/com/fr/design/insert/formula/variable/cn/servletURL.txt

@ -1,2 +1 @@
假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt, 假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL指的是:/WebReport/ReportServer
servletURL指的是:/WebReport/ReportServer

5
designer_base/src/com/fr/design/insert/formula/variable/cn/sessionID.txt

@ -1,4 +1 @@
SessionID属性是返回用户会话的标识。 SessionID属性是返回用户会话的标识。在创建会话时,服务器会为每一个会话生成一个单独的标识,会话标识以长整形数据类型返回。SessionID等于本次会话ID的记录,SessionID 多数情况是用于WEB页面的统计。
在创建会话时,服务器会为每一个会话生成一个单独的标识,
会话标识以长整形数据类型返回。SessionID等于本次会话ID的记录,
SessionID 多数情况是用于WEB页面的统计。

2
designer_base/src/com/fr/design/insert/formula/variable/en/contextPath.txt

@ -1 +1 @@
absolute path of the server http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt£¬ contextPath is /WebReport absolute path of the serverhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cptcontextPath is /WebReport

4
designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt

@ -1,3 +1 @@
form name form namehttp://localhost:8080/WebReport/ReportServer?formlet=Form1.frm,formName is Form1.frm
http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm£¬
formName is Form1.frm

2
designer_base/src/com/fr/design/insert/formula/variable/en/fr_submitinfo.txt

@ -1 +1 @@
callback status of form submit contains fr_submitinfo.success and fr_submitinfo.failinfo callback status of form submitcontains fr_submitinfo.success and fr_submitinfo.failinfo

4
designer_base/src/com/fr/design/insert/formula/variable/en/reportName.txt

@ -1,3 +1 @@
report name report namehttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,reportName is WorkBook1.cpt
http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt£¬
reportName is WorkBook1.cpt

4
designer_base/src/com/fr/design/insert/formula/variable/en/serverName.txt

@ -1,3 +1 @@
address or name of the server address or name of the serverhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverName means localhost
http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt£¬
serverName means localhost

4
designer_base/src/com/fr/design/insert/formula/variable/en/serverSchema.txt

@ -1,3 +1 @@
serverSchema serverSchemahttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverSchema is http
http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt£¬
serverSchema is http

4
designer_base/src/com/fr/design/insert/formula/variable/en/serverURL.txt

@ -1,3 +1 @@
URL of the server URL of the serverhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverURL is http://localhost:8080
http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt£¬
serverURL is http://localhost:8080

3
designer_base/src/com/fr/design/insert/formula/variable/en/servletURL.txt

@ -1,2 +1 @@
http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt£¬ http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL is /WebReport/ReportServer
servletURL is /WebReport/ReportServer

27
designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java

@ -42,14 +42,14 @@ public class MinMaxValuePane extends JPanel {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f }; double[] columnSize = { p, f };
double[] rowSize = { p, p, p, p}; double[] rowSize = { p, p, p, p, p, p, p, p};
Component[][] components = getPanelComponents(); Component[][] components = getPanelComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER); this.add(panel,BorderLayout.CENTER);
for(int i = 0; i < components.length; i++) { for(int i = 0; i < components.length; i+=2) {
((UICheckBox)components[i][0]).addActionListener(new ActionListener() { ((UICheckBox)components[i][0]).addActionListener(new ActionListener() {
@Override @Override
@ -57,18 +57,21 @@ public class MinMaxValuePane extends JPanel {
checkBoxUse(); checkBoxUse();
} }
}); });
ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]); ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]);
} }
} }
protected Component[][] getPanelComponents() {
protected Component[][] getPanelComponents() { return new Component[][]{
return new Component[][]{ new Component[]{minCheckBox},
new Component[]{minCheckBox, minValueField}, new Component[]{minValueField},
new Component[]{maxCheckBox, maxValueField}, new Component[]{maxCheckBox},
new Component[]{isCustomMainUnitBox, mainUnitField}, new Component[]{maxValueField},
new Component[]{isCustomSecUnitBox, secUnitField}, new Component[]{isCustomMainUnitBox},
}; new Component[]{mainUnitField},
} new Component[]{isCustomSecUnitBox},
new Component[]{secUnitField},
};
}
private void checkBoxUse() { private void checkBoxUse() {
minValueField.setEnabled(minCheckBox.isSelected()); minValueField.setEnabled(minCheckBox.isSelected());

2
designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java

@ -22,7 +22,7 @@ public interface IndependentChartUIProvider extends Level {
String XML_TAG = "IndependentChartUIProvider"; String XML_TAG = "IndependentChartUIProvider";
int CURRENT_API_LEVEL = 3; int CURRENT_API_LEVEL = 4;
/** /**
* 图表的类型定义界面类型就是属性表的第一个界面 * 图表的类型定义界面类型就是属性表的第一个界面

7
designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -151,10 +151,11 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f};
double[] rowSize = { p, p,}; double[] rowSize = { p, p, p};
Component[][] component = new Component[][]{ Component[][] component = new Component[][]{
new Component[]{null,initMinMaxValue(),null}, new Component[]{null,initMinMaxValue(),null},
new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()}, new Component[]{null, addLogarithmicPane2ValuePane(), null},
new Component[]{null, null, addLogText()},
}; };
return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize);
} }
@ -176,7 +177,7 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
logBaseField = new UITextField(4); logBaseField = new UITextField(4);
logBaseField.setText("10"); logBaseField.setText("10");
logBaseField.setPreferredSize(new Dimension(20, 20)); logBaseField.setPreferredSize(new Dimension(55, 20));
logBox.addActionListener(new ActionListener() { logBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {

7
designer_form/src/com/fr/design/designer/creator/XChartEditor.java

@ -85,6 +85,13 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
return new CRPropertyDescriptor[] { return new CRPropertyDescriptor[] {
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("Form-Widget_Name")), .getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName(
Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
makeVisible(toData().isVisible());}
}),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setI18NName( WLayoutBorderStyleEditor.class).setI18NName(
Inter.getLocText("Chart-Style_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") Inter.getLocText("Chart-Style_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")

8
designer_form/src/com/fr/design/designer/creator/XCreator.java

@ -379,6 +379,14 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
toData().setWidgetName(name); toData().setWidgetName(name);
} }
/**
* 重置组件的可见性
* @param visible 可见性
*/
public void resetVisible(boolean visible){
toData().setVisible(visible);
}
/** /**
* 返回编辑的子组件scale为其内部组件 * 返回编辑的子组件scale为其内部组件
* @return 组件 * @return 组件

7
designer_form/src/com/fr/design/designer/creator/XElementCase.java

@ -84,6 +84,13 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{ CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{
new CRPropertyDescriptor("widgetName", this.data.getClass()) new CRPropertyDescriptor("widgetName", this.data.getClass())
.setI18NName(Inter.getLocText("Form-Widget_Name")), .setI18NName(Inter.getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName(
Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
makeVisible(toData().isVisible());}
}),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setI18NName( WLayoutBorderStyleEditor.class).setI18NName(
Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")

9
designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java

@ -146,6 +146,15 @@ public abstract class XWidgetCreator extends XCreator {
} }
} }
/**
* 渲染Painter
*/
public void paint(Graphics g) {
//不可见时,按钮.4f透明
AlphaComposite composite = this.data.isVisible() ? (AlphaComposite)((Graphics2D)g).getComposite() : AlphaComposite.getInstance(AlphaComposite.SRC_OVER,HALF_OPACITY);
((Graphics2D)g).setComposite(composite);
super.paint(g);
}
/** /**
* 重命名 * 重命名
* *

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

@ -53,6 +53,9 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel {
if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){ if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){
creator.resetCreatorName(value.toString()); creator.resetCreatorName(value.toString());
} }
if(ComparatorUtils.equals("visible", properties[row].getName())){
creator.resetVisible((boolean) value);
}
properties[row].firePropertyChanged(); properties[row].firePropertyChanged();
return true; return true;
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save