Example usage for javafx.scene.control ScrollPane ScrollPane

List of usage examples for javafx.scene.control ScrollPane ScrollPane

Introduction

In this page you can find the example usage for javafx.scene.control ScrollPane ScrollPane.

Prototype

public ScrollPane() 

Source Link

Document

Creates a new ScrollPane.

Usage

From source file:Main.java

License:asdf

@Override
public void start(final Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);// ww w . j a  v  a  2s  .co m
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    VBox root = new VBox();

    final WebView browser = new WebView();
    final WebEngine webEngine = browser.getEngine();

    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setContent(browser);

    webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<State>() {
        @Override
        public void changed(ObservableValue ov, State oldState, State newState) {

            if (newState == Worker.State.SUCCEEDED) {
                stage.setTitle(webEngine.getLocation());
                System.out.println("called");
            }

        }
    });
    webEngine.load("http://javafx.com");

    webEngine.loadContent("<b>asdf</b>");

    root.getChildren().addAll(scrollPane);
    scene.setRoot(root);

    stage.setScene(scene);
    stage.show();
}

From source file:org.jamocha.gui.JamochaGui.java

private Scene generateScene() {
    final TabPane tabPane = new TabPane();
    tabPane.setSide(Side.LEFT);//ww  w. jav  a2  s.  co  m

    this.log = new TextArea();
    final Tab logTab = new Tab("Log");
    logTab.setContent(this.log);
    logTab.setClosable(false);

    final Tab networkTab = new Tab("Network");
    networkTab.setClosable(false);
    final ScrollPane scrollPane = new ScrollPane();
    networkTab.setContent(scrollPane);

    this.networkVisualisation = new NetworkVisualisation(this.jamocha.getNetwork());
    this.networkVisualisation.setTranslateX(10);
    this.networkVisualisation.setTranslateY(10);
    this.networkVisualisation.update();
    scrollPane.setContent(this.networkVisualisation);

    tabPane.getTabs().addAll(logTab, networkTab);

    final Scene scene = new Scene(tabPane);
    tabPane.prefHeightProperty().bind(scene.heightProperty());
    tabPane.prefWidthProperty().bind(scene.widthProperty());
    return scene;
}

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

public CFBamJavaFXChainViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamChainObj argFocus) {/*from   ww w .ja  v  a 2s .c o  m*/
    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.getChainFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

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

public CFBamJavaFXParamViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamParamObj argFocus) {/*from  www.jav  a2  s . c  o  m*/
    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.getParamFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

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

public CFBamJavaFXScopeViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamScopeObj argFocus) {/* ww w .  ja  v a  2 s  .c o m*/
    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.getScopeFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

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

public CFBamJavaFXDelDepViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamDelDepObj argFocus) {//from   w  w w .j a  v  a  2 s .co m
    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.getDelDepFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

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

public CFBamJavaFXPopDepViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamPopDepObj argFocus) {//from   www .j a v  a 2  s  . co  m
    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.getPopDepFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

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

public CFBamJavaFXEnumTagViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamEnumTagObj argFocus) {/*from   w w  w .j  ava  2s . c  om*/
    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.getEnumTagFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

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

public CFBamJavaFXClearDepViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamClearDepObj argFocus) {/*from ww  w. java2  s .  c  om*/
    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.getClearDepFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

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

public CFBamJavaFXSchemaRefViewEditPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamSchemaRefObj argFocus) {/*ww w . j a v a  2  s.co m*/
    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.getSchemaRefFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane();
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}