application has control at all stages of execution
3
New cards
Non-GUI applications
user's interaction with the application is pre-programmed
4
New cards
Non-GUI applications
application calls to the OS to execute built in language modules
5
New cards
GUI Applications
Application that is windows/forms-based
6
New cards
GUI Applications
non-sequential program execution
7
New cards
GUI Applications
Event Driven
8
New cards
Event Driven
Application sits in a process loop waiting for an event to occur/execute
9
New cards
GUI Applications
Application receives message from the OS that an event has occurred
10
New cards
Event
a notification from the OS that an action has occurred
11
New cards
Event
this needs to be registered to work
12
New cards
Event Handler
methods that tell what should be done when an event occurs
13
New cards
Event Handler
their order of executions differ in every program execution
14
New cards
Event-Driven Programming
It involves a new type of flow-of-controls - events
15
New cards
Event-Driven Programming
It is asynchronous. They manifest themselves by altering the state of the execution environment. They are detected through this change.
16
New cards
Control Structure is inverted
system has control, not the application
17
New cards
System
It waits for an event then calls the appropriate routine in the application
18
New cards
a set of classes (widgets)
they can detect user's input
19
New cards
listeners or event handlers
define what the system will do in response to an event
20
New cards
Java Foundation Classes (JFC)
a set of GUI components for Java applications
21
New cards
Java Foundation Classes (JFC)
encompasses a group of features for building Graphical User Interface (GUI)
22
New cards
Java Foundation Classes (JFC)
adds rich graphics functionality and interactivity to Java Applications
23
New cards
Features of Java Foundation Classes (JFC)
-Swing GUI Components -Pluggable Look-and-Feel Support -Accessible API -Java 2D API -Internalization
24
New cards
Java Abstract Window Toolkit
an API to develop GUI or window-based applications in Java
25
New cards
Java Abstract Window Toolkit
the package provides classes for this word such as Text Field, Label, TextArea, RadioButton, CheckBox, Choice, List, etc.
26
New cards
Java Abstract Window Toolkit
Maps general Java code to each operating system's real GUI System
27
New cards
Java Swing
part of Java Foundation Classes (JFC) that is used to create window- based applications
28
New cards
Java Swing
built on the top of AWT (Abstract Windowing Toolkit) API and entirely written in java
29
New cards
Java Swing
Paints GUI controls itself pixel-by-pixel rather than handing off to OS.
30
New cards
Java Swing
Unlike AWT, it provides platform-independent and lightweight components.
31
New cards
Java Swing
package provides classes for it such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc
32
New cards
AWT
AWT vs Swing: Components are platform dependent
33
New cards
AWT
AWT vs Swing: Components are heavyweight
34
New cards
AWT
AWT vs Swing: Doesn’t support pluggable look and feel
35
New cards
AWT
AWT vs Swing: Provides less components than Swing
36
New cards
AWT
AWT vs Swing: Doesn’t follow MVC design architecture
37
New cards
Swing
Components are platform independent
38
New cards
Swing
Components are lightweight
39
New cards
Swing
Supports pluggable look and feel
40
New cards
Swing
Provides more powerful components
41
New cards
Swing
Follows MVC design architecture
42
New cards
Model-View-Controller Pattern
Software architecture pattern that separates the model, the user- interface and control logic of an application in three distinct components
43
New cards
Model
(MVC) Representation of domain data
44
New cards
Model
(MVC) Business logic
45
New cards
Model
(MVC) Persistence mechanism
46
New cards
View
(MVC) User interface
47
New cards
View
(MVC) Interaction elements
48
New cards
Controller
(MVC) Intermediary between the Model and View
49
New cards
Controller
(MVC) Maps user actions to model actions
50
New cards
Benefits of MVC
• Organization • Rapid Application Development • Code reuse Parallel development • Presents the same information in different ways • The views and application behavior should reflect the manipulations of data immediately • Allows different user interface standards or port it to other environments where the application codes should not be affected.
51
New cards
1
MVC Control Flow (number) The user performs an action on the interface
52
New cards
2
MVC Control Flow (number) The controller takes the input event
53
New cards
3
MVC Control Flow (number) The controller notifies the user action to the model which may involve a change of the model’s state
54
New cards
4
MVC Control Flow (number) It generates a new view. The view takes the data model.
55
New cards
5
MVC Control Flow (number) The user interface waits for another user interaction, which starts a new cycle.
56
New cards
Model
MVC and Java GUI • made by the programmer/developer
57
New cards
View
MVC and Java GUI • set of objects of classes that inherit from java.awt.Component
58
New cards
Controller
MVC and Java GUI • The event processing thread which captures and propagates the event to the view and model.
59
New cards
Controller
MVC and Java GUI • Uses classes of events that implement EventListener type interfaces (e.g. ActionListener)