net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNumberColPickerPane.java Source code

Java tutorial

Introduction

Here is the source code for net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNumberColPickerPane.java

Source

// Description: Java 8 JavaFX Picker of Obj Pane implementation for NumberCol.

/*
 *   CFBam
 *
 *   Copyright (c) 2014-2016 Mark Sobkow
 *   
 *   This program is available as free software under the GNU GPL v3, or
 *   under a commercial license from Mark Sobkow.  For commercial licensing
 *   details, please contact msobkow@sasktel.net.
 *   
 *   Under the terms of the GPL:
 *   
 *      This program is free software: you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation, either version 3 of the License, or
 *      (at your option) any later version.
 *     
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *     
 *      You should have received a copy of the GNU General Public License
 *      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *   
 */

package net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX;

import java.math.*;
import java.sql.*;
import java.text.*;
import java.util.*;
import java.util.List;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Parent;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.ScrollPane.ScrollBarPolicy;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableColumn.CellDataFeatures;
import javafx.scene.control.TableView;
import javafx.util.Callback;
import net.sourceforge.msscodefactory.cflib.v2_7.CFLib.*;
import net.sourceforge.msscodefactory.cflib.v2_7.CFLib.JavaFX.*;
import org.apache.commons.codec.binary.Base64;
import net.sourceforge.msscodefactory.cfsecurity.v2_7.CFSecurity.*;
import net.sourceforge.msscodefactory.cfinternet.v2_7.CFInternet.*;
import net.sourceforge.msscodefactory.cfbam.v2_7.CFBam.*;
import net.sourceforge.msscodefactory.cfsecurity.v2_7.CFSecurityObj.*;
import net.sourceforge.msscodefactory.cfinternet.v2_7.CFInternetObj.*;
import net.sourceforge.msscodefactory.cfbam.v2_7.CFBamObj.*;
import net.sourceforge.msscodefactory.cfsecurity.v2_7.CFSecurityJavaFX.*;
import net.sourceforge.msscodefactory.cfinternet.v2_7.CFInternetJavaFX.*;

/**
 *   CFBamJavaFXNumberColPickerPane JavaFX Pick Obj Pane implementation
 *   for NumberCol.
 */
public class CFBamJavaFXNumberColPickerPane extends CFBorderPane implements ICFBamJavaFXNumberColPaneList {
    public static String S_FormName = "Choose NumberCol";
    protected ICFBamJavaFXSchema javafxSchema = null;
    protected Collection<ICFBamNumberColObj> javafxDataCollection = null;
    protected ObservableList<ICFBamNumberColObj> observableListOfNumberCol = null;
    protected TableColumn<ICFBamNumberColObj, Long> tableColumnId = null;
    protected TableColumn<ICFBamNumberColObj, String> tableColumnName = null;
    protected TableColumn<ICFBamNumberColObj, String> tableColumnShortName = null;
    protected TableColumn<ICFBamNumberColObj, String> tableColumnLabel = null;
    protected TableColumn<ICFBamNumberColObj, String> tableColumnShortDescription = null;
    protected TableColumn<ICFBamNumberColObj, String> tableColumnDescription = null;
    protected TableColumn<ICFBamNumberColObj, Boolean> tableColumnIsNullable = null;
    protected TableColumn<ICFBamNumberColObj, Boolean> tableColumnGenerateId = null;
    protected TableColumn<ICFBamNumberColObj, Boolean> tableColumnDefaultVisibility = null;
    protected TableColumn<ICFBamNumberColObj, String> tableColumnDbName = null;
    protected TableColumn<ICFBamNumberColObj, Short> tableColumnDigits = null;
    protected TableColumn<ICFBamNumberColObj, Short> tableColumnPrecis = null;
    protected TableColumn<ICFBamNumberColObj, BigDecimal> tableColumnInitValue = null;
    protected TableColumn<ICFBamNumberColObj, BigDecimal> tableColumnDefaultValue = null;
    protected TableColumn<ICFBamNumberColObj, BigDecimal> tableColumnMinValue = null;
    protected TableColumn<ICFBamNumberColObj, BigDecimal> tableColumnMaxValue = null;
    protected TableColumn<ICFBamNumberColObj, BigDecimal> tableColumnNullValue = null;
    protected TableColumn<ICFBamNumberColObj, BigDecimal> tableColumnUnknownValue = null;
    protected TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj> tableColumnLookupDefSchema = null;
    protected TableView<ICFBamNumberColObj> dataTable = null;
    protected CFHBox hboxMenu = null;
    public final String S_ColumnNames[] = { "Name" };
    protected ICFFormManager cfFormManager = null;
    protected ICFBamJavaFXNumberColChosen invokeWhenChosen = null;
    protected ICFBamTableObj javafxContainer = null;
    protected CFButton buttonCancel = null;
    protected CFButton buttonChooseNone = null;
    protected CFButton buttonChooseSelected = null;

    public CFBamJavaFXNumberColPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
            ICFBamNumberColObj argFocus, ICFBamTableObj argContainer,
            Collection<ICFBamNumberColObj> argDataCollection, ICFBamJavaFXNumberColChosen whenChosen) {
        super();
        final String S_ProcName = "construct-schema-focus";
        if (formManager == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                    "formManager");
        }
        cfFormManager = formManager;
        if (argSchema == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                    "argSchema");
        }
        if (whenChosen == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 6,
                    "whenChosen");
        }
        invokeWhenChosen = whenChosen;
        // argFocus is optional; focus may be set later during execution as
        // conditions of the runtime change.
        javafxSchema = argSchema;
        javaFXFocus = argFocus;
        javafxContainer = argContainer;
        setJavaFXDataCollection(argDataCollection);
        dataTable = new TableView<ICFBamNumberColObj>();
        tableColumnId = new TableColumn<ICFBamNumberColObj, Long>("Id");
        tableColumnId.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, Long>, ObservableValue<Long>>() {
                    public ObservableValue<Long> call(CellDataFeatures<ICFBamNumberColObj, Long> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            long value = obj.getRequiredId();
                            Long wrapped = new Long(value);
                            ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                            observable.setValue(wrapped);
                            return (observable);
                        }
                    }
                });
        tableColumnId.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, Long>, TableCell<ICFBamNumberColObj, Long>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, Long> call(TableColumn<ICFBamNumberColObj, Long> arg) {
                        return new CFInt64TableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnId);
        tableColumnName = new TableColumn<ICFBamNumberColObj, String>("Name");
        tableColumnName.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                    public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            String value = obj.getRequiredName();
                            ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnName.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                        return new CFStringTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnName);
        tableColumnShortName = new TableColumn<ICFBamNumberColObj, String>("Short Name");
        tableColumnShortName.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                    public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            String value = obj.getOptionalShortName();
                            ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnShortName.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                        return new CFStringTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnShortName);
        tableColumnLabel = new TableColumn<ICFBamNumberColObj, String>("Label");
        tableColumnLabel.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                    public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            String value = obj.getOptionalLabel();
                            ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnLabel.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                        return new CFStringTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnLabel);
        tableColumnShortDescription = new TableColumn<ICFBamNumberColObj, String>("Short Description");
        tableColumnShortDescription.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                    public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            String value = obj.getOptionalShortDescription();
                            ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnShortDescription.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                        return new CFStringTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnShortDescription);
        tableColumnDescription = new TableColumn<ICFBamNumberColObj, String>("Description");
        tableColumnDescription.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                    public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            String value = obj.getOptionalDescription();
                            ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnDescription.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                        return new CFStringTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnDescription);
        tableColumnIsNullable = new TableColumn<ICFBamNumberColObj, Boolean>("Is Nullable");
        tableColumnIsNullable.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                    public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, Boolean> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            boolean value = obj.getRequiredIsNullable();
                            Boolean wrapped = new Boolean(value);
                            ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                            observable.setValue(wrapped);
                            return (observable);
                        }
                    }
                });
        tableColumnIsNullable.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, Boolean> call(
                            TableColumn<ICFBamNumberColObj, Boolean> arg) {
                        return new CFBoolTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnIsNullable);
        tableColumnGenerateId = new TableColumn<ICFBamNumberColObj, Boolean>("Generate Id");
        tableColumnGenerateId.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                    public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, Boolean> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            Boolean value = obj.getOptionalGenerateId();
                            ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnGenerateId.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, Boolean> call(
                            TableColumn<ICFBamNumberColObj, Boolean> arg) {
                        return new CFBoolTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnGenerateId);
        tableColumnDefaultVisibility = new TableColumn<ICFBamNumberColObj, Boolean>("Default Visibility");
        tableColumnDefaultVisibility.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, Boolean>, ObservableValue<Boolean>>() {
                    public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNumberColObj, Boolean> p) {
                        ICFBamValueObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            boolean value = obj.getRequiredDefaultVisibility();
                            Boolean wrapped = new Boolean(value);
                            ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                            observable.setValue(wrapped);
                            return (observable);
                        }
                    }
                });
        tableColumnDefaultVisibility.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, Boolean>, TableCell<ICFBamNumberColObj, Boolean>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, Boolean> call(
                            TableColumn<ICFBamNumberColObj, Boolean> arg) {
                        return new CFBoolTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnDefaultVisibility);
        tableColumnDbName = new TableColumn<ICFBamNumberColObj, String>("Db Name");
        tableColumnDbName.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, String>, ObservableValue<String>>() {
                    public ObservableValue<String> call(CellDataFeatures<ICFBamNumberColObj, String> p) {
                        ICFBamAtomObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            String value = obj.getOptionalDbName();
                            ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnDbName.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, String>, TableCell<ICFBamNumberColObj, String>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, String> call(TableColumn<ICFBamNumberColObj, String> arg) {
                        return new CFStringTableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnDbName);
        tableColumnDigits = new TableColumn<ICFBamNumberColObj, Short>("Digits");
        tableColumnDigits.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, Short>, ObservableValue<Short>>() {
                    public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberColObj, Short> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            short value = obj.getRequiredDigits();
                            Short wrapped = new Short(value);
                            ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                            observable.setValue(wrapped);
                            return (observable);
                        }
                    }
                });
        tableColumnDigits.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, Short>, TableCell<ICFBamNumberColObj, Short>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, Short> call(TableColumn<ICFBamNumberColObj, Short> arg) {
                        return new CFInt16TableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnDigits);
        tableColumnPrecis = new TableColumn<ICFBamNumberColObj, Short>("Precision");
        tableColumnPrecis.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, Short>, ObservableValue<Short>>() {
                    public ObservableValue<Short> call(CellDataFeatures<ICFBamNumberColObj, Short> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            short value = obj.getRequiredPrecis();
                            Short wrapped = new Short(value);
                            ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                            observable.setValue(wrapped);
                            return (observable);
                        }
                    }
                });
        tableColumnPrecis.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, Short>, TableCell<ICFBamNumberColObj, Short>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, Short> call(TableColumn<ICFBamNumberColObj, Short> arg) {
                        return new CFInt16TableCell<ICFBamNumberColObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnPrecis);
        tableColumnInitValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Init. Value");
        tableColumnInitValue.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                    public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            BigDecimal value = obj.getOptionalInitValue();
                            ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnInitValue.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, BigDecimal> call(
                            TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                        return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                    }
                });
        dataTable.getColumns().add(tableColumnInitValue);
        tableColumnDefaultValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Default Value");
        tableColumnDefaultValue.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                    public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            BigDecimal value = obj.getOptionalDefaultValue();
                            ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnDefaultValue.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, BigDecimal> call(
                            TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                        return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                    }
                });
        dataTable.getColumns().add(tableColumnDefaultValue);
        tableColumnMinValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Min. Value");
        tableColumnMinValue.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                    public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            BigDecimal value = obj.getOptionalMinValue();
                            ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnMinValue.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, BigDecimal> call(
                            TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                        return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                    }
                });
        dataTable.getColumns().add(tableColumnMinValue);
        tableColumnMaxValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Max. Value");
        tableColumnMaxValue.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                    public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            BigDecimal value = obj.getOptionalMaxValue();
                            ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnMaxValue.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, BigDecimal> call(
                            TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                        return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                    }
                });
        dataTable.getColumns().add(tableColumnMaxValue);
        tableColumnNullValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Null Value");
        tableColumnNullValue.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                    public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            BigDecimal value = obj.getOptionalNullValue();
                            ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnNullValue.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, BigDecimal> call(
                            TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                        return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                    }
                });
        dataTable.getColumns().add(tableColumnNullValue);
        tableColumnUnknownValue = new TableColumn<ICFBamNumberColObj, BigDecimal>("Unknown Value");
        tableColumnUnknownValue.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, BigDecimal>, ObservableValue<BigDecimal>>() {
                    public ObservableValue<BigDecimal> call(CellDataFeatures<ICFBamNumberColObj, BigDecimal> p) {
                        ICFBamNumberDefObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            BigDecimal value = obj.getOptionalUnknownValue();
                            ReadOnlyObjectWrapper<BigDecimal> observable = new ReadOnlyObjectWrapper<BigDecimal>();
                            observable.setValue(value);
                            return (observable);
                        }
                    }
                });
        tableColumnUnknownValue.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, BigDecimal>, TableCell<ICFBamNumberColObj, BigDecimal>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, BigDecimal> call(
                            TableColumn<ICFBamNumberColObj, BigDecimal> arg) {
                        return new CFNumberTableCell<ICFBamNumberColObj>(31, 5);
                    }
                });
        dataTable.getColumns().add(tableColumnUnknownValue);
        tableColumnLookupDefSchema = new TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj>(
                "Defining Schema Definition");
        tableColumnLookupDefSchema.setCellValueFactory(
                new Callback<CellDataFeatures<ICFBamNumberColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                    public ObservableValue<ICFBamSchemaDefObj> call(
                            CellDataFeatures<ICFBamNumberColObj, ICFBamSchemaDefObj> p) {
                        ICFBamNumberColObj obj = p.getValue();
                        if (obj == null) {
                            return (null);
                        } else {
                            ICFBamSchemaDefObj ref = obj.getOptionalLookupDefSchema();
                            ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                            observable.setValue(ref);
                            return (observable);
                        }
                    }
                });
        tableColumnLookupDefSchema.setCellFactory(
                new Callback<TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj>, TableCell<ICFBamNumberColObj, ICFBamSchemaDefObj>>() {
                    @Override
                    public TableCell<ICFBamNumberColObj, ICFBamSchemaDefObj> call(
                            TableColumn<ICFBamNumberColObj, ICFBamSchemaDefObj> arg) {
                        return new CFReferenceTableCell<ICFBamNumberColObj, ICFBamSchemaDefObj>();
                    }
                });
        dataTable.getColumns().add(tableColumnLookupDefSchema);
        dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNumberColObj>() {
            @Override
            public void changed(ObservableValue<? extends ICFBamNumberColObj> observable,
                    ICFBamNumberColObj oldValue, ICFBamNumberColObj newValue) {
                setJavaFXFocus(newValue);
                if (buttonChooseSelected != null) {
                    if (newValue != null) {
                        buttonChooseSelected.setDisable(false);
                    } else {
                        buttonChooseSelected.setDisable(true);
                    }
                }
            }
        });
        hboxMenu = new CFHBox(10);
        buttonCancel = new CFButton();
        buttonCancel.setMinWidth(200);
        buttonCancel.setText("Cancel");
        buttonCancel.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    cfFormManager.closeCurrentForm();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonCancel);
        buttonChooseNone = new CFButton();
        buttonChooseNone.setMinWidth(200);
        buttonChooseNone.setText("ChooseNone");
        buttonChooseNone.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                                "schemaObj");
                    }
                    invokeWhenChosen.choseNumberCol(null);
                    cfFormManager.closeCurrentForm();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonChooseNone);
        buttonChooseSelected = new CFButton();
        buttonChooseSelected.setMinWidth(200);
        buttonChooseSelected.setText("ChooseSelected");
        buttonChooseSelected.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent e) {
                final String S_ProcName = "handle";
                try {
                    ICFBamSchemaObj schemaObj = (ICFBamSchemaObj) javafxSchema.getSchema();
                    if (schemaObj == null) {
                        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                                "schemaObj");
                    }
                    ICFBamNumberColObj selectedInstance = getJavaFXFocusAsNumberCol();
                    invokeWhenChosen.choseNumberCol(selectedInstance);
                    cfFormManager.closeCurrentForm();
                } catch (Throwable t) {
                    CFConsole.formException(S_FormName, ((CFButton) e.getSource()).getText(), t);
                }
            }
        });
        hboxMenu.getChildren().add(buttonChooseSelected);
        if (argFocus != null) {
            dataTable.getSelectionModel().select(argFocus);
        }
        setTop(hboxMenu);
        setCenter(dataTable);
    }

    public ICFFormManager getCFFormManager() {
        return (cfFormManager);
    }

    public void setCFFormManager(ICFFormManager value) {
        final String S_ProcName = "setCFFormManager";
        if (value == null) {
            throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "value");
        }
        cfFormManager = value;
    }

    public ICFBamJavaFXSchema getJavaFXSchema() {
        return (javafxSchema);
    }

    public void setJavaFXFocus(ICFLibAnyObj value) {
        final String S_ProcName = "setJavaFXFocus";
        if ((value == null) || (value instanceof ICFBamNumberColObj)) {
            super.setJavaFXFocus(value);
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "value",
                    value, "ICFBamNumberColObj");
        }
        if (dataTable == null) {
            return;
        }
    }

    public ICFBamNumberColObj getJavaFXFocusAsNumberCol() {
        return ((ICFBamNumberColObj) getJavaFXFocus());
    }

    public void setJavaFXFocusAsNumberCol(ICFBamNumberColObj value) {
        setJavaFXFocus(value);
    }

    public class NumberColByQualNameComparator implements Comparator<ICFBamNumberColObj> {
        public NumberColByQualNameComparator() {
        }

        public int compare(ICFBamNumberColObj lhs, ICFBamNumberColObj rhs) {
            if (lhs == null) {
                if (rhs == null) {
                    return (0);
                } else {
                    return (-1);
                }
            } else if (rhs == null) {
                return (1);
            } else {
                String lhsValue = lhs.getObjQualifiedName();
                String rhsValue = rhs.getObjQualifiedName();
                if (lhsValue == null) {
                    if (rhsValue == null) {
                        return (0);
                    } else {
                        return (-1);
                    }
                } else if (rhsValue == null) {
                    return (1);
                } else {
                    return (lhsValue.compareTo(rhsValue));
                }
            }
        }
    }

    protected NumberColByQualNameComparator compareNumberColByQualName = new NumberColByQualNameComparator();

    public Collection<ICFBamNumberColObj> getJavaFXDataCollection() {
        return (javafxDataCollection);
    }

    public void setJavaFXDataCollection(Collection<ICFBamNumberColObj> value) {
        final String S_ProcName = "setJavaFXDataCollection";
        javafxDataCollection = value;
        observableListOfNumberCol = null;
        if (javafxDataCollection != null) {
            observableListOfNumberCol = FXCollections.observableArrayList(javafxDataCollection);
            observableListOfNumberCol.sort(compareNumberColByQualName);
        } else {
            observableListOfNumberCol = FXCollections.observableArrayList();
        }
        if (dataTable != null) {
            dataTable.setItems(observableListOfNumberCol);
            // Hack from stackoverflow to fix JavaFX TableView refresh issue
            ((TableColumn) dataTable.getColumns().get(0)).setVisible(false);
            ((TableColumn) dataTable.getColumns().get(0)).setVisible(true);
        }
    }

    public ICFBamTableObj getJavaFXContainer() {
        return (javafxContainer);
    }

    public void setJavaFXContainer(ICFBamTableObj value) {
        javafxContainer = value;
    }
}