Example usage for javafx.beans.property ReadOnlyObjectWrapper ReadOnlyObjectWrapper

List of usage examples for javafx.beans.property ReadOnlyObjectWrapper ReadOnlyObjectWrapper

Introduction

In this page you can find the example usage for javafx.beans.property ReadOnlyObjectWrapper ReadOnlyObjectWrapper.

Prototype

public ReadOnlyObjectWrapper() 

Source Link

Document

The constructor of ReadOnlyObjectWrapper

Usage

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

public CFBamJavaFXDelSubDep3PickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamDelSubDep3Obj argFocus, ICFBamDelSubDep2Obj argContainer,
        Collection<ICFBamDelSubDep3Obj> argDataCollection, ICFBamJavaFXDelSubDep3Chosen whenChosen) {
    super();// www.jav a 2 s.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<ICFBamDelSubDep3Obj>();
    tableColumnId = new TableColumn<ICFBamDelSubDep3Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamDelSubDep3Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamDelSubDep3Obj, Long> p) {
                    ICFBamScopeObj 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<ICFBamDelSubDep3Obj, Long>, TableCell<ICFBamDelSubDep3Obj, Long>>() {
                @Override
                public TableCell<ICFBamDelSubDep3Obj, Long> call(TableColumn<ICFBamDelSubDep3Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamDelSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamDelSubDep3Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamDelSubDep3Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamDelSubDep3Obj, String> p) {
                    ICFBamDelSubDep3Obj 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<ICFBamDelSubDep3Obj, String>, TableCell<ICFBamDelSubDep3Obj, String>>() {
                @Override
                public TableCell<ICFBamDelSubDep3Obj, String> call(
                        TableColumn<ICFBamDelSubDep3Obj, String> arg) {
                    return new CFStringTableCell<ICFBamDelSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamDelSubDep3Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamDelSubDep3Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamDelSubDep3Obj, ICFBamRelationObj> p) {
                    ICFBamDelSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamDelSubDep3Obj, ICFBamRelationObj>, TableCell<ICFBamDelSubDep3Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamDelSubDep3Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamDelSubDep3Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamDelSubDep3Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj> p) {
                    ICFBamDelSubDep3Obj 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<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj>, TableCell<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamDelSubDep3Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamDelSubDep3Obj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamDelSubDep3Obj> observable,
                ICFBamDelSubDep3Obj oldValue, ICFBamDelSubDep3Obj 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.choseDelSubDep3(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");
                }
                ICFBamDelSubDep3Obj selectedInstance = getJavaFXFocusAsDelSubDep3();
                invokeWhenChosen.choseDelSubDep3(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.CFBamJavaFXPopSubDep2PickerPane.java

public CFBamJavaFXPopSubDep2PickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamPopSubDep2Obj argFocus, ICFBamPopSubDep1Obj argContainer,
        Collection<ICFBamPopSubDep2Obj> argDataCollection, ICFBamJavaFXPopSubDep2Chosen whenChosen) {
    super();//  w  ww  .  ja  v  a 2 s.  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<ICFBamPopSubDep2Obj>();
    tableColumnId = new TableColumn<ICFBamPopSubDep2Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep2Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamPopSubDep2Obj, Long> p) {
                    ICFBamScopeObj 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<ICFBamPopSubDep2Obj, Long>, TableCell<ICFBamPopSubDep2Obj, Long>>() {
                @Override
                public TableCell<ICFBamPopSubDep2Obj, Long> call(TableColumn<ICFBamPopSubDep2Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamPopSubDep2Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamPopSubDep2Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep2Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamPopSubDep2Obj, String> p) {
                    ICFBamPopSubDep2Obj 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<ICFBamPopSubDep2Obj, String>, TableCell<ICFBamPopSubDep2Obj, String>>() {
                @Override
                public TableCell<ICFBamPopSubDep2Obj, String> call(
                        TableColumn<ICFBamPopSubDep2Obj, String> arg) {
                    return new CFStringTableCell<ICFBamPopSubDep2Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamPopSubDep2Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep2Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamPopSubDep2Obj, ICFBamRelationObj> p) {
                    ICFBamPopSubDep2Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamPopSubDep2Obj, ICFBamRelationObj>, TableCell<ICFBamPopSubDep2Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamPopSubDep2Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamPopSubDep2Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamPopSubDep2Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj> p) {
                    ICFBamPopSubDep2Obj 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<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj>, TableCell<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamPopSubDep2Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamPopSubDep2Obj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamPopSubDep2Obj> observable,
                ICFBamPopSubDep2Obj oldValue, ICFBamPopSubDep2Obj 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.chosePopSubDep2(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");
                }
                ICFBamPopSubDep2Obj selectedInstance = getJavaFXFocusAsPopSubDep2();
                invokeWhenChosen.chosePopSubDep2(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.CFBamJavaFXPopSubDep3PickerPane.java

public CFBamJavaFXPopSubDep3PickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamPopSubDep3Obj argFocus, ICFBamPopSubDep2Obj argContainer,
        Collection<ICFBamPopSubDep3Obj> argDataCollection, ICFBamJavaFXPopSubDep3Chosen whenChosen) {
    super();/* w  ww . j  av  a 2 s.  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<ICFBamPopSubDep3Obj>();
    tableColumnId = new TableColumn<ICFBamPopSubDep3Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamPopSubDep3Obj, Long> p) {
                    ICFBamScopeObj 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<ICFBamPopSubDep3Obj, Long>, TableCell<ICFBamPopSubDep3Obj, Long>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, Long> call(TableColumn<ICFBamPopSubDep3Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamPopSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamPopSubDep3Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamPopSubDep3Obj, String> p) {
                    ICFBamPopSubDep3Obj 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<ICFBamPopSubDep3Obj, String>, TableCell<ICFBamPopSubDep3Obj, String>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, String> call(
                        TableColumn<ICFBamPopSubDep3Obj, String> arg) {
                    return new CFStringTableCell<ICFBamPopSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamPopSubDep3Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamRelationObj> p) {
                    ICFBamPopSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamPopSubDep3Obj, ICFBamRelationObj>, TableCell<ICFBamPopSubDep3Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamPopSubDep3Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamPopSubDep3Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj> p) {
                    ICFBamPopSubDep3Obj 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<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>, TableCell<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamPopSubDep3Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamPopSubDep3Obj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamPopSubDep3Obj> observable,
                ICFBamPopSubDep3Obj oldValue, ICFBamPopSubDep3Obj 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.chosePopSubDep3(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");
                }
                ICFBamPopSubDep3Obj selectedInstance = getJavaFXFocusAsPopSubDep3();
                invokeWhenChosen.chosePopSubDep3(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.CFBamJavaFXClearTopDepPickerPane.java

public CFBamJavaFXClearTopDepPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearTopDepObj argFocus, ICFBamTableObj argContainer,
        Collection<ICFBamClearTopDepObj> argDataCollection, ICFBamJavaFXClearTopDepChosen whenChosen) {
    super();//w  w  w.ja  v  a2 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<ICFBamClearTopDepObj>();
    tableColumnId = new TableColumn<ICFBamClearTopDepObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearTopDepObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamClearTopDepObj, Long> p) {
                    ICFBamScopeObj 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<ICFBamClearTopDepObj, Long>, TableCell<ICFBamClearTopDepObj, Long>>() {
                @Override
                public TableCell<ICFBamClearTopDepObj, Long> call(TableColumn<ICFBamClearTopDepObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamClearTopDepObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamClearTopDepObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearTopDepObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamClearTopDepObj, String> p) {
                    ICFBamClearTopDepObj 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<ICFBamClearTopDepObj, String>, TableCell<ICFBamClearTopDepObj, String>>() {
                @Override
                public TableCell<ICFBamClearTopDepObj, String> call(
                        TableColumn<ICFBamClearTopDepObj, String> arg) {
                    return new CFStringTableCell<ICFBamClearTopDepObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamClearTopDepObj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearTopDepObj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamClearTopDepObj, ICFBamRelationObj> p) {
                    ICFBamClearTopDepObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamClearTopDepObj, ICFBamRelationObj>, TableCell<ICFBamClearTopDepObj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamClearTopDepObj, ICFBamRelationObj> call(
                        TableColumn<ICFBamClearTopDepObj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearTopDepObj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamClearTopDepObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearTopDepObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamClearTopDepObj, ICFBamSchemaDefObj> p) {
                    ICFBamClearTopDepObj 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<ICFBamClearTopDepObj, ICFBamSchemaDefObj>, TableCell<ICFBamClearTopDepObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamClearTopDepObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamClearTopDepObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearTopDepObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamClearTopDepObj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamClearTopDepObj> observable,
                        ICFBamClearTopDepObj oldValue, ICFBamClearTopDepObj 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.choseClearTopDep(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");
                }
                ICFBamClearTopDepObj selectedInstance = getJavaFXFocusAsClearTopDep();
                invokeWhenChosen.choseClearTopDep(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.CFBamJavaFXClearSubDep1PickerPane.java

public CFBamJavaFXClearSubDep1PickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearSubDep1Obj argFocus, ICFBamClearTopDepObj argContainer,
        Collection<ICFBamClearSubDep1Obj> argDataCollection, ICFBamJavaFXClearSubDep1Chosen whenChosen) {
    super();/*from  w ww .  ja  v  a 2 s . 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<ICFBamClearSubDep1Obj>();
    tableColumnId = new TableColumn<ICFBamClearSubDep1Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamClearSubDep1Obj, Long> p) {
                    ICFBamScopeObj 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<ICFBamClearSubDep1Obj, Long>, TableCell<ICFBamClearSubDep1Obj, Long>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, Long> call(
                        TableColumn<ICFBamClearSubDep1Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamClearSubDep1Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamClearSubDep1Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamClearSubDep1Obj, String> p) {
                    ICFBamClearSubDep1Obj 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<ICFBamClearSubDep1Obj, String>, TableCell<ICFBamClearSubDep1Obj, String>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, String> call(
                        TableColumn<ICFBamClearSubDep1Obj, String> arg) {
                    return new CFStringTableCell<ICFBamClearSubDep1Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamClearSubDep1Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamRelationObj> p) {
                    ICFBamClearSubDep1Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep1Obj, ICFBamRelationObj>, TableCell<ICFBamClearSubDep1Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamClearSubDep1Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep1Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj> p) {
                    ICFBamClearSubDep1Obj 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<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>, TableCell<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep1Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamClearSubDep1Obj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamClearSubDep1Obj> observable,
                        ICFBamClearSubDep1Obj oldValue, ICFBamClearSubDep1Obj 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.choseClearSubDep1(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");
                }
                ICFBamClearSubDep1Obj selectedInstance = getJavaFXFocusAsClearSubDep1();
                invokeWhenChosen.choseClearSubDep1(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.CFBamJavaFXClearSubDep2PickerPane.java

public CFBamJavaFXClearSubDep2PickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearSubDep2Obj argFocus, ICFBamClearSubDep1Obj argContainer,
        Collection<ICFBamClearSubDep2Obj> argDataCollection, ICFBamJavaFXClearSubDep2Chosen whenChosen) {
    super();/*from w w  w  .  j a v  a 2s.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<ICFBamClearSubDep2Obj>();
    tableColumnId = new TableColumn<ICFBamClearSubDep2Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamClearSubDep2Obj, Long> p) {
                    ICFBamScopeObj 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<ICFBamClearSubDep2Obj, Long>, TableCell<ICFBamClearSubDep2Obj, Long>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, Long> call(
                        TableColumn<ICFBamClearSubDep2Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamClearSubDep2Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamClearSubDep2Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamClearSubDep2Obj, String> p) {
                    ICFBamClearSubDep2Obj 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<ICFBamClearSubDep2Obj, String>, TableCell<ICFBamClearSubDep2Obj, String>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, String> call(
                        TableColumn<ICFBamClearSubDep2Obj, String> arg) {
                    return new CFStringTableCell<ICFBamClearSubDep2Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamClearSubDep2Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamRelationObj> p) {
                    ICFBamClearSubDep2Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep2Obj, ICFBamRelationObj>, TableCell<ICFBamClearSubDep2Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamClearSubDep2Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep2Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj> p) {
                    ICFBamClearSubDep2Obj 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<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>, TableCell<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep2Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamClearSubDep2Obj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamClearSubDep2Obj> observable,
                        ICFBamClearSubDep2Obj oldValue, ICFBamClearSubDep2Obj 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.choseClearSubDep2(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");
                }
                ICFBamClearSubDep2Obj selectedInstance = getJavaFXFocusAsClearSubDep2();
                invokeWhenChosen.choseClearSubDep2(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.CFBamJavaFXClearSubDep3PickerPane.java

public CFBamJavaFXClearSubDep3PickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearSubDep3Obj argFocus, ICFBamClearSubDep2Obj argContainer,
        Collection<ICFBamClearSubDep3Obj> argDataCollection, ICFBamJavaFXClearSubDep3Chosen whenChosen) {
    super();//from w w w  .jav a  2s. co  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<ICFBamClearSubDep3Obj>();
    tableColumnId = new TableColumn<ICFBamClearSubDep3Obj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamClearSubDep3Obj, Long> p) {
                    ICFBamScopeObj 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<ICFBamClearSubDep3Obj, Long>, TableCell<ICFBamClearSubDep3Obj, Long>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, Long> call(
                        TableColumn<ICFBamClearSubDep3Obj, Long> arg) {
                    return new CFInt64TableCell<ICFBamClearSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamClearSubDep3Obj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamClearSubDep3Obj, String> p) {
                    ICFBamClearSubDep3Obj 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<ICFBamClearSubDep3Obj, String>, TableCell<ICFBamClearSubDep3Obj, String>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, String> call(
                        TableColumn<ICFBamClearSubDep3Obj, String> arg) {
                    return new CFStringTableCell<ICFBamClearSubDep3Obj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnLookupRelation = new TableColumn<ICFBamClearSubDep3Obj, ICFBamRelationObj>("Relation");
    tableColumnLookupRelation.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamRelationObj>, ObservableValue<ICFBamRelationObj>>() {
                public ObservableValue<ICFBamRelationObj> call(
                        CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamRelationObj> p) {
                    ICFBamClearSubDep3Obj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamRelationObj ref = obj.getRequiredLookupRelation();
                        ReadOnlyObjectWrapper<ICFBamRelationObj> observable = new ReadOnlyObjectWrapper<ICFBamRelationObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRelation.setCellFactory(
            new Callback<TableColumn<ICFBamClearSubDep3Obj, ICFBamRelationObj>, TableCell<ICFBamClearSubDep3Obj, ICFBamRelationObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, ICFBamRelationObj> call(
                        TableColumn<ICFBamClearSubDep3Obj, ICFBamRelationObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep3Obj, ICFBamRelationObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRelation);
    tableColumnLookupDefSchema = new TableColumn<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj> p) {
                    ICFBamClearSubDep3Obj 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<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>, TableCell<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamClearSubDep3Obj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    dataTable.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener<ICFBamClearSubDep3Obj>() {
                @Override
                public void changed(ObservableValue<? extends ICFBamClearSubDep3Obj> observable,
                        ICFBamClearSubDep3Obj oldValue, ICFBamClearSubDep3Obj 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.choseClearSubDep3(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");
                }
                ICFBamClearSubDep3Obj selectedInstance = getJavaFXFocusAsClearSubDep3();
                invokeWhenChosen.choseClearSubDep3(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.CFBamJavaFXSchemaRefPickerPane.java

public CFBamJavaFXSchemaRefPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaRefObj argFocus, ICFBamSchemaDefObj argContainer,
        Collection<ICFBamSchemaRefObj> argDataCollection, ICFBamJavaFXSchemaRefChosen whenChosen) {
    super();/*from  w w  w . j a  v  a2  s.  co 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<ICFBamSchemaRefObj>();
    tableColumnId = new TableColumn<ICFBamSchemaRefObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaRefObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamSchemaRefObj, Long> p) {
                    ICFBamScopeObj 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<ICFBamSchemaRefObj, Long>, TableCell<ICFBamSchemaRefObj, Long>>() {
                @Override
                public TableCell<ICFBamSchemaRefObj, Long> call(TableColumn<ICFBamSchemaRefObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamSchemaRefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamSchemaRefObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaRefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaRefObj, String> p) {
                    ICFBamSchemaRefObj 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<ICFBamSchemaRefObj, String>, TableCell<ICFBamSchemaRefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaRefObj, String> call(TableColumn<ICFBamSchemaRefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaRefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnRefModelName = new TableColumn<ICFBamSchemaRefObj, String>("Ref. Model Name");
    tableColumnRefModelName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaRefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaRefObj, String> p) {
                    ICFBamSchemaRefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredRefModelName();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnRefModelName.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaRefObj, String>, TableCell<ICFBamSchemaRefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaRefObj, String> call(TableColumn<ICFBamSchemaRefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaRefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnRefModelName);
    tableColumnIncludeRoot = new TableColumn<ICFBamSchemaRefObj, String>("Include Root");
    tableColumnIncludeRoot.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaRefObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamSchemaRefObj, String> p) {
                    ICFBamSchemaRefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        String value = obj.getRequiredIncludeRoot();
                        ReadOnlyObjectWrapper<String> observable = new ReadOnlyObjectWrapper<String>();
                        observable.setValue(value);
                        return (observable);
                    }
                }
            });
    tableColumnIncludeRoot.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaRefObj, String>, TableCell<ICFBamSchemaRefObj, String>>() {
                @Override
                public TableCell<ICFBamSchemaRefObj, String> call(TableColumn<ICFBamSchemaRefObj, String> arg) {
                    return new CFStringTableCell<ICFBamSchemaRefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIncludeRoot);
    tableColumnLookupRefSchema = new TableColumn<ICFBamSchemaRefObj, ICFBamSchemaDefObj>("Referenced Schema");
    tableColumnLookupRefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamSchemaRefObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamSchemaRefObj, ICFBamSchemaDefObj> p) {
                    ICFBamSchemaRefObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamSchemaDefObj ref = obj.getOptionalLookupRefSchema();
                        ReadOnlyObjectWrapper<ICFBamSchemaDefObj> observable = new ReadOnlyObjectWrapper<ICFBamSchemaDefObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupRefSchema.setCellFactory(
            new Callback<TableColumn<ICFBamSchemaRefObj, ICFBamSchemaDefObj>, TableCell<ICFBamSchemaRefObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamSchemaRefObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamSchemaRefObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamSchemaRefObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupRefSchema);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamSchemaRefObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamSchemaRefObj> observable,
                ICFBamSchemaRefObj oldValue, ICFBamSchemaRefObj 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.choseSchemaRef(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");
                }
                ICFBamSchemaRefObj selectedInstance = getJavaFXFocusAsSchemaRef();
                invokeWhenChosen.choseSchemaRef(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.CFBamJavaFXParamPickerPane.java

public CFBamJavaFXParamPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamParamObj argFocus, ICFBamServerMethodObj argContainer,
        Collection<ICFBamParamObj> argDataCollection, ICFBamJavaFXParamChosen whenChosen) {
    super();/* w  w  w  . ja  v a 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<ICFBamParamObj>();
    tableColumnId = new TableColumn<ICFBamParamObj, Long>("Id");
    tableColumnId
            .setCellValueFactory(new Callback<CellDataFeatures<ICFBamParamObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamParamObj, Long> p) {
                    ICFBamParamObj 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<ICFBamParamObj, Long>, TableCell<ICFBamParamObj, Long>>() {
                @Override
                public TableCell<ICFBamParamObj, Long> call(TableColumn<ICFBamParamObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamParamObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamParamObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamParamObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamParamObj, String> p) {
                    ICFBamParamObj 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<ICFBamParamObj, String>, TableCell<ICFBamParamObj, String>>() {
                @Override
                public TableCell<ICFBamParamObj, String> call(TableColumn<ICFBamParamObj, String> arg) {
                    return new CFStringTableCell<ICFBamParamObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortDescription = new TableColumn<ICFBamParamObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamParamObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamParamObj, String> p) {
                    ICFBamParamObj 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<ICFBamParamObj, String>, TableCell<ICFBamParamObj, String>>() {
                @Override
                public TableCell<ICFBamParamObj, String> call(TableColumn<ICFBamParamObj, String> arg) {
                    return new CFStringTableCell<ICFBamParamObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamParamObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamParamObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamParamObj, String> p) {
                    ICFBamParamObj 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<ICFBamParamObj, String>, TableCell<ICFBamParamObj, String>>() {
                @Override
                public TableCell<ICFBamParamObj, String> call(TableColumn<ICFBamParamObj, String> arg) {
                    return new CFStringTableCell<ICFBamParamObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsNullable = new TableColumn<ICFBamParamObj, Boolean>("IsNullable");
    tableColumnIsNullable.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamParamObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamParamObj, Boolean> p) {
                    ICFBamParamObj 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<ICFBamParamObj, Boolean>, TableCell<ICFBamParamObj, Boolean>>() {
                @Override
                public TableCell<ICFBamParamObj, Boolean> call(TableColumn<ICFBamParamObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamParamObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsNullable);
    tableColumnLookupDefSchema = new TableColumn<ICFBamParamObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamParamObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamParamObj, ICFBamSchemaDefObj> p) {
                    ICFBamParamObj 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<ICFBamParamObj, ICFBamSchemaDefObj>, TableCell<ICFBamParamObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamParamObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamParamObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamParamObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    tableColumnLookupType = new TableColumn<ICFBamParamObj, ICFBamValueObj>("Type Specification");
    tableColumnLookupType.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamParamObj, ICFBamValueObj>, ObservableValue<ICFBamValueObj>>() {
                public ObservableValue<ICFBamValueObj> call(
                        CellDataFeatures<ICFBamParamObj, ICFBamValueObj> p) {
                    ICFBamParamObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamValueObj ref = obj.getRequiredLookupType();
                        ReadOnlyObjectWrapper<ICFBamValueObj> observable = new ReadOnlyObjectWrapper<ICFBamValueObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupType.setCellFactory(
            new Callback<TableColumn<ICFBamParamObj, ICFBamValueObj>, TableCell<ICFBamParamObj, ICFBamValueObj>>() {
                @Override
                public TableCell<ICFBamParamObj, ICFBamValueObj> call(
                        TableColumn<ICFBamParamObj, ICFBamValueObj> arg) {
                    return new CFReferenceTableCell<ICFBamParamObj, ICFBamValueObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupType);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamParamObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamParamObj> observable, ICFBamParamObj oldValue,
                ICFBamParamObj 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.choseParam(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");
                }
                ICFBamParamObj selectedInstance = getJavaFXFocusAsParam();
                invokeWhenChosen.choseParam(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.CFBamJavaFXIndexColPickerPane.java

public CFBamJavaFXIndexColPickerPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamIndexColObj argFocus, ICFBamIndexObj argContainer,
        Collection<ICFBamIndexColObj> argDataCollection, ICFBamJavaFXIndexColChosen whenChosen) {
    super();//  w  ww .j  a  v  a2 s  .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<ICFBamIndexColObj>();
    tableColumnId = new TableColumn<ICFBamIndexColObj, Long>("Id");
    tableColumnId.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, Long>, ObservableValue<Long>>() {
                public ObservableValue<Long> call(CellDataFeatures<ICFBamIndexColObj, Long> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, Long>, TableCell<ICFBamIndexColObj, Long>>() {
                @Override
                public TableCell<ICFBamIndexColObj, Long> call(TableColumn<ICFBamIndexColObj, Long> arg) {
                    return new CFInt64TableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnId);
    tableColumnName = new TableColumn<ICFBamIndexColObj, String>("Name");
    tableColumnName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamIndexColObj, String> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, String>, TableCell<ICFBamIndexColObj, String>>() {
                @Override
                public TableCell<ICFBamIndexColObj, String> call(TableColumn<ICFBamIndexColObj, String> arg) {
                    return new CFStringTableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnName);
    tableColumnShortName = new TableColumn<ICFBamIndexColObj, String>("Short Name");
    tableColumnShortName.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamIndexColObj, String> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, String>, TableCell<ICFBamIndexColObj, String>>() {
                @Override
                public TableCell<ICFBamIndexColObj, String> call(TableColumn<ICFBamIndexColObj, String> arg) {
                    return new CFStringTableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortName);
    tableColumnLabel = new TableColumn<ICFBamIndexColObj, String>("Label");
    tableColumnLabel.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamIndexColObj, String> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, String>, TableCell<ICFBamIndexColObj, String>>() {
                @Override
                public TableCell<ICFBamIndexColObj, String> call(TableColumn<ICFBamIndexColObj, String> arg) {
                    return new CFStringTableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLabel);
    tableColumnShortDescription = new TableColumn<ICFBamIndexColObj, String>("Short Description");
    tableColumnShortDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamIndexColObj, String> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, String>, TableCell<ICFBamIndexColObj, String>>() {
                @Override
                public TableCell<ICFBamIndexColObj, String> call(TableColumn<ICFBamIndexColObj, String> arg) {
                    return new CFStringTableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnShortDescription);
    tableColumnDescription = new TableColumn<ICFBamIndexColObj, String>("Description");
    tableColumnDescription.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, String>, ObservableValue<String>>() {
                public ObservableValue<String> call(CellDataFeatures<ICFBamIndexColObj, String> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, String>, TableCell<ICFBamIndexColObj, String>>() {
                @Override
                public TableCell<ICFBamIndexColObj, String> call(TableColumn<ICFBamIndexColObj, String> arg) {
                    return new CFStringTableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDescription);
    tableColumnIsAscending = new TableColumn<ICFBamIndexColObj, Boolean>("IsAscending");
    tableColumnIsAscending.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamIndexColObj, Boolean> p) {
                    ICFBamIndexColObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        boolean value = obj.getRequiredIsAscending();
                        Boolean wrapped = new Boolean(value);
                        ReadOnlyObjectWrapper<Boolean> observable = new ReadOnlyObjectWrapper<Boolean>();
                        observable.setValue(wrapped);
                        return (observable);
                    }
                }
            });
    tableColumnIsAscending.setCellFactory(
            new Callback<TableColumn<ICFBamIndexColObj, Boolean>, TableCell<ICFBamIndexColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamIndexColObj, Boolean> call(TableColumn<ICFBamIndexColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnIsAscending);
    tableColumnDefaultVisibility = new TableColumn<ICFBamIndexColObj, Boolean>("Default Visibility");
    tableColumnDefaultVisibility.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, Boolean>, ObservableValue<Boolean>>() {
                public ObservableValue<Boolean> call(CellDataFeatures<ICFBamIndexColObj, Boolean> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, Boolean>, TableCell<ICFBamIndexColObj, Boolean>>() {
                @Override
                public TableCell<ICFBamIndexColObj, Boolean> call(TableColumn<ICFBamIndexColObj, Boolean> arg) {
                    return new CFBoolTableCell<ICFBamIndexColObj>();
                }
            });
    dataTable.getColumns().add(tableColumnDefaultVisibility);
    tableColumnLookupDefSchema = new TableColumn<ICFBamIndexColObj, ICFBamSchemaDefObj>(
            "Defining Schema Definition");
    tableColumnLookupDefSchema.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, ICFBamSchemaDefObj>, ObservableValue<ICFBamSchemaDefObj>>() {
                public ObservableValue<ICFBamSchemaDefObj> call(
                        CellDataFeatures<ICFBamIndexColObj, ICFBamSchemaDefObj> p) {
                    ICFBamIndexColObj 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<ICFBamIndexColObj, ICFBamSchemaDefObj>, TableCell<ICFBamIndexColObj, ICFBamSchemaDefObj>>() {
                @Override
                public TableCell<ICFBamIndexColObj, ICFBamSchemaDefObj> call(
                        TableColumn<ICFBamIndexColObj, ICFBamSchemaDefObj> arg) {
                    return new CFReferenceTableCell<ICFBamIndexColObj, ICFBamSchemaDefObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupDefSchema);
    tableColumnLookupColumn = new TableColumn<ICFBamIndexColObj, ICFBamValueObj>("Column");
    tableColumnLookupColumn.setCellValueFactory(
            new Callback<CellDataFeatures<ICFBamIndexColObj, ICFBamValueObj>, ObservableValue<ICFBamValueObj>>() {
                public ObservableValue<ICFBamValueObj> call(
                        CellDataFeatures<ICFBamIndexColObj, ICFBamValueObj> p) {
                    ICFBamIndexColObj obj = p.getValue();
                    if (obj == null) {
                        return (null);
                    } else {
                        ICFBamValueObj ref = obj.getRequiredLookupColumn();
                        ReadOnlyObjectWrapper<ICFBamValueObj> observable = new ReadOnlyObjectWrapper<ICFBamValueObj>();
                        observable.setValue(ref);
                        return (observable);
                    }
                }
            });
    tableColumnLookupColumn.setCellFactory(
            new Callback<TableColumn<ICFBamIndexColObj, ICFBamValueObj>, TableCell<ICFBamIndexColObj, ICFBamValueObj>>() {
                @Override
                public TableCell<ICFBamIndexColObj, ICFBamValueObj> call(
                        TableColumn<ICFBamIndexColObj, ICFBamValueObj> arg) {
                    return new CFReferenceTableCell<ICFBamIndexColObj, ICFBamValueObj>();
                }
            });
    dataTable.getColumns().add(tableColumnLookupColumn);
    dataTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ICFBamIndexColObj>() {
        @Override
        public void changed(ObservableValue<? extends ICFBamIndexColObj> observable, ICFBamIndexColObj oldValue,
                ICFBamIndexColObj 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.choseIndexCol(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");
                }
                ICFBamIndexColObj selectedInstance = getJavaFXFocusAsIndexCol();
                invokeWhenChosen.choseIndexCol(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);
}