final Flashcards

1
Q

GUI

A

“Graphical User Interface” is a computer display format that allows the user to select commands, call up files, start programs, and do other routine tasks by using a mouse to point to pictorial symbols (icons) or lists of menu choices on the screen as opposed to having to type in text commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

WIMP

A

“Windows, Icons, Menus and Pointing device” is a graphical user
interface that allows a user to interact with the computer through the means of a pointing device such as a mouse to select words from drop down menus or images such as icons on the display screen that represent commands for
movement, activation or some other action.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Model View Controller (MVC)

A

*Probably the most quoted design pattern in UI development.
*It is also the most misquoted.
*Create a clear division between domain objects (model) that model the real world, and presentation objects that are the GUI elements visible on the screen.
*Domain objects should be completely self contained and work without reference to the presentation, they should also be able to support multiple presentations, possibly simultaneously.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

GUI framework

A

*A cohesive set of interfaces and classes that collaborate to provide services for the core, unvarying part of a logical subsystem.
*Contains concrete (and especially) abstract classes that define interfaces to conform to, object interactions to participate in, and other invariants.
*Usually (but not necessarily) requires the framework user to define subclasses of existing framework classes to make use of, customize, and extend the
framework services.
*Has abstract classes that may contain both abstract and concrete methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

draw the structure of a web graphical user interface

A

slide 7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

event source

A

creates event objects and maintains a list of listeners..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

event listener

A

receives and processes event objects (implements an
interface).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

event interface

A

a list of methods implemented by the listener and invoked by the
source with the event object as a parameter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Event object

A

data passed from the source to the listener.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DOM Event Flow

A

o Capture: from the default view to
the target’s parent.
qEvent listeners must handle
the event before it reaches its target.
o Target: the event object must arrive
at the event object’s event target.
o Bubble: propagates through the
target’s ancestors in reverse order.
qEvent listeners must handle
the event after it reaches its target.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Box Model

A

Determines how elements are positioned within the browser window.
§CSS treats every element as if it were in a box.
§When a bottom margin of one element meets the top margin of another, only the
larger of the two margins shows.
§border: separates the edge of one box from other surrounding boxes.
§margin: the distance between
the border of a box and the box
next to it.
§padding: the space between
the content of the box and its
border.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

three characteristics of react

A

*Declarative:
§Design simple views for each state in the application.
§React updates & renders the component if its data changes.
*Component Based:
§Encapsulated components that manage their own state.
§Composition of components to make complex UIs.
*Learn Once, Write Anywhere:
§No assumptions about the rest of technology stack.
§Rendering on server using Node.
§React Native for mobile applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

React development steps

A

*Preparation:
§Mock: start with a mock user interface.
*Development Steps
1. UI structure: break the UI into a component hierarchy.
2. Static version: build a static version in React.
3. Minimal UI state: identify the minimal and complete representation of UI state.
4. State implementation: identify where the state should live.
5. Inverse data flow: add inverse data flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

User Experience (UX)

A

Every aspect of the user’s interaction with a product, service, or company that make up the user’s perceptions of the whole. User experience design as a discipline is concerned with all the elements that together make up that interface, including layout, visual design, text, brand, sound, and interaction. UE (Usability Engineering) works to coordinate these elements to allow for the best possible interaction by users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

UX process lifecycle

A

§Understand needs (of users)
§Create design candidates
§Construct prototypes
§Evaluate UX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

5 usability attributes

A

§Learnability: “… easy to learn so that the user can rapidly start getting some work done with
the system.”
§Efficiency: “… efficient to use, so that once the user has learned the system, a high level of
productivity is possible.”
§Memorability: “… easy to remember, so that the casual user is able to return to the system
after some period of not having used it , without having to learn everything all over again.”
§Errors: “… a low error rate, so that users make few errors during the use of the system, and
so that if they do make errors they can easily recover from them. Further, catastrophic errors
must not occur.”
§Satisfaction: “… pleasant to use so that users are subjectively satisfied when using it; they
like it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

rules for creating react components

A

*Always start component names with a capital letter:
§React treats components starting with lowercase letters as DOM tags.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Hooks

A

*A Hook is a special function that lets you “hook into” React features:
§useState is a Hook that lets you add React state to function components.
§useEffect is a Hook that can be viewed
as componentDidMount, componentDidUpdate,
and componentWillUnmount combined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

React Design Patterns

A

A named pair of a problem and solution:
§Effective solutions to common problems.
§We mentioned Model-View-Controller.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

examples of react design patterns

