|
|
|
@ -8,7 +8,6 @@ import com.fr.design.border.UIRoundedBorder;
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.fun.FunctionGroupDefineProvider; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
@ -74,7 +73,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
String text = formulaTextArea.getText(); |
|
|
|
|
// 判断在中文输入状态是否还包含提示符 要删掉
|
|
|
|
|
//Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
|
|
|
|
|
String tip = "\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips"); |
|
|
|
|
String tip = "\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips"); |
|
|
|
|
if(text.contains(tip)) { |
|
|
|
|
text = text.substring(0, text.indexOf(tip)); |
|
|
|
|
insertPosition = 0; |
|
|
|
@ -144,7 +143,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
|
|
|
|
|
JPanel searchPane = new JPanel(new BorderLayout(4, 4)); |
|
|
|
|
searchPane.add(keyWordTextField, BorderLayout.CENTER); |
|
|
|
|
UIButton searchButton = new UIButton(Inter.getLocText("FR-Design_FormulaPane_Search")); |
|
|
|
|
UIButton searchButton = new UIButton(Inter.getLocText("FR-Designer_FormulaPane_Search")); |
|
|
|
|
searchPane.add(searchButton, BorderLayout.EAST); |
|
|
|
|
tipsPane.add(searchPane, BorderLayout.NORTH); |
|
|
|
|
initKeyWordTextFieldKeyListener(); |
|
|
|
@ -477,7 +476,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
if (content.trim().equals("=")) { |
|
|
|
|
this.formulaTextArea.setForeground(Color.gray); |
|
|
|
|
//Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
|
|
|
|
|
this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips")); |
|
|
|
|
this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips")); |
|
|
|
|
this.formulaTextArea.setCaretPosition(0); |
|
|
|
|
ifHasBeenWriten = 0; |
|
|
|
|
this.listModel.removeAllElements(); |
|
|
|
@ -620,7 +619,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
functionTypeListModel.addElement(FunctionConstants.CUSTOM); |
|
|
|
|
functionTypeListModel.addElement(FunctionConstants.PLUGIN); |
|
|
|
|
//hugh:自定义函数分组
|
|
|
|
|
Set<Mutable> groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); |
|
|
|
|
Set<Mutable> groups = ExtraClassManager.getInstance().getArray(FunctionGroup.MARK_STRING); |
|
|
|
|
if(!groups.isEmpty()){ |
|
|
|
|
for(Mutable group : groups){ |
|
|
|
|
functionTypeListModel.addElement(group); |
|
|
|
@ -702,7 +701,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
|
|
|
|
|
UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); |
|
|
|
|
desScrollPane.setBorder(null); |
|
|
|
|
this.add(this.createNamePane(Inter.getLocText("FR-Design_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); |
|
|
|
|
this.add(this.createNamePane(Inter.getLocText("FR-Designer_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); |
|
|
|
|
descriptionTextArea.setBackground(new Color(255, 255, 225)); |
|
|
|
|
descriptionTextArea.setLineWrap(true); |
|
|
|
|
descriptionTextArea.setWrapStyleWord(true); |
|
|
|
@ -775,7 +774,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); |
|
|
|
|
variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); |
|
|
|
|
this.add(this.createNamePane( |
|
|
|
|
Inter.getLocText("FR-Design_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER); |
|
|
|
|
Inter.getLocText("FR-Designer_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER); |
|
|
|
|
variablesTree.setRootVisible(false); |
|
|
|
|
variablesTree.setShowsRootHandles(true); |
|
|
|
|
variablesTree.addMouseListener(applyTextMouseListener); |
|
|
|
@ -804,7 +803,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
private class LookDetailAction extends UpdateAction { |
|
|
|
|
|
|
|
|
|
public LookDetailAction() { |
|
|
|
|
this.setName(Inter.getLocText("FR-Design_FormulaPane_Function_Detail")); |
|
|
|
|
this.setName(Inter.getLocText("FR-Designer_FormulaPane_Function_Detail")); |
|
|
|
|
this.setMnemonic('L'); |
|
|
|
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); |
|
|
|
|
} |
|
|
|
@ -819,7 +818,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
BasicPane basicPane = new BasicPane() { |
|
|
|
|
@Override |
|
|
|
|
protected String title4PopupWindow() { |
|
|
|
|
return Inter.getLocText("FR-Design_FormulaPane_Function_Detail"); |
|
|
|
|
return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail"); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
basicPane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
@ -915,7 +914,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
|
|
|
|
|
variableResolver.resolveColumnNames()).createMutableTreeNode()); |
|
|
|
|
|
|
|
|
|
// Set cutReport Variable
|
|
|
|
|
rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Design_FormulaPane_Variables"), |
|
|
|
|
rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Designer_FormulaPane_Variables"), |
|
|
|
|
BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), |
|
|
|
|
variableResolver.resolveCurReportVariables()).createMutableTreeNode()); |
|
|
|
|
|
|
|
|
|