Index: DefaultJExpressionBuilderView.java
===================================================================
--- DefaultJExpressionBuilderView.java	(revision 43982)
+++ DefaultJExpressionBuilderView.java	(revision 43983)
@@ -11,8 +11,10 @@
 import javax.swing.Box;
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
+import javax.swing.JComboBox;
 import javax.swing.JEditorPane;
 import javax.swing.JFrame;
+import javax.swing.JLabel;
 import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -41,10 +43,15 @@
    JTextField txtGroupElement = new JTextField();
    JButton btnGroupElementInsert = new JButton();
    JButton btnSimpleElementInsert = new JButton();
+   JButton btnSimpleElementSortDown = new JButton();
    JButton btnSimpleElementSortUp = new JButton();
-   JButton btnSimpleElementSortDown = new JButton();
+   JLabel lblSimpleElementsMsg = new JLabel();
    JTextField txtSimpleElementFilter = new JTextField();
    JButton btnSimpleElementFilter = new JButton();
+   JPanel pnlScriptEditorContainer = new JPanel();
+   JComboBox cboPickerScripts = new JComboBox();
+   JButton btnPickerRemove = new JButton();
+   JButton btnPickerSelectScript = new JButton();
 
    /**
     * Default constructor
@@ -152,7 +159,7 @@
    public JPanel createPanel1()
    {
       JPanel jpanel1 = new JPanel();
-      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE");
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:80DLU:NONE,FILL:4DLU:NONE,FILL:100DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.3),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE");
       CellConstraints cc = new CellConstraints();
       jpanel1.setLayout(formlayout1);
 
@@ -171,6 +178,7 @@
       jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
       jpanel1.add(jscrollpane2,cc.xywh(2,4,1,6));
 
+      txtDescription.setEditable(false);
       txtDescription.setName("txtDescription");
       JScrollPane jscrollpane3 = new JScrollPane();
       jscrollpane3.setViewportView(txtDescription);
@@ -188,7 +196,7 @@
    public JPanel createPanel2()
    {
       JPanel jpanel1 = new JPanel();
-      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
       CellConstraints cc = new CellConstraints();
       jpanel1.setLayout(formlayout1);
 
@@ -207,7 +215,7 @@
    public JPanel createPanel3()
    {
       JPanel jpanel1 = new JPanel();
-      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
       CellConstraints cc = new CellConstraints();
       jpanel1.setLayout(formlayout1);
 
@@ -223,51 +231,51 @@
       btnAdd.setText("+");
       EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
       btnAdd.setBorder(emptyborder2);
-      jpanel1.add(btnAdd,cc.xy(1,2));
+      jpanel1.add(btnAdd,cc.xy(1,3));
 
       btnSubst.setActionCommand("+");
       btnSubst.setName("btnSubst");
       btnSubst.setText("-");
       EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
       btnSubst.setBorder(emptyborder3);
-      jpanel1.add(btnSubst,cc.xy(2,2));
+      jpanel1.add(btnSubst,cc.xy(3,3));
 
       btnMult.setActionCommand("+");
       btnMult.setName("btnMult");
       btnMult.setText("*");
       EmptyBorder emptyborder4 = new EmptyBorder(2,2,2,2);
       btnMult.setBorder(emptyborder4);
-      jpanel1.add(btnMult,cc.xy(1,3));
+      jpanel1.add(btnMult,cc.xy(1,5));
 
       btnDiv.setActionCommand("+");
       btnDiv.setName("btnDiv");
       btnDiv.setText("/");
       EmptyBorder emptyborder5 = new EmptyBorder(2,2,2,2);
       btnDiv.setBorder(emptyborder5);
-      jpanel1.add(btnDiv,cc.xy(2,3));
+      jpanel1.add(btnDiv,cc.xy(3,5));
 
       btnParentOpen.setActionCommand("+");
       btnParentOpen.setName("btnParentOpen");
       btnParentOpen.setText("(");
       EmptyBorder emptyborder6 = new EmptyBorder(2,2,2,2);
       btnParentOpen.setBorder(emptyborder6);
-      jpanel1.add(btnParentOpen,cc.xy(1,4));
+      jpanel1.add(btnParentOpen,cc.xy(1,7));
 
       btnParentClose.setActionCommand("+");
       btnParentClose.setName("btnParentClose");
       btnParentClose.setText(")");
       EmptyBorder emptyborder7 = new EmptyBorder(2,2,2,2);
       btnParentClose.setBorder(emptyborder7);
-      jpanel1.add(btnParentClose,cc.xy(2,4));
+      jpanel1.add(btnParentClose,cc.xy(3,7));
 
       btnNeq.setActionCommand("+");
       btnNeq.setName("btnNeq");
       btnNeq.setText("<>");
       EmptyBorder emptyborder8 = new EmptyBorder(2,2,2,2);
       btnNeq.setBorder(emptyborder8);
-      jpanel1.add(btnNeq,cc.xy(2,1));
+      jpanel1.add(btnNeq,cc.xy(3,1));
 
-      addFillComponents(jpanel1,new int[0],new int[0]);
+      addFillComponents(jpanel1,new int[]{ 2 },new int[]{ 2,4,6 });
       return jpanel1;
    }
 
@@ -284,7 +292,7 @@
       jpanel1.add(txtGroupElement,cc.xy(1,1));
 
       btnGroupElementInsert.setActionCommand("+");
-      btnGroupElementInsert.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expresionbuilder-insert-text.png"));
+      btnGroupElementInsert.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-insert-text.png"));
       btnGroupElementInsert.setName("btnGroupElementInsert");
       EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
       btnGroupElementInsert.setBorder(emptyborder1);
@@ -302,27 +310,30 @@
       jpanel1.setLayout(formlayout1);
 
       btnSimpleElementInsert.setActionCommand("+");
-      btnSimpleElementInsert.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expresionbuilder-insert-text.png"));
+      btnSimpleElementInsert.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-insert-text.png"));
       btnSimpleElementInsert.setName("btnSimpleElementInsert");
       EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
       btnSimpleElementInsert.setBorder(emptyborder1);
       jpanel1.add(btnSimpleElementInsert,cc.xy(6,1));
 
+      btnSimpleElementSortDown.setActionCommand("+");
+      btnSimpleElementSortDown.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-sortdown.png"));
+      btnSimpleElementSortDown.setName("btnSimpleElementSortDown");
+      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
+      btnSimpleElementSortDown.setBorder(emptyborder2);
+      jpanel1.add(btnSimpleElementSortDown,cc.xy(4,1));
+
       btnSimpleElementSortUp.setActionCommand("+");
       btnSimpleElementSortUp.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-sortup.png"));
       btnSimpleElementSortUp.setName("btnSimpleElementSortUp");
-      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
-      btnSimpleElementSortUp.setBorder(emptyborder2);
-      jpanel1.add(btnSimpleElementSortUp,cc.xy(4,1));
-
-      btnSimpleElementSortDown.setActionCommand("+");
-      btnSimpleElementSortDown.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-sortdown.png"));
-      btnSimpleElementSortDown.setName("btnSimpleElementSortDown");
       EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
-      btnSimpleElementSortDown.setBorder(emptyborder3);
-      jpanel1.add(btnSimpleElementSortDown,cc.xy(2,1));
+      btnSimpleElementSortUp.setBorder(emptyborder3);
+      jpanel1.add(btnSimpleElementSortUp,cc.xy(2,1));
 
-      addFillComponents(jpanel1,new int[]{ 1,3,5 },new int[]{ 1 });
+      lblSimpleElementsMsg.setName("lblSimpleElementsMsg");
+      jpanel1.add(lblSimpleElementsMsg,cc.xy(1,1));
+
+      addFillComponents(jpanel1,new int[]{ 3,5 },new int[0]);
       return jpanel1;
    }
 
@@ -350,14 +361,46 @@
    public JPanel createPanel7()
    {
       JPanel jpanel1 = new JPanel();
-      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
+      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
       CellConstraints cc = new CellConstraints();
       jpanel1.setLayout(formlayout1);
 
-      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
+      pnlScriptEditorContainer.setName("pnlScriptEditorContainer");
+      jpanel1.add(pnlScriptEditorContainer,cc.xy(2,2));
+
+      jpanel1.add(createPanel8(),cc.xy(2,4));
+      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5 });
       return jpanel1;
    }
 
+   public JPanel createPanel8()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      cboPickerScripts.setName("cboPickerScripts");
+      jpanel1.add(cboPickerScripts,cc.xy(1,1));
+
+      btnPickerRemove.setActionCommand("+");
+      btnPickerRemove.setName("btnPickerRemove");
+      btnPickerRemove.setText("R");
+      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
+      btnPickerRemove.setBorder(emptyborder1);
+      jpanel1.add(btnPickerRemove,cc.xy(3,1));
+
+      btnPickerSelectScript.setActionCommand("+");
+      btnPickerSelectScript.setName("btnPickerSelectScript");
+      btnPickerSelectScript.setText("S");
+      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
+      btnPickerSelectScript.setBorder(emptyborder2);
+      jpanel1.add(btnPickerSelectScript,cc.xy(5,1));
+
+      addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]);
+      return jpanel1;
+   }
+
    /**
     * Initializer
     */