A

§Factory: An interface for creating a singleobject, but let subclasses decide which class to instantiate.
§Façade: A unified interface to a set of interfaces in a subsystem.
§Iterator: Accessing the elements of an aggregate object sequentially without exposing its underlying representation.
§Monitor: An object whose methods are subject to mutual exclusion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

MUI

A

*MUI (previously Material UI) is a React UI library: https://mui.com
*Provides a robust, customizable, and accessible library of foundational and
advanced components:
§MUI core: foundational components
§MUI X: advanced components
§Templates: application templates
§Design kits: components for design tools
*Community edition include MUI core.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is computer graphics?

A

The science and art of communicating visually via a computer’s display and its interaction devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Combining models to to produce a representation of a particular view of the
scene:

A

§Model of objects
§Model of the light
§Geometric model
§Mathematical model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Types of Visualization

A

*Scientific Visualization: the use of interactive visual representations of scientific
data, typically physically based, to amplify cognition.
*Information Visualization: the use of interactive visual representations of
abstract, non-physically based data to amplify cognition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

draw and describe the Visualization Stages

A

slide 25
*The collection and storage of data
*Preprocessing / transforming the data into something that is easier to
manipulate
*Mapping from the selected data to a visual representation
*The human perceptual and cognitive system (the perceiver)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

GUI component

A

*A GUI component (widget) is an element that displays an information
arrangement changeable by the user and provides a single interaction point for
a given kind of data.
*GUI components are basic visual building blocks which, combined in an
application, hold all the data processed by the application and the available
interactions on this data.
*To appear onscreen, every GUI component must be part of a containment
hierarchy. A containment hierarchy is a tree of components that has a top-level
container as its root.
*A layout manager determines the size and position of the components within a
container.
*A GUI framework uses computer graphics to display individual GUI components
and the overall GUI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Three-color Theory

A

*Human visual system has two types of sensors.
* Rods: monochromatic, night vision.
* Cones:
* Color sensitive.
* Three types of cones.
* Only three values (the tristimulus values) are sent to the brain.
*Need only match these three values:
* Need only three primary colors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Commonly Used Types of Data Visualizations

A

*Amounts
*Distributions
*Proportions
*x-y relationships
*Geospatial data
*Uncertainty

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Homogenous Coordinates

A

Homogenous coordinates define a point in a plane using three coordinates
instead of two.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is SVG?

A

*SVG is an image that is text-based.
*Provides high quality, scalable, graphics on the web.
*Has a similar structure to HTML.
*Is a DOM object.
*Properties can be specified as attributes.
*Uses absolute positions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Computer graphics can be viewed from several perspectives:

A

§Its applications.
§The various fields that are involved in the study of graphics.
§Some of the tools that make the images produced by graphics so effective.
§Some numbers to help understand the scales at which computer graphics works.
§The elementary ideas required to develop graphics program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

SVG Coordinate System

A

*A coordinate system or grid system is similar to the one used by HTML5
elements.
*The top left corner of the document is considered to be the point (0,0), or point
of origin.
*Positions are then measured in pixels
from the top left corner, with the
positive x direction being to the right,
and the positive y direction
being to the bottom.
*SVG can use absolute units (ones with
a dimensional identifier like “pt” or “cm”) and so-called user units, that lack that
identifier and are plain numbers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

OpenGL

A

*OpenGL controls whatever hardware you are using, and you use its functions
instead of controlling the hardware directly.
*It is a collection of routines that the programmer can call along with a model of
how the routines work together to produce graphics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

draw the webgl pipeline

A

slide 36

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Coordinated Multiple Views

A

*The analysis and assessment of complex, multi-dimensional data is a challenge:
§We need multiple perspectives/views of the same data.
*The views/plots/charts can be coordinated or articulated within a
Coordinated
Multiple
Views (CMV)
tool.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

D3

A

*D3: Data-Driven Documents
*Created by Mike Bostock in 2011
*D3.js is an open source, lightweight JavaScript library for manipulating web
documents and creating custom interactive data based web visualizations,
without predefined forms or specific visualization features
D3 leverages HTML, SVG, and CSS.

37
Q

Data Binding Functions

A

*data: binds elements to data.
*join: enters/updates/exits elements based on data.
*enter: gets the enter selection (data missing elements).
*exit: gets the exit selection (elements missing data).
*datum: gets or set element data (without joining).

38
Q

Calling data creates three arrays:

A

§enter(data without corresponding DOM elements).
§update(DOM elements mapped to data).
§exit(DOM elements now missing data).

