Recall: Timeline Class

Slides:



Advertisements
Similar presentations
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 17 Creating User Interfaces.
Advertisements

What is a Dialog box? A Dialog box is a window or “form” that contains other child windows or “controls” that have a specific appearances and pre-defined.
Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved. 1 Chapter 16 JavaFX UI Controls and Multimedia.
1 Chapter 13 Creating User Interfaces. 2 Objectives F To create graphical user interfaces with various user-interface components: JButton, JCheckBox,
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 16 Creating User Interfaces.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 15 Creating User.
Introduction to Computing Dr. Nadeem A Khan. Lecture 11.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L04 (Chapter 15) Creating.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
1 Creating User Interfaces. 2 Motivations A graphical user interface (GUI) makes a system user-friendly and easy to use. Creating a GUI requires creativity.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 3 Tariq Aziz and Kevin Jones.
Compunet Corporation Programming with Visual Basic.NET GUI Chapter 3 Week 13 Tariq Aziz and Kevin Jones.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Slider A Slider Lets the user graphically select a value By sliding a knob within a bounded interval Can show both major tick marks and minor ones A listener.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 13 Creating User.
1 Chapter Ten Using Controls. 2 Objectives Learn about Controls How to create a Form containing Labels How to set a Label’s Font How to add Color to a.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 15 Creating User.
CHAPTER:07 JAVA IDE PROGRAMMING-II Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Topics Introduction Scene Graphs
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Creating User Interfaces Chapter 13 CSCI CSCI 1302 – Creating User Interfaces2 Outline Introduction Common Features of Swing GUI Components Buttons.
Java Programming, Second Edition Chapter Thirteen Understanding Swing Components.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Video in Macromedia Flash (Optional) – Lesson 121 Video in Macromedia Flash (Optional) Lesson 12.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
EECS 1510: Introduction to object-Oriented Programming in Java
Lecture 8:Event Driven Programming Michael Hsu CSULA.
Section §16.1 Introduction  So far, we have kept our UI simple, in order to demonstrate how to create a UI at all, and how to connect its elements.
Lecture 8:Event Driven Programming
Computing with C# and the .NET Framework
Topics Graphical User Interfaces Using the tkinter Module
Control Circle Project Revisited
Responding to Events Event Handling in Java
Chapter Topics 15.1 Graphical User Interfaces
Adding Buttons, Actions, and Sounds
Flash Interface, Commands and Functions
Chapter 8: Writing Graphical User Interfaces
Chapter 16 JavaFX UI Controls and Multimedia
Java FX.
Using Procedures and Exception Handling
Chap 7. Building Java Graphical User Interfaces
Chapter 16 JavaFX UI Controls and Multimedia
GUI Using Python.
Graphical User Interfaces -- Introduction
Chapter 7 Creating User Interfaces
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Chapter 15 Event-Driven Programming and Animations
This Week: Tkinter for GUI Interfaces Some examples
Chapter 13 Creating User Interfaces
Chapter 15 Event-Driven Programming and Animations
COMMON CONTROLS A control is a child window that an application uses in conjunction with another window to enable user interaction. Controls are most often.
Create and edit web pages 2
CISC124 Quiz 3 marking underway. Assn 5 due Friday. Fall 2018
Topics Graphical User Interfaces Using the tkinter Module
Chapter 15: GUI Applications & Event-Driven Programming
Visual C# - GUI and controls - 1
Chapter 17 Creating User Interfaces
Chapter 16 JavaFX UI Controls and Multimedia
CMPE212 – Reminders Assignment 5, a JavaFX GUI, due this Friday.
Chapter 17 Creating User Interfaces
CMPE212 – Reminders Assignment 5, a JavaFX GUI, due next Friday.
Chapter 16 JavaFX UI Controls and Multimedia
Chapter 4 Enhancing the Graphical User Interface
Presentation transcript:

Recall: Timeline Class Write a program that flashes text on and off Import the following for animation and text Create a stack pane Create the text Add the text to the pane Create handler for changing text (this causes the on and off) Set text empty Set text Create a timeline Create a KeyFrame for handler Set cycle count indefinite Starting the animation Pausing the animation Resuming the animation Setting the stage Dr. Clincy - Lecture

Chapter 16 JavaFX UI Controls and Multimedia Previous chapters introduced several GUI components. This chapter introduces the frequently used GUI components. FUN and EASY chapter Dr. Clincy - Lecture

