Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.expressionevaluator / org.gvsig.expressionevaluator.swing / org.gvsig.expressionevaluator.swing.impl / src / main / java / org / gvsig / expressionevaluator / swing / impl / DefaultJExpressionBuilderView3.java @ 44902

History | View | Annotate | Download (2.15 KB)

1
package org.gvsig.expressionevaluator.swing.impl;
2

    
3
import java.awt.BorderLayout;
4
import java.awt.GridBagConstraints;
5
import java.awt.GridBagLayout;
6
import javax.swing.JPanel;
7
import javax.swing.JScrollPane;
8
import org.gvsig.expressionevaluator.swing.JTextComponentProxy;
9

    
10
public class DefaultJExpressionBuilderView3 extends DefaultJExpressionBuilderView2 {
11

    
12
  public DefaultJExpressionBuilderView3(JTextComponentProxy txtExpression) {
13
    super();
14
    this.txtExpression = txtExpression;
15
  }
16

    
17
  @Override
18
  protected void initComponents1() {
19

    
20
    this.scrElements = new JScrollPane();
21
    this.scrElements.setViewportView(treeElements);
22
    this.scrElements.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
23
    this.scrElements.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
24

    
25
    this.scrSimpleElement = new JScrollPane();
26
    this.scrSimpleElement.setViewportView(lstSimpleElement);
27
    this.scrSimpleElement.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
28
    this.scrSimpleElement.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
29

    
30
    this.spnlBottom.setLeftComponent(this.scrElements);
31
    this.spnlBottom.setRightComponent(this.spnlItem);
32
    this.spnlBottom.setBorder(emptyborder2x2);
33
    this.spnlBottom.setOneTouchExpandable(true);
34

    
35
    this.spnlItem.setLeftComponent(this.getPanelElement());
36
    this.spnlItem.setRightComponent(this.pnlDescription);
37
    this.spnlItem.setBorder(emptyborder2x2);
38
    this.spnlItem.setOneTouchExpandable(true);
39

    
40
    this.setLayout(new BorderLayout());
41
    this.add(createPanelMessages(), BorderLayout.PAGE_START);
42
    this.add(this.spnlBottom, BorderLayout.CENTER);
43
  }
44

    
45
  protected JPanel createPanelMessages() {
46
    GridBagConstraintsBuilder cs = new GridBagConstraintsBuilder();
47
    cs.anchor(GridBagConstraints.CENTER);
48
    cs.fill(GridBagConstraints.BOTH);
49

    
50
    JPanel panel = new JPanel();
51
    panel.setLayout(new GridBagLayout());
52
    panel.add(this.lblMsg, cs.xy(0, 1).nospan().grow(1, 0).get());
53
    panel.add(this.btnTip, cs.xy(1, 1).nospan().nogrow().get());
54
    panel.add(this.lblColumn, cs.xy(2, 1).nospan().nogrow().get());
55
    return panel;
56
  }
57

    
58
}