39
Q

Layouts

A

*A layout is a function that modifies a dataset for graphical representation.
§A layout encapsulates a strategy for laying out data elements visually, relative to
each other.
§Examples: histogram, pie chart, stack, Sankey, word cloud.
*Layouts take a set of input data, apply an algorithm or heuristic, and output the
resulting positions/shapes for a cohesive display of the data.
§Layouts typically operate across a collection of data as a whole, rather than
individually.
*Layouts instances are sometimes functions that can be configured and then
applied to a set of data.
§Other times, specific methods or event handlers are used for data input and position
output..

40
Q

Charts

A

*A chart refers to any flat layout of data in a graphical manner.
*The datapoints, which can be individual values or objects in arrays, may contain
categorical, quantitative, topological, or unstructured data.
*All charts consist of several graphical elements that are drawn or derived from
the dataset being represented.
*These graphical elements may be:
§Graphical primitives, like circles or rectangles.
§More complex, multipart, graphical objects like the boxplot.
§Supplemental pieces like axes and labels.

41
Q

D3 and React approaches

A

§React centric: Use D3 code in render method.
§D3 centric: Create a container element in React and put D3 code in
componentDidMount and componentDidUpdate.
§Hybrid: React for specifying the DOM structure, and D3 for updating style:
o Use D3 code in render method to create DOM elements.
o Use D3 code in componentDidMount and componentDidUpdate to update style.

42
Q

Web Storage API

A

The Web Storage API provides mechanisms by which browsers can store
key/value pairs, in a much more intuitive fashion than using cookies.

43
Q

The two mechanisms within Web Storage are as follows:

A

§sessionStorage maintains a separate storage area for each given origin that’s
available for the duration of the page session (as long as the browser is open,
including page reloads and restores).
§localStorage does the same thing, but persists even when the browser is closed and
reopened.
o Stores data with no expiration date, and gets cleared only through JavaScript, or clearing
the Browser cache / Locally Stored Data.

44
Q

Complex Visualization

A

*Using built-in canvas rendering for D3 shapes.
*Creating large random datasets of multiple types.
*Using canvas drawing in conjunction with SVG to draw large datasets.
*Optimizing geospatial, network, and traditional data visualization.
*Working with quadtrees to enhance spatial search performance.

45
Q

Canvas versus SVG

A

*Unlike SVG, canvas does not include a hierarchy of objects (retained mode).
§Instead, it uses an immediate mode:
o Starts by clearing the context and redrawing everything.
*Drawing with canvas produces higher performance, but slightly less crisp
graphics.
*There are no elements (e.g., <path>) to attach mouse events, too.
§Instead, they are attached to the canvas itself:
o The canvas coordinates of the mouse event (pixel) must be mapped to the corresponding
drawn element.</path>

46
Q

Hybrid approach

A

draw interactive elements with SVG and large datasets with
canvas.

47
Q

technology stack

A

The technology stack is a set of frameworks and tools used to develop a
software product. This set of frameworks and tools are very specifically chosen
to work together in creating a well-functioning software.
*MERN (MongoDB, Express, React, Node)
*LAMP (Linux, Apache, MySQL, PHP)
*MEAN (MongoDB, Express, Angular, Node)

48
Q

MERN Stack

A