Frequently Used UI Controls NOTE: Throughout your book, the prefixes lbl, bt, chk, rb, tf, pf, ta, cbo, lv, scb, sld, and mp are used to name reference variables for Label, Button, CheckBox, RadioButton, TextField, PasswordField, TextArea, ComboBox, ListView, ScrollBar, Slider, and MediaPlayer. Dr. Clincy - Lecture

Labeled The Label class defines labels. A label is a display area for a short text, a node, or both. It is often used to label other controls (usually text fields). These common properties are defined in the Labeled class. Dr. Clincy - Lecture

Example - Label Import the following for labels Create a label for an image Set label/node position Create another label for a circle Set the label/node position Create a label for a rectangle Create a label for a shape Create a label for a pane Setting the stage Dr. Clincy - Lecture

ButtonBase and Button A button is a control that triggers an action event when clicked (you have already covered). JavaFX provides regular buttons, check box buttons, and radio buttons. The common features of these buttons are defined in the ButtonBase class. Button Example A CheckBox is used for the user to make a selection. Checkbox Example Dr. Clincy - Lecture

ButtonBase and Button A button is a control that triggers an action event when clicked (you have already covered). JavaFX provides regular buttons, check box buttons, and radio buttons. The common features of these buttons are defined in the ButtonBase class. Radio buttons, also known as option buttons, enable you to choose a single item from a group of choices. Radio button Example Dr. Clincy - Lecture

Button Type Example Import the following for a checkbox type button Creating a pane for checkboxes (recall the value of this) Create a checkbox with two choices Create a handler for the checkbox using Lambda Set the handler for action Dr. Clincy - Lecture

TextField A text field can be used to enter or display a string. A TextArea enables the user to enter multiple lines of text. TextField is a subclass of TextInputControl. TextField Example Dr. Clincy - Lecture

TextArea A TextArea enables the user to enter multiple lines of text. Dr. Clincy - Lecture

ComboBox A combo box, also known as a choice list or drop-down list, contains a list of items from which the user can choose. This example lets users view an image and a description of a country's flag by selecting the country from a combo box. Dr. Clincy - Lecture

ComboBox Example Import the following for a combobox Creating an array of strings of countries Create an array of ImageViews of national flags Declare an array of strings for flag descriptions (enter info later) Create a description pane Create a combobox for selecting countries Set Canada to be the first country displayed Set up pane for combobox Setup the observable list Add to the combobox Based on some action, display the selected country Dr. Clincy - Lecture

ListView A list view is a component that performs basically the same function as a combo box, but it enables the user to choose a single value or multiple values. Dr. Clincy - Lecture

ScrollBar A scroll bar is a control that enables the user to select from a range of values. The scrollbar appears in two styles: horizontal and vertical. This example uses horizontal and vertical scrollbars to control a message displayed on a panel. Dr. Clincy - Lecture

Example: Using Scrollbars Import the following for a scrollbar Create horizontal scroll bar Create vertical scroll bar Add text to a pane Create a pane to hold text and scroll bar Set new location for text Create listener horizontal bar change Create listener vertical bar change Dr. Clincy - Lecture

Slider Slider is similar to ScrollBar, but Slider has more properties and can appear in many forms. Example - Using a sliders to control a message displayed on a panel instead of using scroll bars. Dr. Clincy - Lecture

Media MediaPlayer MediaView You can use the Media class to obtain the source of the media, the MediaPlayer class to play and control the media, and the MediaView class to display the video. MediaPlayer The MediaPlayer class playes and controls the media with properties such as autoPlay, currentCount, cycleCount, mute, volume, and totalDuration. MediaView The MediaView class is a subclass of Node that provides a view of the Media being played by a MediaPlayer. The MediaView class provides the properties for viewing the media. Dr. Clincy - Lecture

Create handler for rewinding Create a slider for volume Set volume EXAMPLE: This example displays a video in a view. You can use the play/pause button to play or pause the video and use the rewind button to restart the video, and use the slider to control the volume of the audio. Import the following Create media Create media player Create a media view Play media Pause media Create a rewind button Create handler for rewinding Create a slider for volume Set volume Bind volume with slider Add buttons and slider to hBox Place media view in a pane Dr. Clincy - Lecture

Example: Using Media This example displays a video in a view. You can use the play/pause button to play or pause the video and use the rewind button to restart the video, and use the slider to control the volume of the audio. MediaDemo Run Dr. Clincy - Lecture