Java tutorial
// Description: Java 8 JavaFX View/Edit Pane implementation for UInt32Col. /* * CFBam * * Copyright (c) 2014-2016 Mark Sobkow * * This program is available as free software under the GNU GPL v3, or * under a commercial license from Mark Sobkow. For commercial licensing * details, please contact msobkow@sasktel.net. * * Under the terms of the GPL: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ package net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX; import java.math.*; import java.sql.*; import java.text.*; import java.util.*; import javafx.geometry.Orientation; import javafx.scene.control.ScrollPane; import javafx.scene.control.ScrollPane.ScrollBarPolicy; import net.sourceforge.msscodefactory.cflib.v2_7.CFLib.*; import net.sourceforge.msscodefactory.cflib.v2_7.CFLib.JavaFX.*; import org.apache.commons.codec.binary.Base64; import net.sourceforge.msscodefactory.cfsecurity.v2_7.CFSecurity.*; import net.sourceforge.msscodefactory.cfinternet.v2_7.CFInternet.*; import net.sourceforge.msscodefactory.cfbam.v2_7.CFBam.*; import net.sourceforge.msscodefactory.cfsecurity.v2_7.CFSecurityObj.*; import net.sourceforge.msscodefactory.cfinternet.v2_7.CFInternetObj.*; import net.sourceforge.msscodefactory.cfbam.v2_7.CFBamObj.*; /** * CFBamJavaFXUInt32ColViewEditPane JavaFX View/Edit Pane implementation * for UInt32Col. */ public class CFBamJavaFXUInt32ColViewEditPane extends CFSplitPane implements ICFBamJavaFXUInt32ColPaneCommon { protected ICFFormManager cfFormManager = null; protected ICFBamJavaFXSchema javafxSchema = null; protected ScrollPane attrScrollPane = null; protected CFGridPane attrPane = null; protected CFTabPane eltTabPane = null; public CFBamJavaFXUInt32ColViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema, ICFBamUInt32ColObj argFocus) { super(); final String S_ProcName = "construct-schema-focus"; if (formManager == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "formManager"); } cfFormManager = formManager; if (argSchema == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2, "argSchema"); } // argFocus is optional; focus may be set later during execution as // conditions of the runtime change. javafxSchema = argSchema; setJavaFXFocus(argFocus); attrPane = argSchema.getUInt32ColFactory().newAttrPane(cfFormManager, argFocus); attrScrollPane = new ScrollPane(); attrScrollPane.setFitToWidth(true); attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER); attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED); attrScrollPane.setContent(attrPane); eltTabPane = argSchema.getUInt32ColFactory().newEltTabPane(cfFormManager, argFocus); setOrientation(Orientation.VERTICAL); getItems().add(attrScrollPane); getItems().add(eltTabPane); } public ICFFormManager getCFFormManager() { return (cfFormManager); } public void setCFFormManager(ICFFormManager value) { final String S_ProcName = "setCFFormManager"; if (value == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1, "value"); } cfFormManager = value; } public ICFBamJavaFXSchema getJavaFXSchema() { return (javafxSchema); } public void setJavaFXFocus(ICFLibAnyObj value) { final String S_ProcName = "setJavaFXFocus"; if ((value == null) || (value instanceof ICFBamUInt32ColObj)) { super.setJavaFXFocus(value); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "value", value, "ICFBamUInt32ColObj"); } } public void setJavaFXFocusAsUInt32Col(ICFBamUInt32ColObj value) { setJavaFXFocus(value); } public ICFBamUInt32ColObj getJavaFXFocusAsUInt32Col() { return ((ICFBamUInt32ColObj) getJavaFXFocus()); } public void setPaneMode(CFPane.PaneMode value) { CFPane.PaneMode oldMode = getPaneMode(); if (oldMode == value) { return; } try { super.setPaneMode(value); ((ICFBamJavaFXUInt32ColPaneCommon) attrPane).setPaneMode(value); ((ICFBamJavaFXUInt32ColPaneCommon) eltTabPane).setPaneMode(value); } catch (Throwable t) { super.setPaneMode(oldMode); ((ICFBamJavaFXUInt32ColPaneCommon) attrPane).setPaneMode(oldMode); ((ICFBamJavaFXUInt32ColPaneCommon) eltTabPane).setPaneMode(oldMode); throw t; } } }