Skip to content

Instantly share code, notes, and snippets.

@AndrewShitsko AndrewShitsko/home.fxml
Last active Jan 21, 2017

Embed
What would you like to do?
<?xml version="1.0" encoding="UTF-8"?>
<?import griffon.javafx.support.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.cell.PropertyValueFactory?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.web.WebView?>
<VBox fx:id="homeLayout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.HomeController">
<TabPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="350.0" prefWidth="400.0" tabClosingPolicy="UNAVAILABLE" tabMaxWidth="150.0" tabMinWidth="75.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1">
<tabs>
<Tab text="Image View">
<content>
<VBox alignment="CENTER" prefHeight="350.0" prefWidth="400.0" style="-fx-background-color: white">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<ImageView fitHeight="300.0" fitWidth="350.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../images/griffon.png" />
</image></ImageView>
</children>
</VBox>
</content></Tab>
<Tab text="Table View">
<content>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" style="-fx-background-color: white">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<TableView fx:id="tableView" prefHeight="300.0" prefWidth="200.0">
<columns>
<TableColumn prefWidth="75.0" text="Position">
<cellValueFactory>
<PropertyValueFactory property="position" />
</cellValueFactory>
</TableColumn>
<TableColumn prefWidth="75.0" text="Language">
<cellValueFactory>
<PropertyValueFactory property="language" />
</cellValueFactory>
</TableColumn>
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
</children>
</VBox>
</content></Tab>
<Tab text="Web View">
<content>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" style="-fx-background-color: white">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<WebView fx:id="webView" prefHeight="300.0" prefWidth="200.0" />
</children>
</VBox>
</content></Tab>
<Tab text="Default View">
<content>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="10.0" style="-fx-background-color: white">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<children>
<Label fx:id="clickLabel" />
<Button fx:id="countButton" maxWidth="200.0" JavaFXUtils.griffonActionId="click" />
</children>
</VBox>
</content></Tab>
</tabs>
</TabPane>
<HBox alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="400.0">
<children>
<Button fx:id="closeButton" prefWidth="60.0" JavaFXUtils.griffonActionId="close" />
</children>
<padding>
<Insets left="10.0" right="10.0" />
</padding>
</HBox>
</VBox>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.