Revision 538 org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/algorithm/AlgorithmDialog.java

View differences:

AlgorithmDialog.java
36 36
import es.unex.sextante.outputs.OutputTable;
37 37
import es.unex.sextante.outputs.OutputVectorLayer;
38 38
import es.unex.sextante.parameters.Parameter;
39
import java.awt.BorderLayout;
39 40

  
40 41

  
41 42
/**
......
67 68
   private JButton                         jButtonPrevious;
68 69
   private JButton                         jButtonNext;
69 70
   private int                             m_iPreviousCommandIndex;
70
   private final ArrayList<DateAndCommand> m_sCommand;
71
   private ArrayList<DateAndCommand> m_sCommand;
71 72

  
72 73

  
73 74
   /**
......
91 92
                          final ArrayList<DateAndCommand> commands) {
92 93

  
93 94
      super(parent, algorithm.getName(), true);
94

  
95
      setResizable(false);
96

  
97
      m_Algorithm = algorithm;
98
      m_sCommand = commands;
99

  
100
      jPanelParametersMain = panel;
101
      jPanelParametersMain.init(m_Algorithm);
102

  
103
      initGUI();
104
      setLocationRelativeTo(null);
105

  
95
      init(algorithm, panel, commands);
106 96
   }
107 97

  
108 98

  
......
122 112
   public AlgorithmDialog(final GeoAlgorithm algorithm,
123 113
                          final GeoAlgorithmParametersPanel panel,
124 114
                          final ArrayList<DateAndCommand> commands) {
125

  
115
       
126 116
      super(SextanteGUI.getMainFrame(), algorithm.getName(), true);
117
      init(algorithm, panel, commands);
118
   }
127 119

  
128
      setResizable(false);
120
    private void init(final GeoAlgorithm algorithm,
121
            final GeoAlgorithmParametersPanel panel,
122
            final ArrayList<DateAndCommand> commands) {
129 123

  
130
      m_sCommand = commands;
131
      m_Algorithm = algorithm;
124
        if(panel instanceof DefaultParametersPanel){
125
            setResizable(false);
126
        } else {
127
            setResizable(true);
128
        }
132 129

  
133
      jPanelParametersMain = panel;
134
      jPanelParametersMain.init(m_Algorithm);
130
        m_Algorithm = algorithm;
131
        m_sCommand = commands;
135 132

  
136
      initGUI();
137
      setLocationRelativeTo(null);
133
        jPanelParametersMain = panel;
134
        jPanelParametersMain.init(m_Algorithm);
138 135

  
139
   }
136
        initGUI();
137
        setLocationRelativeTo(null);
140 138

  
139
    }
141 140

  
141

  
142 142
   private void initGUI() {
143 143

  
144 144

  
145
      jMainPanel = new JPanel();
146

  
147
      this.add(jMainPanel);
148

  
149
      final TableLayout thisLayout = new TableLayout(new double[][] { { 10.0, TableLayoutConstants.FILL, 10. },
150
               { 1.0, 338.0, 37.0 } });
151
      jMainPanel.setLayout(thisLayout);
145
//      jMainPanel = new JPanel();
146
//
147
//      this.add(jMainPanel);
148
//
149
//      final TableLayout thisLayout = new TableLayout(new double[][] { { 10.0, TableLayoutConstants.FILL, 10. },
150
//               { 1.0, 338.0, 37.0 } });
151
//      jMainPanel.setLayout(thisLayout);
152 152
      this.setSize(696, 446);
153 153
      {
154 154
         jTabbedPane1 = new JTabbedPane();
155
         jMainPanel.add(jTabbedPane1, "1, 1");
155
//         jMainPanel.add(jTabbedPane1, "1, 1");
156 156
         {
157 157
            jTabbedPane1.addTab(Sextante.getText("Parameters"), null, jPanelParametersMain, null);
158 158
         }
......
170 170
         jPanelButtonsLayout.setHGap(5);
171 171
         jPanelButtonsLayout.setVGap(5);
172 172
         jPanelButtons.setLayout(jPanelButtonsLayout);
173
         jMainPanel.add(jPanelButtons, "1, 2");
173
//         jMainPanel.add(jPanelButtons, "1, 2");
174 174
         jPanelButtons.setFocusable(false);
175 175
         {
176 176
            jButtonOK = new JButton();
......
245 245
            // do nothing
246 246
         }
247 247
      }
248

  
248
      jMainPanel = new JPanel();
249
      jMainPanel.setLayout(new BorderLayout());
250
      jMainPanel.add(jTabbedPane1, BorderLayout.CENTER);
251
      jMainPanel.add(jPanelButtons, BorderLayout.SOUTH);
249 252
   }
250 253

  
251 254

  

Also available in: Unified diff