Nov 061 Size Control How is a component’s size determined during layout and during resize operations? Three factors determine component sizes: The component’s.

Slides:



Advertisements
Similar presentations
2D Graphics Drawing Things. Graphics In your GUI, you might want to draw graphics E.g. draw lines, circles, shapes, draw strings etc The Graphics class.
Advertisements

Images Images are a key component of any multimedia presentation.
Lecture 2 Concepts, Terms and Definitions. Display Devices They are divided into a lot of small squares called pixels (“PICture ELements”). Each pixel.
A Digital Imaging Primer Nick Dvoracek Instructional Resources Center University of Wisconsin Oshkosh.
CGA 115 Professor Mary A. Malinconico. Questions from Last Week ????????
Objectives Define photo editing software
Digital Imaging and Image Analysis
Fundamentals of Digital Imaging
Multi-media Graphics JOUR 205 Color Models & Color Space 5 ways of specifying colors.
GUI programming AWT(Abstract Windows Toolkit)-GUI components library when Java was introduced AWT was replaced by Swing components import javax.swing.*;
CSc 461/561 CSc 461/561 Multimedia Systems Part A: 2. Image.
How Images are Represented Bitmap images (Dots used to draw the image) Monochrome images 8 bit grey scale images 24 bit colour Colour lookup tables Vector.
COSC 3461: Module 7 Graphical Display. 2 Issues for Graphical Representation How should the graphical images be represented (formally, internally)? How.
1 Internet Graphics. 2 Representing Images  Raster Image: Images consist of “dots” of color, not lines  Pixel: Picture element-tiny rectangle  Resolution:
Bitmapped Images. Bitmap Images Today’s Objectives Identify characteristics of bitmap images Resolution, bit depth, color mode, pixels Determine the most.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Computer Graphics Using “ Adobe Photoshop ” Introduction to E-Learning Center, DAD presents Workshop on Instructor: Mazhar.
GCSE Computing#BristolMet Session Objectives#9 MUST identify the data needed for a computer to display an image correctly (metadata) SHOULD describe the.
Objective Understand concepts used to create digital graphics. Course Weight : 15% Part Three : Concepts of Digital Graphics.
Digital Terminology. Bitmap A representation consisting of rows and columns of dots of a graphic image stored in computer memory. To display a bitmap.
I-1 Steps of Image Generation –Create a model of the objects –Create a model for the illumination of the objects –Create an image (render) the result I.
Video Monitor Uses raster scanning to display images –Beam of electrons illuminates phosphorus dots on the screen called pixels. Starting at the top of.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Images Data Representation. Objectives  Understand the terms bitmap & pixel  Understand how bitmap images are stored using binary in a computer system.
Java Programming: Advanced Topics 1 Common Elements of Graphical User Interfaces Chapter 6.
Computer Science 112 Fundamentals of Programming II Graphics Programming.
Color and Resolution Introduction to Digital Imaging.
Graphics. Graphic is the important media used to show the appearance of integrative media applications. According to DBP dictionary, graphics mean drawing.
Laying Out Components Interior Design for GUIs. Nov 042 What is Widget Layout? Positioning widgets in their container (typically a JPanel or a JFrame’s.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Nov 111 Example Program DemoMouseInk.java. Nov 112 Example Program DemoMouseUnistrokes.java.
ADOBE PHOTOSHOP VECTOR VS RASTER. Pixel A pixel is the fundamental unit of an image in Photoshop. It is a small square block of color. An image often.
Which is the Pink Pen? Here is the Pink Pen (Example taken from
3461 Output Model A picture is worth a thousand words.
Computer Graphics An Introduction Jimmy Lam The Hong Kong Polytechnic University.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
3461 Laying Out Components Interior Design for GUIs.
Adobe Photoshop CS5 – Illustrated Unit A: Getting Started with Photoshop CS5.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Color Web Design Professor Frank. Color Displays Based on cathode ray tubes (CRTs) or back- lighted flat-screen Monitors transmit light - displays use.
CS 101 – Sept. 14 Review Huffman code Image representation –B/W and color schemes –File size issues.
Intro to Color Theory. Objectives Identify and discuss various color models including RGB, CMYK, Black/white and spot color. Investigate color mixing.
Chapter 3 Color Objectives Identify the color systems and resolution Clarify category of colors.
3461 Course Summary COSC 3461A Fall Intro to UI Design  Course plan: Implementation, Evaluation, Design  Human Computer Interaction is an.
© ExplorNet’s Centers for Quality Teaching and Learning 1 Objective % Understand concepts used to create digital graphics.
Adobe Photoshop CS4 – Illustrated Unit A: Getting Started with Photoshop CS4.
Introduction to GUI Programming in Java: Frames, Simple Components, and Layouts.
Graphics Basic Concepts 1.  A graphic is an image or visual representation of an object.  A visual representation such as a photo, illustration or diagram.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Photoshop CS6 – Nelson Unit 3: Photoshop CS6. Objectives Define photo editing software Start Photoshop and view the workspace Use the Zoom tool and the.
Unit 2.6 Data Representation Lesson 3 ‒ Images
Objective % Explain design concepts used to create digital graphics.
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging
Images Data Representation.
Getting Started with Adobe Photoshop CS6
Data Representation Images.
Binary Representation in Audio and Images
Basic Desktop Terminology
Tim McKenna Layout Mangers in Java Tim McKenna
Microprocessor and Assembly Language
Adobe Visual Design 2.00 Identifying design elements when preparing images (10%) 7.00 Identifying design elements when preparing illustrations (1%)
COMS 161 Introduction to Computing
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Basic Graphics Drawing Shapes 1.
Computer Graphics Using “Adobe Photoshop”
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Color Model By : Mustafa Salam.
Objective % Explain design concepts used to create digital graphics.
Layout Organization and Management
Presentation transcript:

Nov 061 Size Control How is a component’s size determined during layout and during resize operations? Three factors determine component sizes: The component’s size properties (preferred, minimum, and maximum) Whether the size properties are “assumed” or “explicitly set” Layout manager policies

Nov 062 Example Program DemoSizeControl.java usage: java DemoSizeControl arg1 where 'arg1' specifies the layout manager as follows: 1 = BorderLayout 2 = FlowLayout 3 = GridLayout 4 = BoxLayout Example (next 2 slides)

Nov 063 Example Program (2) JButton b1 = new JButton("Button One"); JButton b2 = new JButton("B2"); JButton b3 = new JButton("B3"); JButton b4 = new JButton("B4"); b3.setMaximumSize(b1.getPreferredSize()); b4.setPreferredSize(new Dimension(150, 50)); b4.setMaximumSize(new Dimension(150, 50)); Component construction and configuration

Nov 064 Border Layout Flow Layout Grid Layout Box Layout Expands to maximum size when resizing Output

Nov 065 Default Layout Managers JPanel = FlowLayout JFrame’s content pane = BorderLayout

Nov 066 Programming Challenge Create a GUI layout, as follows Clear Exit Enter some text: Clear Exit Enter some text: Upon launching After resizing

Output Model A picture is worth a thousand words

Nov 068 Coordinate Systems Device coordinates Physical coordinates

Nov 069 Device Coordinates Most natural units for the output device Typically dots or pixels Origin possibilities Centre Bottom left Upper left

Nov 0610 Physical Coordinates Printed page inches, cm Architectural drawings feet, meters

Nov 0611 Component Java’s Coordinate System (0,0) x y (width – 1, height - 1)

Nov 0612 Example Program (shown earlier) DemoMouseEvents.java (x, y) coordinate of pointer in component

Nov 0613 Pixels A Pixel is a “picture element” a single point in a graphic image A graphics display is divided into thousands (or millions) of pixels arranged in rows and columns The pixels are so close together they appear connected The number of bits used to represent each pixel determines how many colours or shades of grey can be represented For a B&W (black and white) display, each pixel is represented by 1 bit With 8 bits per pixel, a monitor can display 256 shades or grey or 256 colours (Note: 2 8 = 256)

Nov 0614 An image presented on a display is composed of pixels pixel

Nov 0615 Display Size Usually specified in “inches” Value cited is the diagonal dimension of the raster -- the viewable area of the display E.g., a 15” monitor 15”

Nov 0616 Resolution Resolution is the number of pixels on a display Usually cited as n by m n is the number of pixels across the display m is the number of pixels down the display Typical resolutions range from… 640 by 480 (low end), to 1,600 by 1,200 (high end)

Nov 0617 Video RAM Requirements Total number of pixels is n  m Examples 640  480 = 307,200 pixels 1,600  1,200 = 1,920,000 pixels Video RAM required equals total number of pixels times the number of bits/pixel Examples 640  480  8 = 2,457,600 bits = 307,200 bytes = 300 KB 1,600  1,200  24 = 46,080,000 bits = 5,760,000 bytes = 5,625 KB = 5.49 MB Note: 1 KB = 2 10 = 1024 bytes, 1 MB = 2 20 = 1,048,576 bytes

Nov 0618 Resolution Bits per pixel 8 bit16 bit24 bit 640 x x x x x x Video RAM (KB) By Resolution

Nov 0619 Aspect Ratio Aspect ratio is the ratio of the width to height of a display screen For a 640 by 480 display, the aspect ratio is 640:480, or 4:3 Related terms Landscape The width is greater than the height Portrait The height is greater than the width

Nov 0620 Dot Pitch Dot pitch is a measure of the diagonal distance between pixels on a display screen One of the principal characteristics that determines the quality of a display The lower the number, the crisper the image Cited in mm (millimeters) Typical values range from 0.15 mm to 0.30 mm Dot pitch, as specified, is the capability of the display

Nov 0621 Dot Pitch Illustrated Pixel mm

Nov 0622 Dot Pitch Image Example Q: What is the dot pitch of an image displayed on a 15” monitor with a resolution of 640 by 480? A: Z 1. 1.Z = ( ) 1/2 = mm = inch Dot pitch= 15 / 800 inches = inches = / mm = mm Notes:

Nov 0623 Two models for colour RGB Individual specifications for RED, GREEN, and BLUE HSB Individual specifications for hue, saturation, and brightness Together, hue and saturation are called chrominance; they represent the colour Hue is the distinction between colours (e.g., red, orange, yellow, green, etc.) Saturation is the purity of a colour, or the amount of grey in proportion to the hue High saturation  very intense Low saturation  washed out Zero saturation  white brightness is also called luminance or intensity

Nov 0624 RGB model black blue red green cyan yellow white magenta

Nov 0625 RGB Model (2) Color RedGreenBlue Red Green Blue Yellow Cyan Magenta White Black 0 0 0

Nov 0626 Colour Choosers Control for colour usually employs a colour chooser (aka colour picker) Colour selected three ways: A pre-defined palette HSB values RGB values

Nov 0627 Java’s JColorChooser (1) Pre-defined pallete For a demo, see DemoMenu2.java

Nov 0628 Java’s JColorChooser (2) HSBFor a demo, see DemoMenu2.java

Nov 0629 Java’s JColorChooser (3) RGBFor a demo, see DemoMenu2.java

Nov 0630 Microsoft Office

Nov 0631 Netscape Navigator and Microsoft IE

Nov 0632 Paint Shop Pro

Nov 0633 Drawing Java’s “J” components are the building blocks of graphical user interfaces At a lower level, Java provides a set of drawing primitives for Shapes Lines Curves Images Text

Nov 0634 Example Program DemoPaintPanel.java

Nov 0635 Example Program DemoPaintPanel2.java DemoPaintPanel3.java

Nov 0636 Custom painting with Swing JComponentpaint paintChildren paintBorder paintComponent JPanel paint paintChildren paintBorder paintComponent PaintPanel paint paintChildren paintBorder paintComponent extends Never call paint() directly. Instead, call repaint() The right method to override for custom painting