@ -14,6 +14,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicDialog ;
import com.fr.design.dialog.BasicDialog ;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.dialog.DialogActionAdapter ;
import com.fr.design.dialog.DialogActionAdapter ;
import com.fr.design.dialog.DialogActionListener ;
import com.fr.design.dialog.FineJOptionPane ;
import com.fr.design.dialog.FineJOptionPane ;
import com.fr.design.file.HistoryTemplateListCache ;
import com.fr.design.file.HistoryTemplateListCache ;
import com.fr.design.gui.autocomplete.AutoCompleteExtraRefreshComponent ;
import com.fr.design.gui.autocomplete.AutoCompleteExtraRefreshComponent ;
@ -63,6 +64,7 @@ import com.fr.stable.script.Node;
import com.fr.stable.script.Tiny ;
import com.fr.stable.script.Tiny ;
import com.fr.stable.script.TinyHunter ;
import com.fr.stable.script.TinyHunter ;
import java.awt.Window ;
import javax.swing.BorderFactory ;
import javax.swing.BorderFactory ;
import javax.swing.DefaultListCellRenderer ;
import javax.swing.DefaultListCellRenderer ;
import javax.swing.DefaultListModel ;
import javax.swing.DefaultListModel ;
@ -736,6 +738,13 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
return com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FormulaD_Formula_Definition" ) ;
return com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FormulaD_Formula_Definition" ) ;
}
}
public BasicDialog showLargeWindow ( Window window , DialogActionListener l ) {
BasicDialog basicDialog = super . showWindowWithCustomSize ( window , l , new Dimension ( 900 , 600 ) ) ;
basicDialog . setMinimumSize ( new Dimension ( 900 , 600 ) ) ;
basicDialog . setResizable ( true ) ;
return basicDialog ;
}
/ * *
/ * *
* Populate
* Populate
* /
* /
@ -1102,6 +1111,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private void initGroupTypeModel ( ) {
private void initGroupTypeModel ( ) {
functionTypeListModel . addElement ( FunctionConstants . COMMON ) ;
functionTypeListModel . addElement ( FunctionConstants . COMMON ) ;
functionTypeListModel . addElement ( FunctionConstants . NEW ) ;
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 ] ) ;
}
}
@ -1186,9 +1196,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
descriptionTextArea = new UITextArea ( ) ;
descriptionTextArea = new UITextArea ( ) ;
descriptionTextArea . setPreferredSize ( new Dimension ( 350 , 200 ) ) ;
descriptionTextArea . setPreferredSize ( new Dimension ( 350 , 200 ) ) ;
UIScrollPane desScrollPane = new UIScrollPane ( descriptionTextArea ) ;
desScrollPane . setBorder ( null ) ;
this . add ( this . createNamePane ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FormulaPane_Formula_Description" ) + ":" , desScrollPane ) , BorderLayout . EAST ) ;
descriptionTextArea . setBackground ( Color . white ) ;
descriptionTextArea . setBackground ( Color . white ) ;
descriptionTextArea . setLineWrap ( true ) ;
descriptionTextArea . setLineWrap ( true ) ;
descriptionTextArea . setWrapStyleWord ( true ) ;
descriptionTextArea . setWrapStyleWord ( true ) ;
@ -1256,12 +1263,13 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private void initVariablesTree ( ) {
private void initVariablesTree ( ) {
JPanel panel = FRGUIPaneFactory . createBorderLayout_S_Pane ( ) ;
// 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 ) ) ;
this . add ( this . createNamePane (
panel . add ( this . createNamePane (
com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FormulaPane_Variables" ) + ":" , variablesTreePane ) , BorderLayout . CENTER ) ;
com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FormulaPane_Variables" ) + ":" , variablesTreePane ) , BorderLayout . WEST ) ;
variablesTree . setRootVisible ( false ) ;
variablesTree . setRootVisible ( false ) ;
variablesTree . setShowsRootHandles ( true ) ;
variablesTree . setShowsRootHandles ( true ) ;
variablesTree . addMouseListener ( applyTextMouseListener ) ;
variablesTree . addMouseListener ( applyTextMouseListener ) ;
@ -1269,7 +1277,11 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
initDescriptionTextArea ( ) ;
initDescriptionTextArea ( ) ;
UIScrollPane desScrollPane = new UIScrollPane ( descriptionTextArea ) ;
desScrollPane . setBorder ( null ) ;
panel . add ( this . createNamePane ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FormulaPane_Formula_Description" ) + ":" , desScrollPane ) , BorderLayout . CENTER ) ;
initVariablesTreeSelectionListener ( ) ;
initVariablesTreeSelectionListener ( ) ;
this . add ( panel , BorderLayout . CENTER ) ;
}
}
private void initComponents ( ) {
private void initComponents ( ) {