List of usage examples for javafx.scene.layout ColumnConstraints ColumnConstraints
public ColumnConstraints(double width)
From source file:Main.java
private GridPane createGridPane() { GridPane gridpane = new GridPane(); gridpane.setPadding(new Insets(5)); gridpane.setHgap(5);//from w ww. j a v a2 s. co m gridpane.setVgap(5); ColumnConstraints column1 = new ColumnConstraints(100); ColumnConstraints column2 = new ColumnConstraints(50, 150, 300); column2.setHgrow(Priority.ALWAYS); gridpane.getColumnConstraints().addAll(column1, column2); Label fNameLbl = new Label("First Name"); TextField fNameFld = new TextField(); Label lNameLbl = new Label("Last Name"); TextField lNameFld = new TextField(); Button saveButton = new Button("Save"); GridPane.setHalignment(fNameLbl, HPos.RIGHT); GridPane.setHalignment(lNameLbl, HPos.RIGHT); GridPane.setHalignment(fNameFld, HPos.LEFT); GridPane.setHalignment(lNameFld, HPos.LEFT); GridPane.setHalignment(saveButton, HPos.RIGHT); gridpane.add(fNameLbl, 0, 0); gridpane.add(fNameFld, 1, 0); gridpane.add(lNameLbl, 0, 1); gridpane.add(lNameFld, 1, 1); gridpane.add(saveButton, 1, 2); return gridpane; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXScopeAttrPane.java
public CFBamJavaFXScopeAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamScopeObj argFocus) {// w ww. jav a2 s . c om super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsScope(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:AudioPlayer3.java
@Override protected Node initView() { final Button openButton = createOpenButton(); controlPanel = createControlPanel(); volumeSlider = createSlider("volumeSlider"); statusLabel = createLabel("Buffering", "statusDisplay"); positionSlider = createSlider("positionSlider"); totalDurationLabel = createLabel("00:00", "mediaText"); currentTimeLabel = createLabel("00:00", "mediaText"); positionSlider.valueChangingProperty().addListener(new PositionListener()); final ImageView volLow = new ImageView(); volLow.setId("volumeLow"); final ImageView volHigh = new ImageView(); volHigh.setId("volumeHigh"); final GridPane gp = new GridPane(); gp.setHgap(1);// w w w . j a va2s . c o m gp.setVgap(1); gp.setPadding(new Insets(10)); final ColumnConstraints buttonCol = new ColumnConstraints(100); final ColumnConstraints spacerCol = new ColumnConstraints(40, 80, 80); final ColumnConstraints middleCol = new ColumnConstraints(); middleCol.setHgrow(Priority.ALWAYS); gp.getColumnConstraints().addAll(buttonCol, spacerCol, middleCol, spacerCol, buttonCol); GridPane.setValignment(openButton, VPos.BOTTOM); GridPane.setHalignment(volHigh, HPos.RIGHT); GridPane.setValignment(volumeSlider, VPos.TOP); GridPane.setHalignment(statusLabel, HPos.RIGHT); GridPane.setValignment(statusLabel, VPos.TOP); GridPane.setHalignment(currentTimeLabel, HPos.RIGHT); gp.add(openButton, 0, 0, 1, 3); gp.add(volLow, 1, 0); gp.add(volHigh, 1, 0); gp.add(volumeSlider, 1, 1); gp.add(controlPanel, 2, 0, 1, 2); gp.add(statusLabel, 3, 1); gp.add(currentTimeLabel, 1, 2); gp.add(positionSlider, 2, 2); gp.add(totalDurationLabel, 3, 2); return gp; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXEnumTagAttrPane.java
public CFBamJavaFXEnumTagAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamEnumTagObj argFocus) {// w w w .j av a2 s .c o m super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsEnumTag(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelEnumCode(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorEnumCode(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfbamcustom.v2_7.CFBamCustomEditor.CFBamCustomEditorEnumTagAttrPane.java
public CFBamCustomEditorEnumTagAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamEnumTagObj argFocus) {//w ww. j a v a 2 s .c om super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsEnumTag(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelEnumCode(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorEnumCode(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXSchemaRefAttrPane.java
public CFBamJavaFXSchemaRefAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamSchemaRefObj argFocus) {/*from w w w. j a va2 s. c om*/ super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsSchemaRef(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupRefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupRefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelRefModelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorRefModelName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelIncludeRoot(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIncludeRoot(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXDelDepAttrPane.java
public CFBamJavaFXDelDepAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamDelDepObj argFocus) {// ww w . j a va 2s .c o m super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsDelDep(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupRelation(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupRelation(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXPopDepAttrPane.java
public CFBamJavaFXPopDepAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamPopDepObj argFocus) {/*from w w w. j av a 2 s . c o m*/ super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsPopDep(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupRelation(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupRelation(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXClearDepAttrPane.java
public CFBamJavaFXClearDepAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamClearDepObj argFocus) {/*from w w w. j a v a2 s. co m*/ super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsClearDep(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupRelation(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupRelation(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }
From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXValueAttrPane.java
public CFBamJavaFXValueAttrPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamValueObj argFocus) {/*from ww w . jav a 2 s . co m*/ super(); Control ctrl; CFLabel label; CFReferenceEditor reference; 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"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocusAsValue(argFocus); setPadding(new Insets(5)); setHgap(5); setVgap(5); setAlignment(Pos.CENTER); ColumnConstraints column1 = new ColumnConstraints(125); ColumnConstraints column2 = new ColumnConstraints(125, 300, 500); column2.setHgrow(Priority.ALWAYS); getColumnConstraints().addAll(column1, column2); int gridRow = 0; label = getJavaFXLabelLookupDefSchema(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); reference = getJavaFXReferenceLookupDefSchema(); setHalignment(reference, HPos.LEFT); add(reference, 1, gridRow); gridRow++; label = getJavaFXLabelId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortName(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortName(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelLabel(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorLabel(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelShortDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorShortDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDescription(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDescription(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelIsNullable(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorIsNullable(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelGenerateId(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorGenerateId(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; label = getJavaFXLabelDefaultVisibility(); setHalignment(label, HPos.LEFT); add(label, 0, gridRow); ctrl = getJavaFXEditorDefaultVisibility(); setHalignment(ctrl, HPos.LEFT); add(ctrl, 1, gridRow); gridRow++; populateFields(); adjustComponentEnableStates(); javafxIsInitializing = false; }