ITSE 2317 Intermediate Java
Controlling Opacity with a Slider
Lecture # 07
Run: Sun Sep 12 20:27:27 CDT 2010
Baldwin

Slides
aa  -  Welcome to Intermediate Java
ab  -  ITSE 2317 Intermediate Java
ac  -  Controlling Opacity with a Slider
ad  -  Figures
ae  -  Listings
af  -  Preview
ag  -  Two approaches
ah  -  The easiest way
ai  -  The second approach
aj  -  A better approach
ak  -  Outside research
al  -  Modification to the SimplePicture class
am  -  Behavior of the program:
an  -  Brief program specifications
ao  -  Two output images
ap  -  Move the thumb to the left
aq  -  Move the thumb to the right
ar  -  Define new classes
as  -  General background information
at  -  Storage of the image
au  -  Image data formats
av  -  No alpha data
aw  -  Modification of the SimplePicture class
ax  -  Modification of the SimplePicture class (cont'd)
ay  -  Future Picture objects will accommodate alpha transparency
az  -  No complete listing of SimplePicture provided
ba  -  Discussion and sample code
bb  -  The class named Prob07
bc  -  The main method
bd  -  The main method (cont'd)
be  -  When the constructor for the Prob07Runner class finishes executing
bf  -  Waiting for an event
bg  -  When an event is fired...
bh  -  The class named Prob07Runner
bi  -  Will explain in fragments
bj  -  Beginning of the class named Prob07Runner
bk  -  Class extends JFrame
bl  -  When Listing 2 finishes executing...
bm  -  The new Picture objects
bn  -  A pair of working variables
bo  -  Some GUI components
bp  -  Beginning of the constructor
bq  -  Straightforward code
br  -  An issue of efficiency
bs  -  Avoiding the inefficiency
bt  -  Display the butterfly at 50-percent opacity
bu  -  Put the constructor on hold
bv  -  The setOpacity method
bw  -  The setOpacity method (cont'd)
bx  -  The returned reference
by  -  A bitwise left-shift operation
bz  -  A 24-bit left shift
ca  -  A 24-bit left shift (cont'd)
cb  -  Apply the opacityMask to the pixels
cc  -  Draw the modified image on the beach scene
cd  -  The drawPictureOnPicture method
ce  -  The drawPictureOnPicture method (cont'd)
cf  -  Return to the explanation of the constructor
cg  -  The behavior from a big-picture viewpoint
ch  -  Restore the background image
ci  -  Draw a partially opaque butterfly image on the background
cj  -  A more detailed view of the behavior
ck  -  A series of events
cl  -  The stateChanged method...
cm  -  A new copy of the beach image
cn  -  Draw the butterfly
co  -  Repaint the image
cp  -  The end of the program
cq  -  Run the program
cr  -  Summary
cs  -  Complete program listing
ct  -  End of slides

-end-