Search in sources :

Example 1 with DynamicParameters

use of de.lmu.ifi.dbs.elki.gui.util.DynamicParameters in project elki by elki-project.

the class MiniGUI method setupParameterTable.

/**
 * Setup the parameter table
 */
private void setupParameterTable() {
    // Setup parameter storage and table model
    this.parameters = new DynamicParameters();
    ParametersModel parameterModel = new ParametersModel(parameters);
    parameterModel.addTableModelListener(new TableModelListener() {

        @Override
        public void tableChanged(TableModelEvent e) {
            // logger.debug("Change event.");
            updateParameterTable();
        }
    });
    // Create parameter table
    parameterTable = new ParameterTable(frame, parameterModel, parameters);
    // Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(parameterTable);
    // Add the scroll pane to this panel.
    GridBagConstraints constraints = new GridBagConstraints();
    constraints.fill = GridBagConstraints.BOTH;
    constraints.gridx = 0;
    constraints.gridy = 1;
    constraints.weightx = 1;
    constraints.weighty = 1;
    panel.add(scrollPane, constraints);
}
Also used : JScrollPane(javax.swing.JScrollPane) GridBagConstraints(java.awt.GridBagConstraints) ParametersModel(de.lmu.ifi.dbs.elki.gui.util.ParametersModel) ParameterTable(de.lmu.ifi.dbs.elki.gui.util.ParameterTable) TableModelEvent(javax.swing.event.TableModelEvent) TableModelListener(javax.swing.event.TableModelListener) DynamicParameters(de.lmu.ifi.dbs.elki.gui.util.DynamicParameters)

Aggregations

DynamicParameters (de.lmu.ifi.dbs.elki.gui.util.DynamicParameters)1 ParameterTable (de.lmu.ifi.dbs.elki.gui.util.ParameterTable)1 ParametersModel (de.lmu.ifi.dbs.elki.gui.util.ParametersModel)1 GridBagConstraints (java.awt.GridBagConstraints)1 JScrollPane (javax.swing.JScrollPane)1 TableModelEvent (javax.swing.event.TableModelEvent)1 TableModelListener (javax.swing.event.TableModelListener)1