Chapter 13 Flashcards
What does CSS stand for
Cascading Style Sheets
What is a style sheet
Text file that contains one or more style definitions
What is a selector
Determines the node or nodes that are affected by the style definition
What are selector names that begin with a period
Type selectors
When a selector name starts with a period in a JavaFX CSS style definition, it means the selector corresponds to ____.
Specific types of JavaFX nodes
Which of these is written in the correct syntax for a CSS style definition?
.label { -fx-font-size: 20pt; }
If you want to apply styles to all of the nodes in a scene, use the____ selector
.root
The ___ CSS property is used to change a control’s background color in a JavaFX application.
-fx-background-color
When you define a color in CSS, you specify an integer value in the range of ___ for each of the color components (red, green, and blue).
0 through 255
In the hexadecimal color value #05AAFF, the AA value specifies which color component?
green
What style definition applies a background color of #0000FF to all Button controls?
.button { -fx-background-color: #0000FF; }
Adding RadioButton controls to this type of object creates a mutually exclusive relationship between them
ToggleGroup
This RadioButton method returns true if this control is selected
isSelected()
The ___control displays a list of items and allows the user to select one or more items from the list.
ListView
The____control presents its items in a drop-down list.
ComboBox
Both the ListView control and the ComboBox control keeps its list of items in a(n) ____object
ObservableList
A ____ is like a TextField that can accept multiple lines of input.
TextArea
You use this class to create a menu bar.
MenuBar
You use this class to create a radio menu item.
RadioMenuItem
TRUE OR FALSE: If you make any changes to an application’s stylesheet, you have to recompile the Java application in order for the style changes to take effect.
False
TRUE OR FALSE: If a style definition for a specific type of node contradicts a style rule in the .root definition, the more specific style definition takes precedence over the .root definition
True
TRUE OR FALSE: You can list only one selector in the first line of a style definition.
False
TRUE OR FALSE: A node’s setStyle method removes any styles that were previously applied to the node, and replaces them with the new style rule that is passed as an argument.
True
TRUE OR FALSE: A scroll bar automatically appears when a ListView contains more items than can be displayed in the space provided
True