MERN stack is a web development framework consisting of MongoDB, Express,
React, and Node as its working components
§MongoDB: A document-oriented, No-SQL database used to store the application
data (https://www.mongodb.com).
§Node: The JavaScript runtime environment used to run JavaScript on a machine
rather than in a browser.
§Express: A framework layered on top of Node, used to build the backend of a site
(web server) using Node functions and structures.
§React: A GUI framework used to build the user
interface of the single page web application.

49
Q

MongoDB

A

*A document database:
§A record in MongoDB is a document, which is a data structure composed of field and
value pairs.
§MongoDB documents are similar to JSON objects.
§MongoDB stores documents in collections.
§The values of fields may include other documents, arrays, and arrays of documents.
*The advantages of using documents are:
§Documents (i.e., objects) correspond to native data types in many programming
languages.
§Embedded documents and arrays reduce need for expensive joins.
§Dynamic schema supports fluent polymorphism.

50
Q

Express Middleware

A

*Middleware functions have access to the request object (req), the response object (res), and the next function in theapplication’s request-response cycle.
§The next function is a function in the Express router which, when invoked, executes the middleware succeeding the current middleware.
*Middleware functions can perform the following tasks:
§Execute any code.
§Make changes to the request and the response objects.
§End the request-response cycle.
§Call the next middleware in the stack.

51
Q

HTTP

A

*The Hypertext Transfer Protocol (HTTP) is designed to enable communications
between clients and servers.
*HTTP works as a request-response protocol between a client and server.
*The two most common HTTP methods are: GET and POST:
§GET is used to request data from a specified resource.
§POST is used to send data to a server to create/update a resource.

52
Q

React Native provides a number of built-in Core Components to use in app:

A

§Basic Components
§User Interface
§List Views
§iOS-specific
§Android-specific
§Others

53
Q

Styling

A

*Styling is done using JavaScript.
*All of the core components accept a prop named style.
*The style names and values usually match how CSS works on the web, except
names are written using camel casing, e.g., backgroundColor.
*The style prop can be a plain JavaScript object:
§It can also be an array of styles:
§The last style in the array has precedence, can be used to inherit styles.

54
Q

Flex Layout

A

A component can specify the layout of its children using the Flexbox algorithm:
§Designed to provide a consistent layout on different screen sizes.
§Normally a combination of flexDirection, alignItems, and justifyContent.

55
Q

Interactions

A

*Users interact with mobile apps mainly through touch.
*They can use a combination of gestures, such as tapping on a button, scrolling
a list, or zooming on a map.
*React Native provides components to handle all sorts of common gestures, as
well as a comprehensive gesture responder system to allow for more advanced
gesture recognition.

56
Q

iOS

A

*The iOS (iOS 16.1) system is based on the same technologies used by Mac OS
X, namely the Mach kernel and BSD interfaces.
*iOS apps run in a UNIX-based system and have full support for threads,
sockets, and many of the other technologies typically available at that level.
However, there are places where the behavior of iOS differs from that of Mac
OS X.
*To manage program memory, iOS uses essentially the same virtual memory
system found in Mac OS X.
§Each program still has its own virtual address space, but unlike Mac OS X, the
amount of usable virtual memory is constrained by the amount of physical memory
available.
*For security reasons, iOS places each app (including its preferences and data)
in a sandbox at install time.

57
Q

Sandbox

A

*A sandbox is a set of fine-grained controls
that limit the app’s access to files,
preferences, network resources,
hardware, etc.
*As part of the sandboxing process, the
system installs each app in its own
sandbox directory, which acts as the home
for the app and its data.
*To help apps organize their data, each
sandbox directory contains several well-
known subdirectories for placing files.

58
Q

Delegation

A

this design pattern facilitates the transfer information and data from
one object to another.

59
Q

Target-action:

A

this design pattern translates user interactions with buttons and
controls into code that your app can execute.

60
Q

Block objects:

A

use blocks to implement callbacks and asynchronous code.

61
Q

Sandboxing

A

all iOS apps are placed in sandboxes to protect the system and
other apps.
§The structure of the sandbox affects the placement of your app’s files and has
implications for data backups and some app-related features.

62
Q

view

A

*A view is an object that draws itself within a rectangular area of a window and
that can respond to user actions such as finger taps or mouse clicks.
*A view draws a visual representation of itself and presents a surface that
responds to touches and input from devices.

63
Q

Android

A

Android is a software stack for mobile devices (Android 13) that includes an
operating system, middleware and key applications:
§Application framework for reuse and replacement of components.
§Dalvik virtual machine optimized for mobile devices.
§Integrated browser based on the open source WebKit engine.
§Optimized graphics powered by a custom 2D graphics library; 3D graphics based on
the OpenGL ES.
§SQLite for structured data storage.
§Media support for common audio, video, and still image formats (MPEG4, H.264,
MP3, AAC, AMR, JPG, PNG, GIF).
§GSM Telephony (hardware dependent).
§Bluetooth, EDGE, 3G, and WiFi (hardware dependent).
§Camera, GPS, compass, and accelerometer (hardware dependent).
§Rich development environment.

64
Q

Application

A

*Android applications are written in Java.
*The Android SDK tools compile the code, along with any data and resource
files, into an Android package, an archive file with an .apk suffix.
*Once installed on a device, each Android application lives in its own security
sandbox:
§The Android operating system is a multi-user Linux system in which each application
is a different user.
§By default, the system assigns each application a unique Linux user ID. The system
sets permissions for all the files in an application so that only the user ID assigned to
that application can access them.
§Each process has its own virtual machine (VM), so an application’s code runs in
isolation from other applications.
§By default, every application runs in its own Linux process.

65
Q

draw the process of compiling and running android projects

A

slide 70

66
Q

Application Components

A

Application components are the essential building blocks of an Android application.
§Each component is a different point through which the system can enter your
application.

67
Q

4 types of application components

A

§Activity: represents a single screen with a user interface. The activities can work
together to form a cohesive user experience in the email application,but each one is
independent of the others.
§Service: a component that runs in the background to perform long-running
operations or to perform work for remote processes. A service does not provide a
user interface.
§ContentProvider: manages a shared set of application data.
§BroadcastReceiver: a component that responds to system-wide broadcast

68
Q

JavaFX

A

*JavaFX is an open source, next generation client application platform for
desktop, mobile and embedded systems built on Java.
*It is a collaborative effort by many individuals and companies with the goal of
producing a modern, efficient, and fully featured toolkit for developing rich client
applications.

69
Q

A basic JavaFX application has classes from 3 packages:

A

§javafx.application: the application life-cycle classes.
§javafx.stage: the top-level container classes for the content.
§javafx.scene: the core set of base classes for the content.

70
Q

application content

A

a scene graph is a tree data structure, most commonly found in
graphical applications and libraries such as vector editing tools, 3D libraries, and
video games.

71
Q

JavaFX scene graph

A

a retained mode API: maintains an internal model of
all graphical objects.
§It always knows what objects to display, what areas of the screen need repainting,
and how to render it all in the most efficient way.
§Use the scene graph API instead of invoking primitive drawing methods directly: the
system automatically handles the rendering.
o Significantly reduces the amount of application code.

72
Q

Qt

A

*Qt is a cross-platform application and UI framework.
*It an be used to write web-enabled applications once and deploy them across
desktop, mobile and embedded operating systems without rewriting the source
code.
*A C++ framework for high performance cross-platform software development.
*Provides a rich set of standard widgets that can be used to create graphical user
interfaces for applications.
*Layout managers are used to arrange and resize widgets to suit the user’s
screen, language and fonts.

73
Q

Qt Components

A

*Qt Framework: intuitive APIs for C++ and CSS/JavaScript- like programming
with Qt Quick for rapid UI creation.
*Qt Creator IDE: powerful cross-platform integrated development environment,
including UI designer tools and on-device debugging.
*Tools and toolchains: internationalization support, embedded toolchains and
more.

74
Q

Qt Ready-made models:

A

§QStringListModel: stores a simple list of QString items.
§QStandardItemModel: manages more complex tree structures of items, each of
which can contain arbitrary data.
§QFileSystemModel: provides information about files and directories in the local
filing system.
§QSqlQueryModel, QSqlTableModel, and QSqlRelationalTableModel: used
to access databases.

75
Q

Signals and Slots

A

*The signals and slots mechanism is a central
feature of Qt and probably the part that differs
most from the features provided by other
frameworks.
§Signals and slots make it easy to implement the
Observer pattern.
*Widgets emit signals when events occur.
*Connect to a signal by creating a function (a
“slot”) and calling the connect function to relate
the signal to the slot.
§Connections can be added or removed at any
time.
§They can be made between objects in different
threads.

76
Q

Linking

A

*Linking helps us show how a point, or set of points, behaves in each of the
views.
*This is accomplished by selecting/highlighting/emphasizing these points:
§For example, the selected points could be drawn as a filled circle while the remaining
points could be drawn as unfilled circles.
§A typical application of this would be to show how an outlier shows up in each of the
individual pairwise plots.

77
Q

Brushing

A

*Brushing means selecting a subset of the data points with an input device
(interactions technique).
*Brushing extends the concept of linking a bit further.
*The points to be highlighted are interactively selected (e.g., by a mouse) and all
views are dynamically updated (ideally in real time):
*Selecting a region of points in one view results in those points reflected in the
other views.

78
Q

most common approach to visualizing amounts

A

bars

79
Q

x-yRelationships

A

*Scatterplot: shows one quantitative variable relative to another.
*Bubble chart: dot size represents the third variable.
*Paired scatterplot: the variables along the xand yaxes are measured in the
same units.
*Slopegraph: paired points connected by straight lines.

80
Q

Proportions

A

*Pie chart: emphasizes that the individual parts add up to a whole and highlight
simple fractions.
*Bars: easily compared in side-by-side bars.
*Stacked bars: useful when comparing multiple sets of proportions.

81
Q

Selection

A

*The selection is cumulative and includes multiple points.
§Maintain a list of selected points/cells/columns.
§Selection is synced and works in all views.
*Table:
§Clicking on a table cells selects the corresponding row and data point.
*BarChart:
§Clicking on a bar selects the corresponding data point.
*PieChart:
§Clicking on a slice selects the corresponding data point.
*ScatterPlot:
§Clicking on a point selects the corresponding data point.
*Alternatively, instead of mouse click you can use rubberbanding.

82
Q

Rubber Banding

A

*A technique used for displaying the segments, rectangles (and other primitives)
that change as they are manipulated interactively.
*Line segment:
§Press the mouse button to specify the location of the start point of the segment.
§Move the mouse and the current location of the mouse is the end point of the
segment.
§Release the mouse to remove the line segment.
*Rectangle:
* Press the mouse button to specify the location of the start point of a diagonal of the
rectangle.
* Move the mouse and the current location of the mouse is the end point of the
diagonal of the rectangle.
* Release the mouse to remove the rectangle.

83
Q

Scene Class

A

*The container for all content in a scene graph:§If the root is a Group, the contents of the scene graph will be clipped by the scene’s width and height
and changes to the scene’s size (if user resizes the stage) will not alter the layout of the scene graph.
§If the root is a resizable node (layout Region or Control) then the root’s size will track the scene’s
size, causing the contents to be relayed out as necessary.
*The scene’s size may be initialized by the application during construction:
§If no size is specified, the scene will automatically compute its initial size based on the preferred size
of its content.
§If only one dimension is specified, the other dimension is computed using the specified dimension,
respecting content bias of a root.
*A default headlight will be added to a scene that contains one or more Shape3D
nodes, but no light nodes.
§This light source is a Color.WHITE PointLight placed at the camera position.
*Scene objects must be constructed and modified on the JavaFX Application Thread.

84
Q

Node Class

A

*Each node in the scene graph can be given a unique id, much like the “id” attribute of
an HTML tag (make it unique).
§The id can also be used identify nodes for applying styles.
*Defines a traditional computer graphics “local” coordinate system in which the x axis
increases to the right and the y axis increases downwards.
*Any Node can have transformations applied to it: translation, rotation, scaling, or
shearing.§Local to scene transformation: from the local coordinate space of this Node into the coordinate space
of its Scene.
§Scene to local transformation: from the coordinate space of the Scene into the local coordinate space
of this Node.
*CSS: The Node class contains id, styleClass, and style variables that are used in
styling this node from CSS.§The id and styleClass variables are used in CSS style sheets to identify nodes to which styles
should be applied.
§The style variable contains style properties and values applied directly to this node.

85
Q

Built-In Layouts

A

*AnchorPane: allows the edges of child nodes to be anchored to an offset from
the anchor pane’s edges.
*BorderPane: lays out children in top, left, right, bottom, and center positions.
*FlowPane: lays out its children in a flow that wraps at the flowpane’s boundary.
*GridPane: lays out its children within a flexible grid of rows and columns.
*HBox: lays out its children in a single horizontal row.
*StackPane: lays out its children in a back-to-front stack.
*TilePane: lays out its children in a grid of uniformly sized “tiles”.
*VBox: lays out its children in a single vertical column.

86
Q

Collections

A

*Collections of items can presented to a user using several types of UI controls:
§An observable collection from the model is assigned to a UI control object using the
setItems method.
*The user can select one or more items from the collections.
*The information about the selected items from the collection is stored in a
selection model:
o Single selection: at most one item can be selected.
o Multiple selection: More than one item can be selected.
qCan be configured using a selection mode (single/multiple selection).
qWhich item has focus (e.g., receives keyboard input).
*The information about the item that has focus (input) is stored in a focus model.

87
Q

The SelectionModel Class

A

*It is an abstract class used by UI controls to provide a consistent API for
maintaining selection.
*It has two properties:
§selectedIndex: the currently selected index value in the selection model.
§selectedItem: the currently selected item in the selection model.
*Two sub-classes:
§SingleSelectionModel: enforces the requirement that only a single index be
selected at any given time (e.g., ChoiceBox).
§MultipleSelectionModel: an abstract class that extends SelectionModel to
add API to support multiple selection.
o SelectionMode: An enumeration used to specify how many items may be selected,
SINGLE or MULTIPLE.

88
Q

The FocusModel Class

A

*The abstract base class for FocusModel implementations.
*It has two properties:
§focusedIndex: the index of the current item in the FocusModel which has the
focus.
§focusedItem: the current item in the FocusModel which has the focus.
*A sub-class:
§TableFocusModel: The abstract base class for FocusModel implementations that
are used within table-like controls