Example usage for java.lang Short Short

List of usage examples for java.lang Short Short

Introduction

In this page you can find the example usage for java.lang Short Short.

Prototype

@Deprecated(since = "9")
public Short(String s) throws NumberFormatException 

Source Link

Document

Constructs a newly allocated Short object that represents the short value indicated by the String parameter.

Usage

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXTokenColPickerPane.java

public CFBamJavaFXTokenColPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTokenColObj argFocus, ICFBamTableObj argContainer,
        Collection<ICFBamTokenColObj> argDataCollection, ICFBamJavaFXTokenColChosen whenChosen) {
    super();//from www .j  a  v  a 2 s  . c  om
    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<ICFBamTokenColObj>();
    tableColumnId = new TableColumn<ICFBamTokenColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, Long>, TableCell<ICFBamTokenColObj, Long>>() {
                @Override
                public TableCell<ICFBamTokenColObj, Long> call(TableColumn<ICFBamTokenColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTokenColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTokenColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTokenColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTokenColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTokenColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTokenColObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, Boolean>, TableCell<ICFBamTokenColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTokenColObj, Boolean> call(TableColumn<ICFBamTokenColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTokenColObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, Boolean>, TableCell<ICFBamTokenColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTokenColObj, Boolean> call(TableColumn<ICFBamTokenColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTokenColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, Boolean>, TableCell<ICFBamTokenColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTokenColObj, Boolean> call(TableColumn<ICFBamTokenColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTokenColObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, 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<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamTokenColObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamTokenColObj, Integer> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamTokenColObj, Integer>, TableCell<ICFBamTokenColObj, Integer>>() {
                @Override
                public TableCell<ICFBamTokenColObj, Integer> call(TableColumn<ICFBamTokenColObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnInitValue = new TableColumn<ICFBamTokenColObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTokenColObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamTokenColObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTokenColObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenColObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenColObj, String>, TableCell<ICFBamTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamTokenColObj, String> call(TableColumn<ICFBamTokenColObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnShowLines = new TableColumn<ICFBamTokenColObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamTokenColObj, Short> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamTokenColObj, Short>, TableCell<ICFBamTokenColObj, Short>>() {
                @Override
                public TableCell<ICFBamTokenColObj, Short> call(TableColumn<ICFBamTokenColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTokenColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTokenColObj, ICFBamSchemaDefObj> p) {
                    ICFBamTokenColObj 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<ICFBamTokenColObj, ICFBamSchemaDefObj>, TableCell<ICFBamTokenColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTokenColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTokenColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTokenColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamTokenColObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamTokenColObj> observable, ICFBamTokenColObj oldValue,
                ICFBamTokenColObj 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.choseTokenCol(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");
                }
                ICFBamTokenColObj selectedInstance = getJavaFXFocusAsTokenCol();
                invokeWhenChosen.choseTokenCol(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);
}

From source file:com.alibaba.wasp.jdbc.TestPreparedStatement.java

public void testObject() throws SQLException {
    Statement stat = conn.createStatement();
    ResultSet rs;/*  ww  w . j av a2s  . c om*/
    stat.execute("CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255))");
    stat.execute("INSERT INTO TEST VALUES(1, 'Hello')");
    PreparedStatement prep = conn
            .prepareStatement("SELECT ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? FROM TEST");
    prep.setObject(1, Boolean.TRUE);
    prep.setObject(2, "Abc");
    prep.setObject(3, new BigDecimal("10.2"));
    prep.setObject(4, new Byte((byte) 0xff));
    prep.setObject(5, new Short(Short.MAX_VALUE));
    prep.setObject(6, new Integer(Integer.MIN_VALUE));
    prep.setObject(7, new Long(Long.MAX_VALUE));
    prep.setObject(8, new Float(Float.MAX_VALUE));
    prep.setObject(9, new Double(Double.MAX_VALUE));
    prep.setObject(10, Date.valueOf("2001-02-03"));
    prep.setObject(11, Time.valueOf("04:05:06"));
    prep.setObject(12, Timestamp.valueOf("2001-02-03 04:05:06.123456789"));
    prep.setObject(13, new java.util.Date(Date.valueOf("2001-02-03").getTime()));
    prep.setObject(14, new byte[] { 10, 20, 30 });
    prep.setObject(15, new Character('a'), Types.OTHER);
    prep.setObject(16, "2001-01-02", Types.DATE);
    // converting to null seems strange...
    prep.setObject(17, "2001-01-02", Types.NULL);
    prep.setObject(18, "3.725", Types.DOUBLE);
    prep.setObject(19, "23:22:21", Types.TIME);
    prep.setObject(20, new java.math.BigInteger("12345"), Types.OTHER);
    rs = prep.executeQuery();
    rs.next();
    assertTrue(rs.getObject(1).equals(Boolean.TRUE));
    assertTrue(rs.getObject(2).equals("Abc"));
    assertTrue(rs.getObject(3).equals(new BigDecimal("10.2")));
    assertTrue(rs.getObject(4).equals((byte) 0xff));
    assertTrue(rs.getObject(5).equals(new Short(Short.MAX_VALUE)));
    assertTrue(rs.getObject(6).equals(new Integer(Integer.MIN_VALUE)));
    assertTrue(rs.getObject(7).equals(new Long(Long.MAX_VALUE)));
    assertTrue(rs.getObject(8).equals(new Float(Float.MAX_VALUE)));
    assertTrue(rs.getObject(9).equals(new Double(Double.MAX_VALUE)));
    assertTrue(rs.getObject(10).equals(Date.valueOf("2001-02-03")));
    assertEquals("04:05:06", rs.getObject(11).toString());
    assertTrue(rs.getObject(11).equals(Time.valueOf("04:05:06")));
    assertTrue(rs.getObject(12).equals(Timestamp.valueOf("2001-02-03 04:05:06.123456789")));
    assertTrue(rs.getObject(13).equals(Timestamp.valueOf("2001-02-03 00:00:00")));
    assertEquals(new byte[] { 10, 20, 30 }, (byte[]) rs.getObject(14));
    assertTrue(rs.getObject(15).equals('a'));
    assertTrue(rs.getObject(16).equals(Date.valueOf("2001-01-02")));
    assertTrue(rs.getObject(17) == null && rs.wasNull());
    assertTrue(rs.getObject(18).equals(new Double(3.725)));
    assertTrue(rs.getObject(19).equals(Time.valueOf("23:22:21")));
    assertTrue(rs.getObject(20).equals(new java.math.BigInteger("12345")));

    // } else if(x instanceof java.io.Reader) {
    // return session.createLob(Value.CLOB,
    // TypeConverter.getInputStream((java.io.Reader)x), 0);
    // } else if(x instanceof java.io.InputStream) {
    // return session.createLob(Value.BLOB, (java.io.InputStream)x, 0);
    // } else {
    // return ValueBytes.get(TypeConverter.serialize(x));

    stat.execute("DROP TABLE TEST");

}

From source file:net.sf.json.TestJSONArray.java

public void testFromObject_Short() {
    JSONArray expected = JSONArray.fromObject("[1]");
    JSONArray actual = JSONArray.fromObject(new Short((short) 1));
    Assertions.assertEquals(expected, actual);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXTokenTypePickerPane.java

public CFBamJavaFXTokenTypePickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamTokenTypeObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamTokenTypeObj> argDataCollection, ICFBamJavaFXTokenTypeChosen whenChosen) {
    super();/*from  www  .j  a va 2s .c o  m*/
    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<ICFBamTokenTypeObj>();
    tableColumnId = new TableColumn<ICFBamTokenTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, Long>, TableCell<ICFBamTokenTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, Long> call(TableColumn<ICFBamTokenTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamTokenTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamTokenTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamTokenTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamTokenTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamTokenTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamTokenTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, Boolean>, TableCell<ICFBamTokenTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, Boolean> call(
                        TableColumn<ICFBamTokenTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamTokenTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, Boolean>, TableCell<ICFBamTokenTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, Boolean> call(
                        TableColumn<ICFBamTokenTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamTokenTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, Boolean>, TableCell<ICFBamTokenTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, Boolean> call(
                        TableColumn<ICFBamTokenTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamTokenTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, 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<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamTokenTypeObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamTokenTypeObj, Integer> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamTokenTypeObj, Integer>, TableCell<ICFBamTokenTypeObj, Integer>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, Integer> call(
                        TableColumn<ICFBamTokenTypeObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnInitValue = new TableColumn<ICFBamTokenTypeObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamTokenTypeObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamTokenTypeObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamTokenTypeObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamTokenTypeObj, String> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamTokenTypeObj, String>, TableCell<ICFBamTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, String> call(TableColumn<ICFBamTokenTypeObj, String> arg) {
                    return new CFTokenTableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnShowLines = new TableColumn<ICFBamTokenTypeObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamTokenTypeObj, Short> p) {
                    ICFBamTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamTokenTypeObj, Short>, TableCell<ICFBamTokenTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, Short> call(TableColumn<ICFBamTokenTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnLookupDefSchema = new TableColumn<ICFBamTokenTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamTokenTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamTokenTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamTokenTypeObj 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<ICFBamTokenTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamTokenTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamTokenTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamTokenTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamTokenTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamTokenTypeObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamTokenTypeObj> observable,
                ICFBamTokenTypeObj oldValue, ICFBamTokenTypeObj 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.choseTokenType(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");
                }
                ICFBamTokenTypeObj selectedInstance = getJavaFXFocusAsTokenType();
                invokeWhenChosen.choseTokenType(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);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNmTokenColPickerPane.java

public CFBamJavaFXNmTokenColPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNmTokenColObj argFocus, ICFBamTableObj argContainer,
        Collection<ICFBamNmTokenColObj> argDataCollection, ICFBamJavaFXNmTokenColChosen whenChosen) {
    super();// w w w  .  j  a v a2s.c o  m
    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<ICFBamNmTokenColObj>();
    tableColumnId = new TableColumn<ICFBamNmTokenColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, Long>, TableCell<ICFBamNmTokenColObj, Long>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, Long> call(TableColumn<ICFBamNmTokenColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNmTokenColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNmTokenColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNmTokenColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNmTokenColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNmTokenColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNmTokenColObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, Boolean>, TableCell<ICFBamNmTokenColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, Boolean> call(
                        TableColumn<ICFBamNmTokenColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNmTokenColObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, Boolean>, TableCell<ICFBamNmTokenColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, Boolean> call(
                        TableColumn<ICFBamNmTokenColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNmTokenColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, Boolean>, TableCell<ICFBamNmTokenColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, Boolean> call(
                        TableColumn<ICFBamNmTokenColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNmTokenColObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, 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<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamNmTokenColObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamNmTokenColObj, Integer> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenColObj, Integer>, TableCell<ICFBamNmTokenColObj, Integer>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, Integer> call(
                        TableColumn<ICFBamNmTokenColObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnInitValue = new TableColumn<ICFBamNmTokenColObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNmTokenColObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamNmTokenColObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNmTokenColObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenColObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenColObj, String>, TableCell<ICFBamNmTokenColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, String> call(
                        TableColumn<ICFBamNmTokenColObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnShowLines = new TableColumn<ICFBamNmTokenColObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNmTokenColObj, Short> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenColObj, Short>, TableCell<ICFBamNmTokenColObj, Short>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, Short> call(TableColumn<ICFBamNmTokenColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNmTokenColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNmTokenColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNmTokenColObj, ICFBamSchemaDefObj> p) {
                    ICFBamNmTokenColObj 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<ICFBamNmTokenColObj, ICFBamSchemaDefObj>, TableCell<ICFBamNmTokenColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNmTokenColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNmTokenColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNmTokenColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamNmTokenColObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamNmTokenColObj> observable,
                ICFBamNmTokenColObj oldValue, ICFBamNmTokenColObj 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.choseNmTokenCol(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");
                }
                ICFBamNmTokenColObj selectedInstance = getJavaFXFocusAsNmTokenCol();
                invokeWhenChosen.choseNmTokenCol(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);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNmTokenTypePickerPane.java

public CFBamJavaFXNmTokenTypePickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNmTokenTypeObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamNmTokenTypeObj> argDataCollection, ICFBamJavaFXNmTokenTypeChosen whenChosen) {
    super();//from   w  w w  .  j  ava  2s. c o  m
    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<ICFBamNmTokenTypeObj>();
    tableColumnId = new TableColumn<ICFBamNmTokenTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, Long>, TableCell<ICFBamNmTokenTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, Long> call(TableColumn<ICFBamNmTokenTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNmTokenTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNmTokenTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNmTokenTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNmTokenTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNmTokenTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNmTokenTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, Boolean>, TableCell<ICFBamNmTokenTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, Boolean> call(
                        TableColumn<ICFBamNmTokenTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNmTokenTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, Boolean>, TableCell<ICFBamNmTokenTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, Boolean> call(
                        TableColumn<ICFBamNmTokenTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNmTokenTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, Boolean>, TableCell<ICFBamNmTokenTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, Boolean> call(
                        TableColumn<ICFBamNmTokenTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNmTokenTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, 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<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamNmTokenTypeObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamNmTokenTypeObj, Integer> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenTypeObj, Integer>, TableCell<ICFBamNmTokenTypeObj, Integer>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, Integer> call(
                        TableColumn<ICFBamNmTokenTypeObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnInitValue = new TableColumn<ICFBamNmTokenTypeObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNmTokenTypeObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamNmTokenTypeObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNmTokenTypeObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokenTypeObj, String> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenTypeObj, String>, TableCell<ICFBamNmTokenTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, String> call(
                        TableColumn<ICFBamNmTokenTypeObj, String> arg) {
                    return new CFNmTokenTableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnShowLines = new TableColumn<ICFBamNmTokenTypeObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNmTokenTypeObj, Short> p) {
                    ICFBamNmTokenDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokenTypeObj, Short>, TableCell<ICFBamNmTokenTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, Short> call(
                        TableColumn<ICFBamNmTokenTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNmTokenTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamNmTokenTypeObj 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<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNmTokenTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamNmTokenTypeObj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamNmTokenTypeObj> observable,
                        ICFBamNmTokenTypeObj oldValue, ICFBamNmTokenTypeObj 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.choseNmTokenType(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");
                }
                ICFBamNmTokenTypeObj selectedInstance = getJavaFXFocusAsNmTokenType();
                invokeWhenChosen.choseNmTokenType(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);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNmTokensColPickerPane.java

public CFBamJavaFXNmTokensColPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNmTokensColObj argFocus, ICFBamTableObj argContainer,
        Collection<ICFBamNmTokensColObj> argDataCollection, ICFBamJavaFXNmTokensColChosen whenChosen) {
    super();/* ww w .j  a  v  a2s .c  o  m*/
    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<ICFBamNmTokensColObj>();
    tableColumnId = new TableColumn<ICFBamNmTokensColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, Long>, TableCell<ICFBamNmTokensColObj, Long>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, Long> call(TableColumn<ICFBamNmTokensColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNmTokensColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNmTokensColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNmTokensColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNmTokensColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNmTokensColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNmTokensColObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, Boolean>, TableCell<ICFBamNmTokensColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, Boolean> call(
                        TableColumn<ICFBamNmTokensColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNmTokensColObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, Boolean>, TableCell<ICFBamNmTokensColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, Boolean> call(
                        TableColumn<ICFBamNmTokensColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNmTokensColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, Boolean>, TableCell<ICFBamNmTokensColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, Boolean> call(
                        TableColumn<ICFBamNmTokensColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNmTokensColObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, 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<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamNmTokensColObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamNmTokensColObj, Integer> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensColObj, Integer>, TableCell<ICFBamNmTokensColObj, Integer>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, Integer> call(
                        TableColumn<ICFBamNmTokensColObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnInitValue = new TableColumn<ICFBamNmTokensColObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNmTokensColObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamNmTokensColObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNmTokensColObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensColObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensColObj, String>, TableCell<ICFBamNmTokensColObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, String> call(
                        TableColumn<ICFBamNmTokensColObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnShowLines = new TableColumn<ICFBamNmTokensColObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNmTokensColObj, Short> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensColObj, Short>, TableCell<ICFBamNmTokensColObj, Short>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, Short> call(
                        TableColumn<ICFBamNmTokensColObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNmTokensColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNmTokensColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNmTokensColObj, ICFBamSchemaDefObj> p) {
                    ICFBamNmTokensColObj 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<ICFBamNmTokensColObj, ICFBamSchemaDefObj>, TableCell<ICFBamNmTokensColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNmTokensColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNmTokensColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNmTokensColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamNmTokensColObj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamNmTokensColObj> observable,
                        ICFBamNmTokensColObj oldValue, ICFBamNmTokensColObj 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.choseNmTokensCol(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");
                }
                ICFBamNmTokensColObj selectedInstance = getJavaFXFocusAsNmTokensCol();
                invokeWhenChosen.choseNmTokensCol(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);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXNmTokensTypePickerPane.java

public CFBamJavaFXNmTokensTypePickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamNmTokensTypeObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamNmTokensTypeObj> argDataCollection, ICFBamJavaFXNmTokensTypeChosen whenChosen) {
    super();/*from w  w w  .java2s .  c  o m*/
    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<ICFBamNmTokensTypeObj>();
    tableColumnId = new TableColumn<ICFBamNmTokensTypeObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, Long>, TableCell<ICFBamNmTokensTypeObj, Long>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, Long> call(
                        TableColumn<ICFBamNmTokensTypeObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamNmTokensTypeObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamNmTokensTypeObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamNmTokensTypeObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamNmTokensTypeObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamNmTokensTypeObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamNmTokensTypeObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, Boolean>, TableCell<ICFBamNmTokensTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, Boolean> call(
                        TableColumn<ICFBamNmTokensTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamNmTokensTypeObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, Boolean>, TableCell<ICFBamNmTokensTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, Boolean> call(
                        TableColumn<ICFBamNmTokensTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamNmTokensTypeObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, Boolean>, TableCell<ICFBamNmTokensTypeObj, Boolean>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, Boolean> call(
                        TableColumn<ICFBamNmTokensTypeObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamNmTokensTypeObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, 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<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFStringTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnMaxLen = new TableColumn<ICFBamNmTokensTypeObj, Integer>("Max. Length");
    tableColumnMaxLen.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, Integer>, ObservableValue<Integer>>() {
                public ObservableValue<Integer> call(CellDataFeatures<ICFBamNmTokensTypeObj, Integer> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        int value = obj.getRequiredMaxLen();
                        Integer wrapped = new Integer(value);
                        ReadOnlyObjectWrapper<Integer> observable = new ReadOnlyObjectWrapper<Integer>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnMaxLen.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensTypeObj, Integer>, TableCell<ICFBamNmTokensTypeObj, Integer>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, Integer> call(
                        TableColumn<ICFBamNmTokensTypeObj, Integer> arg) {
                    return new CFInt32TableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxLen);
    tableColumnInitValue = new TableColumn<ICFBamNmTokensTypeObj, String>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamNmTokensTypeObj, String>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnNullValue = new TableColumn<ICFBamNmTokensTypeObj, String>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamNmTokensTypeObj, String>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamNmTokensTypeObj, String> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensTypeObj, String>, TableCell<ICFBamNmTokensTypeObj, String>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, String> call(
                        TableColumn<ICFBamNmTokensTypeObj, String> arg) {
                    return new CFNmTokensTableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnShowLines = new TableColumn<ICFBamNmTokensTypeObj, Short>("Show Lines");
    tableColumnShowLines.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamNmTokensTypeObj, Short> p) {
                    ICFBamNmTokensDefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredShowLines();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnShowLines.setCellFactory(
            new Callback<TableColumn<ICFBamNmTokensTypeObj, Short>, TableCell<ICFBamNmTokensTypeObj, Short>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, Short> call(
                        TableColumn<ICFBamNmTokensTypeObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamNmTokensTypeObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShowLines);
    tableColumnLookupDefSchema = new TableColumn<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj> p) {
                    ICFBamNmTokensTypeObj 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<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj>, TableCell<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamNmTokensTypeObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamNmTokensTypeObj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamNmTokensTypeObj> observable,
                        ICFBamNmTokensTypeObj oldValue, ICFBamNmTokensTypeObj 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.choseNmTokensType(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");
                }
                ICFBamNmTokensTypeObj selectedInstance = getJavaFXFocusAsNmTokensType();
                invokeWhenChosen.choseNmTokensType(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);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXId64GenPickerPane.java

public CFBamJavaFXId64GenPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamId64GenObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamId64GenObj> argDataCollection, ICFBamJavaFXId64GenChosen whenChosen) {
    super();/* w w w .java 2  s. com*/
    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<ICFBamId64GenObj>();
    tableColumnId = new TableColumn<ICFBamId64GenObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamId64GenObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamId64GenObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamId64GenObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamId64GenObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamId64GenObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamId64GenObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Boolean>, TableCell<ICFBamId64GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Boolean> call(TableColumn<ICFBamId64GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamId64GenObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Boolean>, TableCell<ICFBamId64GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Boolean> call(TableColumn<ICFBamId64GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamId64GenObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, Boolean>, TableCell<ICFBamId64GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Boolean> call(TableColumn<ICFBamId64GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamId64GenObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId64GenObj, 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<ICFBamId64GenObj, String>, TableCell<ICFBamId64GenObj, String>>() {
                @Override
                public TableCell<ICFBamId64GenObj, String> call(TableColumn<ICFBamId64GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamId64GenObj, Long>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamId64GenObj, Long>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamId64GenObj, Long>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamId64GenObj, Long>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamId64GenObj, Long>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamId64GenObj, Long>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamInt64DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Long value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnSlice = new TableColumn<ICFBamId64GenObj, Short>("Slice");
    tableColumnSlice.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId64GenObj, Short> p) {
                    ICFBamId64GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredSlice();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnSlice.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Short>, TableCell<ICFBamId64GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Short> call(TableColumn<ICFBamId64GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnSlice);
    tableColumnBlockSize = new TableColumn<ICFBamId64GenObj, Long>("BlockSize");
    tableColumnBlockSize.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId64GenObj, Long> p) {
                    ICFBamId64GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        long value = obj.getRequiredBlockSize();
                        Long wrapped = new Long(value);
                        ReadOnlyObjectWrapper<Long> observable = new ReadOnlyObjectWrapper<Long>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnBlockSize.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, Long>, TableCell<ICFBamId64GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId64GenObj, Long> call(TableColumn<ICFBamId64GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId64GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnBlockSize);
    tableColumnLookupDefSchema = new TableColumn<ICFBamId64GenObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamId64GenObj, ICFBamSchemaDefObj> p) {
                    ICFBamId64GenObj 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<ICFBamId64GenObj, ICFBamSchemaDefObj>, TableCell<ICFBamId64GenObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamId64GenObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamId64GenObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamId64GenObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    tableColumnLookupDispenser = new TableColumn<ICFBamId64GenObj, ICFBamTableObj>("Dispensing Table");
    tableColumnLookupDispenser.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId64GenObj, ICFBamTableObj>, ObservableValue<ICFBamTableObj>>() {
                public ObservableValue<ICFBamTableObj> call(
                        CellDataFeatures<ICFBamId64GenObj, ICFBamTableObj> p) {
                    ICFBamId64GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamTableObj ref = obj.getOptionalLookupDispenser();
                        ReadOnlyObjectWrapper<ICFBamTableObj> observable = new ReadOnlyObjectWrapper<ICFBamTableObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDispenser.setCellFactory(
            new Callback<TableColumn<ICFBamId64GenObj, ICFBamTableObj>, TableCell<ICFBamId64GenObj, ICFBamTableObj>>() {
                @Override
                public TableCell<ICFBamId64GenObj, ICFBamTableObj> call(
                        TableColumn<ICFBamId64GenObj, ICFBamTableObj> arg) {
                    return new CFReferenceTableCell<ICFBamId64GenObj, ICFBamTableObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDispenser);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamId64GenObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamId64GenObj> observable, ICFBamId64GenObj oldValue,
                ICFBamId64GenObj 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.choseId64Gen(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");
                }
                ICFBamId64GenObj selectedInstance = getJavaFXFocusAsId64Gen();
                invokeWhenChosen.choseId64Gen(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);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXId16GenPickerPane.java

public CFBamJavaFXId16GenPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamId16GenObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamId16GenObj> argDataCollection, ICFBamJavaFXId16GenChosen whenChosen) {
    super();//from  w w  w  . ja va2 s .c om
    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<ICFBamId16GenObj>();
    tableColumnId = new TableColumn<ICFBamId16GenObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Long>, TableCell<ICFBamId16GenObj, Long>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Long> call(TableColumn<ICFBamId16GenObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamId16GenObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamId16GenObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamId16GenObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamId16GenObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamId16GenObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamId16GenObj, Boolean>("Is Nullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Boolean>, TableCell<ICFBamId16GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Boolean> call(TableColumn<ICFBamId16GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnGenerateId = new TableColumn<ICFBamId16GenObj, Boolean>("Generate Id");
    tableColumnGenerateId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Boolean>, TableCell<ICFBamId16GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Boolean> call(TableColumn<ICFBamId16GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnGenerateId);
    tableColumnDefaultVisibility = new TableColumn<ICFBamId16GenObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, Boolean>, TableCell<ICFBamId16GenObj, Boolean>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Boolean> call(TableColumn<ICFBamId16GenObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnDbName = new TableColumn<ICFBamId16GenObj, String>("Db Name");
    tableColumnDbName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamId16GenObj, 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<ICFBamId16GenObj, String>, TableCell<ICFBamId16GenObj, String>>() {
                @Override
                public TableCell<ICFBamId16GenObj, String> call(TableColumn<ICFBamId16GenObj, String> arg) {
                    return new CFStringTableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDbName);
    tableColumnInitValue = new TableColumn<ICFBamId16GenObj, Short>("Init. Value");
    tableColumnInitValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalInitValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnInitValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnInitValue);
    tableColumnDefaultValue = new TableColumn<ICFBamId16GenObj, Short>("Default Value");
    tableColumnDefaultValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalDefaultValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnDefaultValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultValue);
    tableColumnMinValue = new TableColumn<ICFBamId16GenObj, Short>("Min. Value");
    tableColumnMinValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalMinValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMinValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMinValue);
    tableColumnMaxValue = new TableColumn<ICFBamId16GenObj, Short>("Max. Value");
    tableColumnMaxValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalMaxValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnMaxValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnMaxValue);
    tableColumnNullValue = new TableColumn<ICFBamId16GenObj, Short>("Null Value");
    tableColumnNullValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalNullValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnNullValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnNullValue);
    tableColumnUnknownValue = new TableColumn<ICFBamId16GenObj, Short>("Unknown Value");
    tableColumnUnknownValue.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamInt16DefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        Short value = obj.getOptionalUnknownValue();
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnUnknownValue.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnUnknownValue);
    tableColumnSlice = new TableColumn<ICFBamId16GenObj, Short>("Slice");
    tableColumnSlice.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamId16GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredSlice();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnSlice.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnSlice);
    tableColumnBlockSize = new TableColumn<ICFBamId16GenObj, Short>("BlockSize");
    tableColumnBlockSize.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, Short>, ObservableValue<Short>>() {
                public ObservableValue<Short> call(CellDataFeatures<ICFBamId16GenObj, Short> p) {
                    ICFBamId16GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        short value = obj.getRequiredBlockSize();
                        Short wrapped = new Short(value);
                        ReadOnlyObjectWrapper<Short> observable = new ReadOnlyObjectWrapper<Short>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnBlockSize.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, Short>, TableCell<ICFBamId16GenObj, Short>>() {
                @Override
                public TableCell<ICFBamId16GenObj, Short> call(TableColumn<ICFBamId16GenObj, Short> arg) {
                    return new CFInt16TableCell<ICFBamId16GenObj>();
                }
            });
    dataTable.getColumns().add(tableColumnBlockSize);
    tableColumnLookupDefSchema = new TableColumn<ICFBamId16GenObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamId16GenObj, ICFBamSchemaDefObj> p) {
                    ICFBamId16GenObj 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<ICFBamId16GenObj, ICFBamSchemaDefObj>, TableCell<ICFBamId16GenObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamId16GenObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamId16GenObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamId16GenObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    tableColumnLookupDispenser = new TableColumn<ICFBamId16GenObj, ICFBamTableObj>("Dispensing Table");
    tableColumnLookupDispenser.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamId16GenObj, ICFBamTableObj>, ObservableValue<ICFBamTableObj>>() {
                public ObservableValue<ICFBamTableObj> call(
                        CellDataFeatures<ICFBamId16GenObj, ICFBamTableObj> p) {
                    ICFBamId16GenObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamTableObj ref = obj.getOptionalLookupDispenser();
                        ReadOnlyObjectWrapper<ICFBamTableObj> observable = new ReadOnlyObjectWrapper<ICFBamTableObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupDispenser.setCellFactory(
            new Callback<TableColumn<ICFBamId16GenObj, ICFBamTableObj>, TableCell<ICFBamId16GenObj, ICFBamTableObj>>() {
                @Override
                public TableCell<ICFBamId16GenObj, ICFBamTableObj> call(
                        TableColumn<ICFBamId16GenObj, ICFBamTableObj> arg) {
                    return new CFReferenceTableCell<ICFBamId16GenObj, ICFBamTableObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDispenser);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamId16GenObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamId16GenObj> observable, ICFBamId16GenObj oldValue,
                ICFBamId16GenObj 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.choseId16Gen(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");
                }
                ICFBamId16GenObj selectedInstance = getJavaFXFocusAsId16Gen();
                invokeWhenChosen.choseId16Gen(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);
}