JavaFX:Using Built-in Layout Panes

Size: px
Start display at page:

Download "JavaFX:Using Built-in Layout Panes"

Transcription

1 CS244 Advanced programming Applications JavaFX:Using Built-in Layout Panes Dr Walid M. Aly Lecture 7

2 Example of JavaFX nodes 2

3 Shapes JavaFX provides many shape classes for drawing texts, lines, circles, rectangles, ellipses, arcs, polygons, and polylines. 3

4 4

5 Using Built-in Layout Panes JavaFX provides many types of panes for organizing nodes in a container. javafx.scene.layout.pane public ObservableList<Node> getchildren( ) Gets the list of children of this Parent 5

6 FlowPane The nodes within a FlowPane layout pane are laid out consecutively and wrap at the boundary set for the pane. Nodes can flow vertically (in columns) or horizontally (in rows). Figure shows a sample horizontal flow pane using numbered icons. By contrast, in a vertical flow pane, column one would contain pages one through four and column two would contain pages five through eight. Gap properties and padding property can be set. 6

7 FlowPane 7

8 Example: Using FlowPane public void start(stage primarystage) { // Create a pane and set its properties FlowPane pane = new FlowPane(); pane.setpadding(new Insets(11, 12, 13, 14)); pane.sethgap(5); pane.setvgap(5); // Place nodes in the pane pane.getchildren().addall(new Label("First Name:"),new TextField(), new Label("MI:")); TextField tfmi = new TextField(); tfmi.setprefcolumncount(1);//if not set will be chosen by javafx pane.getchildren().addall(tfmi, new Label("Last Name:"),new TextField()); // Create a scene and place it in the stage Scene scene = new Scene(pane, 200, 250); primarystage.settitle("showflowpane"); // Set the stage title primarystage.setscene(scene); // Place the scene in the stage primarystage.show(); // Display the stage Run code ShowFlowPane 8

9 public final void setpadding(insets value) Sets the value of the property padding.. JavaFX classes javafx.scene.layout.region javafx.geometry.insets Insets(double top, double right, double bottom, double left) Constructs a new Insets instance with four different offsets. javafx.collections.observablelist<e> boolean addall(e... elements) A convenient method for var-arg adding of elements javafx.scene.control.textfield public final void setprefcolumncount(int value) Sets the value of the property prefcolumncount. This is used for calculating the TextField's preferred width. public final void setprompttext(java.lang.string value) Sets the value of the property prompttext. 9

10 GridPane Ø The GridPane layout pane enables you to create a flexible grid of rows and columns in which to lay out nodes Ø Nodes can be placed in any cell in the grid and can span cells as needed. Ø A grid pane is useful for creating forms or any layout that is organized in rows and columns. Ø The total number of rows/columns does not need to be specified up front as the gridpane will automatically expand/contract the grid to accommodate the content. Ø Scene size is automatically computed according to the sizes of the nodes placed inside the scene. 10

11 javafx.scene.layout.gridpane public GridPane() Creates a GridPane layout with hgap/vgap = 0 and TOP_LEFT alignment. public void add(node child, int columnindex, int rowindex) Adds a child to the gridpane at the specified column,row position public void add(node child, int columnindex, int rowindex, int colspan, int rowspan) javafx.scene.layout.gridpane public static void sethalignment(node child, HPos value) Sets the horizontal alignment for the child when contained by a gridpane javafx.geometry.hpos A set of values for describing horizontal positioning and alignment 11

12 Example: Using GridPane public void start(stage primarystage) { // Create a pane and set its properties GridPane pane = new GridPane(); pane.setpadding(new Insets(11.5, 12.5, 13.5, 14.5)); pane.sethgap(5.5); pane.setvgap(5.5); // Place nodes in the pane pane.add(new Label("First Name:"), 0, 0); pane.add(new TextField(), 1, 0); pane.add(new Label("MI:"), 0, 1); pane.add(new TextField(), 1, 1); pane.add(new Label("Last Name:"), 0, 2); pane.add(new TextField(), 1, 2); Button btadd = new Button("Add Name"); pane.add(btadd, 1, 3); GridPane.setHalignment(btAdd, HPos.RIGHT); (0,0) (1,0) (0,1) (1,1) (0,2) (1,2) (0,3) (1,3) // Create a scene and place it in the stage Scene scene = new Scene(pane); primarystage.settitle("showgridpane"); // Set the stage title primarystage.setscene(scene); // Place the scene in the stage primarystage.show(); // Display the stage Run code ShowGridPane 12

13 BorderPane BorderPane lays out children in top, left, right, bottom, and center positions. The top and bottom children will be resized to their preferred heights and extend the width of the border pane. The left and right children will be resized to their preferred widths and extend the length between the top and bottom nodes. the center node will be resized to fill the available space in the middle If your application does not need one of the regions, you do not need to define it and no space is allocated for it. 13

14 BorderPane Run code ShowBorderPane 14

15 javafx.scene.layout.borderpane 15

16 Example: Using BorderPane public void start(stage primarystage) { // Create a border pane BorderPane pane = new BorderPane(); // Place nodes in the pane pane.settop(new CustomPane("Top")); pane.setright(new CustomPane("Right")); pane.setbottom(new CustomPane("Bottom")); pane.setleft(new CustomPane("Left")); pane.setcenter(new CustomPane("Center")); // Create a scene and place it in the stage Scene scene = new Scene(pane); primarystage.settitle("showborderpane"); // Set the stage title primarystage.setscene(scene); // Place the scene in the stage primarystage.show(); // Display the stage // Define a custom pane to hold a label in the center of the pane class CustomPane extends StackPane { public CustomPane(String title) { getchildren().add(new Label(title)); setstyle("-fx-border-color: red"); setpadding(new Insets(11.5, 12.5, 13.5, 14.5)); Run code ShowBorderPane 16

17 HBox-VBox HBox The HBox layout pane provides an easy way for arranging a series of nodes in a single row. VBox The VBox layout pane is similar to the HBox layout pane, except that the nodes are arranged in a single column. The padding property can be set to manage the distance between the nodes and the edges of thevbox pane 17

18 HBox public HBox(Node... children) Creates an HBox layout with spacing = 0. Parameters: children - The initial set of children for this pane. 18

19 VBox ShowHBoxVBox 19

20 Example: Using Hbox-VBox public void start(stage primarystage) { BorderPane pane = new BorderPane(); // Place nodes in the pane pane.settop(gethbox()); pane.setleft(getvbox()); // Create a scene and place it in the stage Scene scene = new Scene(pane); primarystage.settitle("showhboxvbox"); primarystage.setscene(scene); primarystage.show(); private HBox gethbox() { HBox hbox = new HBox(15); hbox.setpadding(new Insets(15, 15, 15, 15)); hbox.setstyle("-fx-background-color: gold"); hbox.getchildren().add(new Button("Computer Science")); hbox.getchildren().add(new Button("Chemistry")); ImageView imageview = new ImageView(new Image("image/us.gif")); hbox.getchildren().add(imageview); return hbox; private VBox getvbox() { VBox vbox = new VBox(15); vbox.setpadding(new Insets(15, 5, 5, 5)); vbox.getchildren().add(new Label("Courses")); Label[] courses = {new Label("CSCI 1301"), new Label("CSCI 1302"), new Label("CSCI 2410"), new Label("CSCI 3720"); for (Label course: courses) { VBox.setMargin(course, new Insets(0, 0, 0, 15)); vbox.getchildren().add(course); return vbox; ShowHBoxVBox 20

21 AnchorPane AnchorPane allows the edges of child nodes to be anchored to an offset fromthe anchor pane's edges As the window is resized, the nodes maintain their position relative to their anchor point. Nodes can be anchored to more than one position and more than one node can be anchored to the same position static void setbottomanchor(node child, Double value) Sets the bottom anchor for the child when contained by an anchor pane. static void setleftanchor(node child, Double value) Sets the left anchor for the child when contained by an anchor pane. static void setrightanchor(node child, Double value) Sets the right anchor for the child when contained by an anchor pane. static void settopanchor(node child, Double value) Sets the top anchor for the child when contained by an anchor pane. 21

22 Forms with JavaFX CSS scene.getstylesheets().add(login.class.getresource("login.css").toexternalform()); Text scenetitle = new Text("Welcome"); scenetitle.setid("welcome-text");. final Text actiontarget = new Text(); grid.add(actiontarget, 1, 6); actiontarget.setid("actiontarget");

23 Forms with JavaFX CSS. root { display: block;.root { -fx-background-image: url("background.jpg");.label { -fx-font-size: 12px; -fx-font-weight: bold; -fx-text-fill: #333333; -fx-effect: dropshadow( gaussian, rgba(255,255,255,0.5), 0,0,0,1 ); #welcome-text { -fx-font-size: 32px; -fx-font-family: "Arial Black"; -fx-fill: #818181; -fx-effect: innershadow( three-pass-box, rgba(0,0,0,0.7), 6, 0.0, 0, 2 ); #actiontarget { -fx-fill: FIREBRICK; -fx-font-weight: bold; -fx-effect: dropshadow( gaussian, rgba(255,255,255,0.5), 0,0,0,1 );.button { -fx-text-fill: white; -fx-font-family: "Arial Narrow"; -fx-font-weight: bold; -fx-background-color: linear-gradient(#61a2b1, #2A5058); -fx-effect: dropshadow( three-pass-box, rgba(0,0,0,0.6), 5, 0.0, 0, 1 );.button:hover { -fx-background-color: linear-gradient(#2a5058, #61a2b1);

24 Margin is applied to the outside of you element hence effecting how far your element is away from other elements. Padding is applied to the inside of your element hence effecting how far your element's content is away from the border. 24

25 Example: Creating a layout Run code 25

26 Example: Creating a layout public void start(stage stage) { // Use a border pane as the root for scene BorderPane border = new BorderPane(); HBox hbox = addhbox(); border.settop(hbox); border.setleft(addvbox()); border.setright(addflowpane()); border.setcenter(addanchorpane(addgridpane())); Scene scene = new Scene(border); stage.setscene(scene); stage.settitle("layout Sample"); stage.show(); A border pane is useful for the classic look of a tool bar at the top, a status bar at the bottom, a navigation panel on the left, 26 additional information on the right, and a working area in the center.

27 Example: Creating a layout private HBox addhbox() { HBox hbox = new HBox(); hbox.setpadding(new Insets(15, 12, 15, 12)); hbox.setspacing(10); // Gap between nodes hbox.setstyle("-fx-background-color: #336699;"); Button buttoncurrent = new Button("Current"); buttoncurrent.setprefsize(100, 20); Button buttonprojected = new Button("Projected"); buttonprojected.setprefsize(100, 20); hbox.getchildren().addall(buttoncurrent, buttonprojected); return hbox; 27

28 Example: Creating a layout private VBox addvbox() { VBox vbox = new VBox(); vbox.setpadding(new Insets(10)); // Set all sides to 10 vbox.setspacing(8); // Gap between nodes Text title = new Text("Data"); title.setfont(font.font("arial", FontWeight.BOLD, 14)); vbox.getchildren().add(title); Hyperlink options[] = new Hyperlink[] { new Hyperlink("Sales"), new Hyperlink("Marketing"), new Hyperlink("Distribution"), new Hyperlink("Costs"); for (int i=0; i<4; i++) { // Add offset to left side to indent from title VBox.setMargin(options[i], new Insets(0, 0, 0, 8)); vbox.getchildren().add(options[i]); return vbox; javafx.scene.control.hyperlink Hyperlink(String text)create a hyperlink with the specified text as its label. javafx.scene.layout.vbox public static void setmargin(node child, Insets value)sets the margin for the child when contained by a vbox. If set, the vbox will layout the child so that it has the margin space 28 around it.

29 Example: Creating a layout private GridPane addgridpane() { GridPane grid = new GridPane(); grid.sethgap(10); grid.setvgap(10); grid.setpadding(new Insets(0, 10, 0, 10)); // Category in column 2, row 1 Text category = new Text("Sales:"); category.setfont(font.font("arial", FontWeight.BOLD, 20)); grid.add(category, 1, 0); // Title in column 3, row 1 Text charttitle = new Text("Current Year"); charttitle.setfont(font.font("arial", FontWeight.BOLD, 20)); grid.add(charttitle, 2, 0); // Subtitle in columns 2-3, row 2 Text chartsubtitle = new Text("Goods and Services"); grid.add(chartsubtitle, 1, 1, 2, 1);.. 29

30 Example: Creating a layout // House icon in column 1, rows 1-2 ImageView imagehouse = new ImageView( new Image(LayoutSample.class.getResourceAsStream("graphics/house.png"))); grid.add(imagehouse, 0, 0, 1, 2); // Left label in column 1 (bottom), row 3 Text goodspercent = new Text("Goods\n80%"); GridPane.setValignment(goodsPercent, VPos.BOTTOM); grid.add(goodspercent, 0, 2); // Chart in columns 2-3, row 3 ImageView imagechart = new ImageView( new Image(LayoutSample.class.getResourceAsStream("graphics/piechart.png"))); grid.add(imagechart, 1, 2, 2, 1); // Right label in column 4 (top), row 3 Text servicespercent = new Text("Services\n20%"); GridPane.setValignment(servicesPercent, VPos.TOP); grid.add(servicespercent, 3, 2); // grid.setgridlinesvisible(true); return grid; 30

31 Example: Creating a layout public AnchorPane addanchorpane(gridpane grid) { AnchorPane anchorpane = new AnchorPane(); Button buttonsave = new Button("Save"); Button buttoncancel = new Button("Cancel"); HBox hb = new HBox(); hb.setpadding(new Insets(0, 10, 10, 10)); hb.setspacing(10); hb.getchildren().addall(buttonsave, buttoncancel); anchorpane.getchildren().addall(grid,hb); // Add grid AnchorPane.setBottomAnchor(hb, 8.0); AnchorPane.setRightAnchor(hb, 5.0); AnchorPane.setTopAnchor(grid, 10.0); return anchorpane; 31

32 Example: Creating a layout private FlowPane addflowpane() { FlowPane flow = new FlowPane(); flow.setpadding(new Insets(5, 0, 5, 0)); flow.setvgap(4); flow.sethgap(4); flow.setprefwraplength(170); // preferred width allows for two columns flow.setstyle("-fx-background-color: DAE6F3;"); ImageView pages[] = new ImageView[8]; for (int i=0; i<8; i++) { pages[i] = new ImageView( new Image(LayoutSample.class.getResourceAsStream( "graphics/chart_"+(i+1)+".png"))); flow.getchildren().add(pages[i]); return flow; 32

33 References pub-get_started.htm

Chapter 14 JavaFX Basics. Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.

Chapter 14 JavaFX Basics. Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved. Chapter 14 JavaFX Basics rights reserved. 1 Motivations JavaFX is a new framework for developing Java GUI programs. The JavaFX API is an excellent example of how the object-oriented principle is applied.

More information

Graphical User Interfaces JavaFX GUI Basics. CSE114, Computer Science I Stony Brook University

Graphical User Interfaces JavaFX GUI Basics. CSE114, Computer Science I Stony Brook University Graphical User Interfaces JavaFX GUI Basics CSE114, Computer Science I Stony Brook University http://www.cs.stonybrook.edu/~cse114 GUI Examples 2 GUI Graphical User Interface (GUI) provides user-friendly

More information

JavaFX. Working with Layouts in JavaFX Release 8 E

JavaFX. Working with Layouts in JavaFX Release 8 E JavaFX Working with Layouts in JavaFX Release 8 E50476-01 March 2014 Learn how to use the Layout API and built-in layout panes to lay out the interface for your JavaFX application. JavaFX Working with

More information

Building Graphical user interface using JavaFX

Building Graphical user interface using JavaFX CS244 Advanced programming Applications Building Graphical user interface using JavaFX Dr Walid M. Aly Lecture 6 JavaFX vs Swing and AWT When Java was introduced, the GUI classes were bundled in a library

More information

CST141 JavaFX Basics Page 1

CST141 JavaFX Basics Page 1 CST141 JavaFX Basics Page 1 1 2 5 6 7 8 9 10 JavaFX Basics CST141 Console vs. Window Programs In Java there is no distinction between console programs and window programs Java applications can mix (combine)

More information

Come organizzare gli ascoltatori/osservatori

Come organizzare gli ascoltatori/osservatori Come organizzare gli ascoltatori/osservatori Listener Esterno public class AppWithEvents extends Application { Text text=null; Button btn = new Button(); Listener a=new Listener(this); btn.addeventhandler(actionevent.action,

More information

//Create BorderPane layout manager. layout = new BorderPane(); //This is the "root node".

//Create BorderPane layout manager. layout = new BorderPane(); //This is the root node. package ui.layouts.gridpane; import javafx.application.application; import javafx.event.actionevent; import javafx.event.eventhandler; import javafx.geometry.hpos; import javafx.geometry.pos; import javafx.geometry.rectangle2d;

More information

Posizionamento automa-co: Layouts di base. h5p://docs.oracle.com/javafx/2/ layout/jfxpub- layout.htm

Posizionamento automa-co: Layouts di base. h5p://docs.oracle.com/javafx/2/ layout/jfxpub- layout.htm Posizionamento automa-co: Layouts di base h5p://docs.oracle.com/javafx/2/ layout/jfxpub- layout.htm Layout: HBox public class Layout1 extends Application { Pane layout=new HBox(); layout.getchildren().add(new

More information

interactive systems graphical interfaces Week 2 : a. Intro to JavaFX Programming of Interactive Systems

interactive systems graphical interfaces Week 2 : a. Intro to JavaFX Programming of Interactive Systems Programming of Interactive Systems Anastasia.Bezerianos@lri.fr Week 2 : a. Intro to JavaFX Anastasia.Bezerianos@lri.fr (part of this class is based on previous classes from Anastasia, and of T. Tsandilas,

More information

Essential JavaFX. Using layouts. Panes in JavaFX. Layouts. Tobias Andersson Gidlund LAYOUTS

Essential JavaFX. Using layouts. Panes in JavaFX. Layouts. Tobias Andersson Gidlund LAYOUTS Essential JavaFX Tobias Andersson Gidlund tobias.andersson.gidlund@lnu.se November 15, 2012 Essential JavaFX 1(36) LAYOUTS Essential JavaFX 2(36) Using layouts Since JavaFX still is Java, the use of layout

More information

Chapter 14 JavaFX Basics. Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.

Chapter 14 JavaFX Basics. Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved. Chapter 14 JavaFX Basics 1 Motivations JavaFX is a new framework for developing Java GUI programs. The JavaFX API is an excellent example of how the object-oriented principle is applied. This chapter serves

More information

JavaFX Basics. Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved. 1.

JavaFX Basics. Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved. 1. JavaFX Basics rights reserved. 1 Motivations JavaFX is a new framework for developing Java GUI programs. The JavaFX API is an excellent example of how the object-oriented principle is applied. This chapter

More information

Event-Driven Programming with GUIs. Slides derived (or copied) from slides created by Rick Mercer for CSc 335

Event-Driven Programming with GUIs. Slides derived (or copied) from slides created by Rick Mercer for CSc 335 Event-Driven Programming with GUIs Slides derived (or copied) from slides created by Rick Mercer for CSc 335 Event Driven GUIs A Graphical User Interface (GUI) presents a graphical view of an application

More information

PROGRAMMIERPRAKTIKUM GRAPHICAL USER INTERFACES. Tobias Witt

PROGRAMMIERPRAKTIKUM GRAPHICAL USER INTERFACES. Tobias Witt PROGRAMMIERPRAKTIKUM GRAPHICAL USER INTERFACES Tobias Witt K.O.-SYSTEM Korrekt Oida! Jeder Student für jeden Meilenstein 1, ½ oder 0 K.O. Erstes K.O. für den Eingangstest ab 15 Punkten (ohne Aufgabe 3)

More information

COMP6700/2140 Scene Graph, Layout and Styles

COMP6700/2140 Scene Graph, Layout and Styles COMP6700/2140 Scene Graph, Layout and Styles Alexei B Khorev and Josh Milthorpe Research School of Computer Science, ANU May 2017 Alexei B Khorev and Josh Milthorpe (RSCS, ANU) COMP6700/2140 Scene Graph,

More information

CS-202 Introduction to Object Oriented Programming

CS-202 Introduction to Object Oriented Programming CS-202 Introduction to Object Oriented Programming California State University, Los Angeles Computer Science Department Lecture 13 JavaFX Basics Part 2 Slides by Keenan Knaur The Image and ImageView Classes

More information

Java Foundations. 9-1 Introduction to JavaFX. Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Java Foundations. 9-1 Introduction to JavaFX. Copyright 2014, Oracle and/or its affiliates. All rights reserved. Java Foundations 9-1 Copyright 2014, Oracle and/or its affiliates. All rights reserved. Objectives This lesson covers the following objectives: Create a JavaFX project Explain the components of the default

More information

Computational Expression

Computational Expression Computational Expression Graphics Janyl Jumadinova 6 February, 2019 Janyl Jumadinova Computational Expression 6 February, 2019 1 / 11 Java Graphics Graphics can be simple or complex, but they are just

More information

Java Programming Layout

Java Programming Layout Java Programming Layout Alice E. Fischer Feb 22, 2013 Java Programming - Layout... 1/14 Application-Stage-Scene-Pane Basic GUI Construction Java Programming - Layout... 2/14 Application-Stage-Scene Application

More information

JavaFX a Crash Course. Tecniche di Programmazione A.A. 2016/2017

JavaFX a Crash Course. Tecniche di Programmazione A.A. 2016/2017 JavaFX a Crash Course Tecniche di Programmazione Key concepts in JavaFX Stage: where the application will be displayed (e.g., a Windows window) Scene: one container of Nodes that compose one page of your

More information

JavaFX a Crash Course. Tecniche di Programmazione A.A. 2015/2016

JavaFX a Crash Course. Tecniche di Programmazione A.A. 2015/2016 JavaFX a Crash Course Tecniche di Programmazione Key concepts in JavaFX Stage: where the application will be displayed (e.g., a Windows window) Scene: one container of Nodes that compose one page of your

More information

Beautiful User Interfaces with JavaFX

Beautiful User Interfaces with JavaFX Beautiful User Interfaces with JavaFX Systémes d acquisition 3EIB S. Reynal September 20, 2017 The current document is dedicated to giving you a small and quick insight into the JavaFX API, an extra Java

More information

c 2017 All rights reserved. This work may be distributed or shared at no cost, but may not be modified.

c 2017 All rights reserved. This work may be distributed or shared at no cost, but may not be modified. Introduction to JavaFX for Beginner Programmers Robert Ball, Ph.D. August 16, 2017 Version 0.1.4 c 2017 All rights reserved. This work may be distributed or shared at no cost, but may not be modified.

More information

Composite Pattern Diagram. Explanation. JavaFX Subclass Hierarchy, cont. JavaFX: Node. JavaFX Layout Classes. Top-Level Containers 10/12/2018

Composite Pattern Diagram. Explanation. JavaFX Subclass Hierarchy, cont. JavaFX: Node. JavaFX Layout Classes. Top-Level Containers 10/12/2018 Explanation Component has Operation( ), which is a method that applies to all components, whether composite or leaf. There are generally many operations. Component also has composite methods: Add( ), Remove(

More information

Multimedia-Programmierung Übung 3

Multimedia-Programmierung Übung 3 Multimedia-Programmierung Übung 3 Ludwig-Maximilians-Universität München Sommersemester 2015 JavaFX Version 8 What is JavaFX? Recommended UI-Toolkit for Java 8 Applications (like e.g.: Swing, AWT) Current

More information

Grafica e non solo: Java FX

Grafica e non solo: Java FX Grafica e non solo: Java FX Creazione di una Applicazione JavaFX public class JavaFXApplica/onTEST extends Applica/on { @Override public void start(stage primarystage) { BuCon btn = new BuCon(); btn.settext("say

More information

JavaFX a Crash Course. Tecniche di Programmazione A.A. 2017/2018

JavaFX a Crash Course. Tecniche di Programmazione A.A. 2017/2018 JavaFX a Crash Course Tecniche di Programmazione JavaFX applications 2 Application structure Stage: where the application will be displayed (e.g., a Windows window) Scene: one container of Nodes that compose

More information

Advanced Programming Methods. Lecture 11 - JavaFx(Continuation)

Advanced Programming Methods. Lecture 11 - JavaFx(Continuation) Advanced Programming Methods Lecture 11 - JavaFx(Continuation) Content Event Driven Programming Event Handling A Simple Application without SceneBuilder Same Application with FXML (generated by SceneBuilder)

More information

Week 5: Images & Graphics. Programming of Interactive Systems. JavaFX Images. images. Anastasia Bezerianos. Anastasia Bezerianos

Week 5: Images & Graphics. Programming of Interactive Systems. JavaFX Images. images. Anastasia Bezerianos. Anastasia Bezerianos Programming of Interactive Systems Week 5: Images & Graphics Anastasia Bezerianos introduction.prog.is@gmail.com Anastasia Bezerianos introduction.prog.is@gmail.com!2 1 2 JavaFX Images images In JavaFX

More information

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Copyright 2012, Oracle and/or its affiliates. All rights reserved. 1 Custom Controls Paru Somashekar parvathi.somashekar@oracle.com Jonathan Giles Tech Lead, JavaFX UI Controls jonathan.giles@oracle.com 2 The following is intended to outline our general product direction.

More information

COMP1406 Tutorial 5. Objectives: Getting Started: Tutorial Problems:

COMP1406 Tutorial 5. Objectives: Getting Started: Tutorial Problems: COMP1406 Tutorial 5 Objectives: Learn how to create a window with various components on it. Learn how to create a Pane and use it in more than one GUI. To become familiar with the use of Buttons, TextFields

More information

Java FX. Properties and Bindings

Java FX. Properties and Bindings Java FX Properties and Bindings Properties : something that holds data data can be simple like an int or complex like a list data structure this data can be used to update other things when it changes

More information

Additional catalogs display. Customize text size and colors.

Additional catalogs display. Customize text size and colors. Collapsible Skin The collapsible skin option displays the catalogs and categories in a collapsible format enabling enhanced navigation on Qnet. Categories can be expanded to view all of the sub categories

More information

46 Advanced Java for Bioinformatics, WS 17/18, D. Huson, December 21, 2017

46 Advanced Java for Bioinformatics, WS 17/18, D. Huson, December 21, 2017 46 Advanced Java for Bioinformatics, WS 17/18, D. Huson, December 21, 2017 11 FXML and CSS A program intended for interactive use may provide a large number of user interface (UI) components, as shown

More information

The main method. The program s entry point

The main method. The program s entry point The main method The program s entry point A program has to start somewhere You invoke the JVM in order to run a Java application. Typically (at least in our books/courses) from the command line Using the

More information

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Make a Website A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Overview Course outcome: You'll build four simple websites using web

More information

ENGINEERING DATA HUB VISUAL DESIGN SPECIFICATIONS VERSION 3. Created: 2/10/2017

ENGINEERING DATA HUB VISUAL DESIGN SPECIFICATIONS VERSION 3. Created: 2/10/2017 ENGINEERING DATA HUB VISUAL DESIGN SPECIFICATIONS VERSION 3 Created: 2/10/2017 Table of Contents ENGINEERING DATA HUB... 1 DESKTOP VIEW... 3 HEADER... 4 Logo... 5 Main Title... 6 User Menu... 7 Global

More information

C12: JavaFX Scene Graph, Events, and UI Components

C12: JavaFX Scene Graph, Events, and UI Components CISC 3120 C12: JavaFX Scene Graph, Events, and UI Components Hui Chen Department of Computer & Information Science CUNY Brooklyn College 3/12/2018 CUNY Brooklyn College 1 Outline Recap and issues JavaFX

More information

Event-Driven Programming

Event-Driven Programming Lecture 10 1 Recall: JavaFX Basics So far we ve learned about some of the basic GUI classes (e.g. shapes, buttons) and how to arrange them in window(s) A big missing piece: interaction To have a GUI interact

More information

CSCI-142 Exam 2 Review September 25, 2016 Presented by the RIT Computer Science Community

CSCI-142 Exam 2 Review September 25, 2016 Presented by the RIT Computer Science Community CSCI-142 Exam 2 Review September 25, 2016 Presented by the RIT Computer Science Community http://csc.cs.rit.edu 1. Suppose we are talking about the depth-first search (DFS) algorithm. Nodes are added to

More information

CON Visualising GC with JavaFX Ben Evans James Gough

CON Visualising GC with JavaFX Ben Evans James Gough CON6265 - Visualising GC with JavaFX Ben Evans (@kittylyst) James Gough (@javajimlondon) Who are these guys anyway? Beginnings This story, as with so many others, starts with beer... Beginnings It was

More information

C16a: Model-View-Controller and JavaFX Styling

C16a: Model-View-Controller and JavaFX Styling CISC 3120 C16a: Model-View-Controller and JavaFX Styling Hui Chen Department of Computer & Information Science CUNY Brooklyn College 3/28/2018 CUNY Brooklyn College 1 Outline Recap and issues Model-View-Controller

More information

POWERPOINT Build a Presentation to Remember

POWERPOINT Build a Presentation to Remember POWERPOINT 2007 Build a Presentation to Remember Microsoft Office 2007 TABLE OF CONTENTS DOCUMENT THEMES... 1 THEMES... 1 COLOR SETS... 1 FONT SETS... 1 MASTER SLIDES... 2 USING THEMES IN THE SLIDE MASTER...

More information

canoo Engineering AG

canoo Engineering AG Gerrit Grunwald canoo Engineering AG Twitter: @hansolo_ blog: harmonic-code.org Agenda history controls scene graph css Java API WebView properties JFXPanel Bindings charts Some History Roadmap What Java

More information

InDesign Tools Overview

InDesign Tools Overview InDesign Tools Overview REFERENCE If your palettes aren t visible you can activate them by selecting: Window > Tools Transform Color Tool Box A Use the selection tool to select, move, and resize objects.

More information

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written.

Proctors are unable to respond to queries about the interpretation of exam questions. Do your best to answer exam questions as written. QUEEN'S UNIVERSITY SCHOOL OF COMPUTING HAND IN Answers Are Recorded on Question Paper CISC124, FALL TERM, 2015 FINAL EXAMINATION 7pm to 10pm, 15 DECEMBER 2015 Instructor: Alan McLeod If the instructor

More information

CSC 161 LAB 3-1 JAVA FX CALCULATOR

CSC 161 LAB 3-1 JAVA FX CALCULATOR CSC 161 LAB 3-1 JAVA FX CALCULATOR PROFESSOR GODFREY MUGANDA 1. Introduction and Overview In this lab, you are going to use JavaFX to create a calculator that can add, subtract, divide, multiply, and find

More information

JAVAFX 101 [CON3826]

JAVAFX 101 [CON3826] JAVAFX 101 [CON3826] Alexander Casall sialcasa JavaFX Script 1.0 Script Language Flash Successor 1.3 JavaFX 2.0 Java API OpenJFX JavaFX 8 Classpath 3D API Printing 8.X Accessibility, Controls... F3 Today

More information

Wednesday, November 16, 11

Wednesday, November 16, 11 1 JavaFX 2.0 Danny Coward Principal Engineer What is JavaFX 2.0 JavaFX is the evolution of the Java rich client platform, designed to address the needs of today s and tomorrow s customers.

More information

Adding CSS to your HTML

Adding CSS to your HTML Adding CSS to your HTML Lecture 3 CGS 3066 Fall 2016 September 27, 2016 Making your document pretty CSS is used to add presentation to the HTML document. We have seen 3 ways of adding CSS. In this lecture,

More information

Grafica e non solo: Java FX

Grafica e non solo: Java FX Grafica e non solo: Java FX Creazione di una Applicazione JavaFX public class JavaFXApplica/onTEST extends Applica/on { @Override public void start(stage primarystage) { BuCon btn = new BuCon(); btn.settext("say

More information

Word Tutorial 3. Creating a Multiple- Page Report COMPREHENSIVE

Word Tutorial 3. Creating a Multiple- Page Report COMPREHENSIVE Word Tutorial 3 Creating a Multiple- Page Report COMPREHENSIVE Objectives Format headings with Quick Styles Insert a manual page break Create and edit a table Sort rows in a table Modify a table s structure

More information

C30c: Model-View-Controller and Writing Larger JavaFX Apps

C30c: Model-View-Controller and Writing Larger JavaFX Apps CISC 3120 C30c: Model-View-Controller and Writing Larger JavaFX Apps Hui Chen Department of Computer & Information Science CUNY Brooklyn College 12/6/2018 CUNY Brooklyn College 1 Outline Model-View-Controller

More information

DESIGNING A WEBSITE LAYOUT IN PHOTOSHOP CS4. Step 1

DESIGNING A WEBSITE LAYOUT IN PHOTOSHOP CS4. Step 1 DESIGNING A WEBSITE LAYOUT IN PHOTOSHOP CS4 Step 1 We ll be using the 960s Grid System (download here) to keep everything aligned. Once you have it, open the included Photoshop document called: 960_grid_24_col.psd.

More information

GUI Output. Adapted from slides by Michelle Strout with some slides from Rick Mercer. CSc 210

GUI Output. Adapted from slides by Michelle Strout with some slides from Rick Mercer. CSc 210 GUI Output Adapted from slides by Michelle Strout with some slides from Rick Mercer CSc 210 GUI (Graphical User Interface) We all use GUI s every day Text interfaces great for testing and debugging Infants

More information

IT In the News. Login tokens have been reset for those affected and vulnerabilities have been fixed. o Vulnerabilities existed since July 2017

IT In the News. Login tokens have been reset for those affected and vulnerabilities have been fixed. o Vulnerabilities existed since July 2017 IT In the News 50 million Facebook accounts were affected by a security breach two weeks ago Attacks exploited bugs in Facebook s View As feature (built to give users more privacy) and a feature that allowed

More information

WORD Creating Objects: Tables, Charts and More

WORD Creating Objects: Tables, Charts and More WORD 2007 Creating Objects: Tables, Charts and More Microsoft Office 2007 TABLE OF CONTENTS TABLES... 1 TABLE LAYOUT... 1 TABLE DESIGN... 2 CHARTS... 4 PICTURES AND DRAWINGS... 8 USING DRAWINGS... 8 Drawing

More information

Working with Tables in Microsoft Word

Working with Tables in Microsoft Word Working with Tables in Microsoft Word Microsoft Word offers a number of ways to make a table. The best way depends on how you like to work, and on how simple or complex the table needs to be. 1. Click

More information

CSS Selectors. element selectors. .class selectors. #id selectors

CSS Selectors. element selectors. .class selectors. #id selectors CSS Selectors Patterns used to select elements to style. CSS selectors refer either to a class, an id, an HTML element, or some combination thereof, followed by a list of styling declarations. Selectors

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 6. Tables and Columns Objectives Explore the structure of a web table Create table heading and data cells Apply CSS styles to a table Create cells that span multiple

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 6. Tables and Columns Objectives Explore the structure of a web table Create table heading and data cells Apply CSS styles to a table Create cells that span multiple

More information

Web Engineering CSS. By Assistant Prof Malik M Ali

Web Engineering CSS. By Assistant Prof Malik M Ali Web Engineering CSS By Assistant Prof Malik M Ali Overview of CSS CSS : Cascading Style Sheet a style is a formatting rule. That rule can be applied to an individual tag element, to all instances of a

More information

How to lay out a web page with CSS

How to lay out a web page with CSS How to lay out a web page with CSS You can use table design features in Adobe Dreamweaver CS3 to create a simple page layout. However, a more powerful technique is to use Cascading Style Sheets (CSS).

More information

Computer Applications Final Exam Study Guide

Computer Applications Final Exam Study Guide Name: Computer Applications Final Exam Study Guide Microsoft Word 1. To use -and-, position the pointer on top of the selected text, and then drag the selected text to the new location. 2. The Clipboard

More information

c122sep2214.notebook September 22, 2014

c122sep2214.notebook September 22, 2014 This is using the border attribute next we will look at doing the same thing with CSS. 1 Validating the page we just saw. 2 This is a warning that recommends I use CSS. 3 This caused a warning. 4 Now I

More information

JavaFX. Getting Started with JavaFX Scene Builder Release 1.1 E

JavaFX. Getting Started with JavaFX Scene Builder Release 1.1 E JavaFX Getting Started with JavaFX Scene Builder Release 1.1 E25448-03 October 2013 JavaFX Getting Started with JavaFX Scene Builder, Release 1.1 E25448-03 Copyright 2012, 2013 Oracle and/or its affiliates.

More information

Sample Chapters. To learn more about this book, visit the detail page at: go.microsoft.com/fwlink/?linkid=192147

Sample Chapters. To learn more about this book, visit the detail page at: go.microsoft.com/fwlink/?linkid=192147 Sample Chapters Copyright 2010 by Online Training Solutions, Inc. All rights reserved. To learn more about this book, visit the detail page at: go.microsoft.com/fwlink/?linkid=192147 Chapter at a Glance

More information

MS WORD INSERTING PICTURES AND SHAPES

MS WORD INSERTING PICTURES AND SHAPES MS WORD INSERTING PICTURES AND SHAPES MICROSOFT WORD INSERTING PICTURES AND SHAPES Contents WORKING WITH ILLUSTRATIONS... 1 USING THE CLIP ART TASK PANE... 2 INSERTING A PICTURE FROM FILE... 4 FORMATTING

More information

Reference Services Division Presents. Microsoft Word 2

Reference Services Division Presents. Microsoft Word 2 Reference Services Division Presents Microsoft Word 2 This handout covers the latest Microsoft Word 2010. This handout includes instructions for the tasks we will be covering in class. Basic Tasks Review

More information

INFS 2150 / 7150 Intro to Web Development / HTML Programming

INFS 2150 / 7150 Intro to Web Development / HTML Programming XP Objectives INFS 2150 / 7150 Intro to Web Development / HTML Programming Designing a Web Page with Tables Create a text table Create a table using the , , and tags Create table headers

More information

Perceptive Document Composition

Perceptive Document Composition Perceptive Document Composition Supported Word Features PDC Version: 6.0 Written by: Product Documentation, R&D Date: August 2014 2014 Perceptive Software. All rights reserved Perceptive Software is a

More information

How to set up a local root folder and site structure

How to set up a local root folder and site structure Activity 2.1 guide How to set up a local root folder and site structure The first thing to do when creating a new website with Adobe Dreamweaver CS3 is to define a site and identify a root folder where

More information

Dreamweaver CS3 Concepts and Techniques

Dreamweaver CS3 Concepts and Techniques Dreamweaver CS3 Concepts and Techniques Chapter 3 Tables and Page Layout Part 1 Other pages will be inserted in the website Hierarchical structure shown in page DW206 Chapter 3: Tables and Page Layout

More information

light side dark side canoo

light side dark side canoo CON 1072 light side dark side han Solo (Also known as Gerrit Grunwald) Former smuggler, now Leader in the Rebel Alliance. Captain of the Millennium Falcon and sometimes involved in some Java business at

More information

Quick Reference Card Business Objects Toolbar Design Mode

Quick Reference Card Business Objects Toolbar Design Mode Icon Description Open in a new window Pin/Unpin this tab Close this tab File Toolbar New create a new document Open Open a document Select a Folder Select a Document Select Open Save Click the button to

More information

Table of Contents. MySource Matrix Content Types Manual

Table of Contents. MySource Matrix Content Types Manual Table of Contents Chapter 1 Introduction... 5 Chapter 2 WYSIWYG Editor... 6 Replace Text... 6 Select Snippet Keyword... 7 Insert Table and Table Properties... 8 Editing the Table...10 Editing a Cell...12

More information

Multimedia-Programmierung Übung 4

Multimedia-Programmierung Übung 4 Multimedia-Programmierung Übung 4 Ludwig-Maximilians-Universität München Sommersemester 2012 Ludwig-Maximilians-Universität München Multimedia-Programmierung 4-1 Today Scene Graph and Layouts Interaction

More information

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week WEB DESIGNING HTML HTML - Introduction HTML - Elements HTML - Tags HTML - Text HTML - Formatting HTML - Pre HTML - Attributes HTML - Font HTML - Text Links HTML - Comments HTML - Lists HTML - Images HTML

More information

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS: WEBSITE PROJECT 2 PURPOSE: The purpose of this project is to begin incorporating color, graphics, and other visual elements in your webpages by implementing the HTML5 and CSS3 code discussed in chapters

More information

JavaFX fundamentals. Tecniche di Programmazione A.A. 2012/2013

JavaFX fundamentals. Tecniche di Programmazione A.A. 2012/2013 JavaFX fundamentals Tecniche di Programmazione Summary 1. Application structure 2. The Scene Graph 3. Events 4. Properties and Bindings 2 Application structure Introduction to JavaFX 4 Separation of concerns

More information

Perceptive Document Composition

Perceptive Document Composition Perceptive Document Composition Supported Word Features Version: 6.2.0 Written by: Product Knowledge, R&D Date: December 2017 Copyright 2008-2017 Hyland Software, Inc. and its affiliates. Table of Contents

More information

JavaFX Scene Builder

JavaFX Scene Builder JavaFX Scene Builder User Guide Release 2.0 E51279-01 April 2014 This user guide introduces you to and describes how to use the JavaFX Scene Builder features and graphical user interface (GUI). JavaFX

More information

FLOATING AND POSITIONING

FLOATING AND POSITIONING 15 FLOATING AND POSITIONING OVERVIEW Understanding normal flow Floating elements to the left and right Clearing and containing floated elements Text wrap shapes Positioning: Absolute, relative, fixed Normal

More information

Bixby Public Schools Course Essential Elements Grade: Desktop Publishing

Bixby Public Schools Course Essential Elements Grade: Desktop Publishing Content Objective) applicable) Desktop Publishing Weeks 1-6 10-12 1. Create and edit a publication. 2. Design a newsletter. 3. Publish a tri-fold brochure 1-1 Start and quit Publisher 1-2 Describe the

More information

Labels and Envelopes in Word 2013

Labels and Envelopes in Word 2013 Labels and Envelopes in Word 2013 Labels... 2 Labels - A Blank Page... 2 Selecting the Label Type... 2 Creating the Label Document... 2 Labels - A Page of the Same... 3 Printing to a Specific Label on

More information

Oracle JavaFX. JavaFX Scene Builder User Guide Release 1.1 E

Oracle JavaFX. JavaFX Scene Builder User Guide Release 1.1 E Oracle JavaFX JavaFX Scene Builder User Guide Release 1.1 E25449-03 October 2013 Oracle JavaFX/JavaFX Scene Builder 1.0 Developer Release E25449-03 Copyright 2012, 2013 Oracle and/or its affiliates. All

More information

Web Design and Application Development

Web Design and Application Development Yarmouk University Providing Fundamental ICT Skills for Syrian Refugees (PFISR) Web Design and Application Development Dr. Abdel-Karim Al-Tamimi altamimi@yu.edu.jo Lecture 04 A. Al-Tamimi 1 Lecture Overview

More information

BONUS CHAPTER A Brief History of Java GUI Programming. In this chapter

BONUS CHAPTER A Brief History of Java GUI Programming. In this chapter BONUS CHAPTER 13 In this chapter 13.1 A Brief History of Java GUI Programming, page 1 13.2 Displaying Information in a Scene, page 3 13.3 Event Handling, page 16 13.4 Layout, page 28 13.5 User Interface

More information

https://www.eclipse.org/efxclipse/install.html#for-the-lazy

https://www.eclipse.org/efxclipse/install.html#for-the-lazy CSC40232: SOFTWARE ENGINEERING Professor: Jane Cleland Huang Lecture 4: Getting Started with Java FX Wednesday, January 30 th and February 1 st sarec.nd.edu/courses/se2017 Department of Computer Science

More information

Perceptive Document Composition

Perceptive Document Composition Perceptive Document Composition Supported Word Features Version: 6.1.x Written by: Product Knowledge, R&D Date: November 2016 2016 Lexmark. All rights reserved. Lexmark is a trademark of Lexmark International

More information

When you complete this chapter, you will be able to:

When you complete this chapter, you will be able to: Page Layouts CHAPTER 7 When you complete this chapter, you will be able to: Understand the normal fl ow of elements Use the division element to create content containers Create fl oating layouts Build

More information

Reference Services Division Presents. Microsoft Word 2

Reference Services Division Presents. Microsoft Word 2 Reference Services Division Presents Microsoft Word 2 Welcome to Word 2. This handout includes step-by-step instructions for each of the tasks we will be covering in class. Changes to Word 2007 There are

More information

How to lay out a web page with CSS

How to lay out a web page with CSS Activity 2.6 guide How to lay out a web page with CSS You can use table design features in Adobe Dreamweaver CS4 to create a simple page layout. However, a more powerful technique is to use Cascading Style

More information

From workbook ExcelPart2.xlsx, select FlashFillExample worksheet.

From workbook ExcelPart2.xlsx, select FlashFillExample worksheet. Microsoft Excel 2013: Part 2 More on Cells: Modifying Columns, Rows, & Formatting Cells Find and Replace This feature helps you save time to locate specific information when working with a lot of data

More information

truechart Menubar Documentation HighCoordination GmbH Version 1.0.2,

truechart Menubar Documentation HighCoordination GmbH Version 1.0.2, truechart Menubar Documentation HighCoordination GmbH Version 1.0.2, 2017-05-05 Table of Contents 1. Introduction.............................................................................. 1 2. Installing

More information

Book 5. Chapter 1: Slides with SmartArt & Pictures... 1 Working with SmartArt Formatting Pictures Adjust Group Buttons Picture Styles Group Buttons

Book 5. Chapter 1: Slides with SmartArt & Pictures... 1 Working with SmartArt Formatting Pictures Adjust Group Buttons Picture Styles Group Buttons Chapter 1: Slides with SmartArt & Pictures... 1 Working with SmartArt Formatting Pictures Adjust Group Buttons Picture Styles Group Buttons Chapter 2: Slides with Charts & Shapes... 12 Working with Charts

More information

The Importance of the CSS Box Model

The Importance of the CSS Box Model The Importance of the CSS Box Model Block Element, Border, Padding and Margin Margin is on the outside of block elements and padding is on the inside. Use margin to separate the block from things outside

More information

Graphical User Interfaces JavaFX GUI Basics, Event Programming and GUI UI Controls

Graphical User Interfaces JavaFX GUI Basics, Event Programming and GUI UI Controls Graphical User Interfaces JavaFX GUI Basics, Event Programming and GUI UI Controls CSE260, Computer Science B: Honors Stony Brook University http://www.cs.stonybrook.edu/~cse260 GUI Examples 2 GUI Graphical

More information

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013 UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013 SUBJECT CODE : SCSV1223 (Section 05) SUBJECT NAME : WEB PROGRAMMING YEAR/COURSE : 1SCSV TIME : 2.00 4.00 PM DATE : 18 APRIL 2013 VENUE : KPU 10

More information

Designing for Web Using Markup Language and Style Sheets

Designing for Web Using Markup Language and Style Sheets Module Presenter s Manual Designing for Web Using Markup Language and Style Sheets Effective from: July 2014 Ver. 1.0 Amendment Record Version No. Effective Date Change Replaced Pages 1.0 July 2014 New

More information