SlideShare a Scribd company logo
What is a Java Bean.What is a Java Bean.
Components and classes with respect to Java Bean.Components and classes with respect to Java Bean.
Java.Beans(Package).Java.Beans(Package).
The Component and its type in Java Beans.The Component and its type in Java Beans.
Useful Terms while Using Java Beans.Useful Terms while Using Java Beans.
Software ComponentsSoftware Components
Visually Manipulated, Builder ToolsVisually Manipulated, Builder Tools
SupportSupport
“It’s a Component Architecture of Java which allow
you to define the Component ”
Java Bean is nothing but the Java Class.
Example:-
Swing are all the Java Bean component
Component (Button,TextField,Label)
Java Bean classes follow certain Rule or Condition.
All java Bean classes must Implement the
Serializable Interface.
Component may be used by some apllication
builder.
A bean has a no argument constructor.
Serializing
CLASS
Class Object
Component
Object
Java Bean API makes it possible to write the
component s/w in a java programming language.
This package will be used depending upon the need
of the Application (based on funcion of bean classes).
Now when its only the use of the property or the
Getter & Setter Method at that time you might not
even make a use of this package.
The component is nothing but the group of classes.
Example:- Jbutton(it’s a component not a class).
In order to a swing Button there are whole lot of
class are involved to build this Jbutton.
Component is a single Functionality provided by
many different classes
Component is a group of classses that interact with
eachother to fulfill the single purpose.
Application developer uses different beans in his
application using the Java Beans.
You can build two types of Components.
Component
GUI based
Non GUI based
Extends
Component
Properties
Event
Persistence
Introspection
Customization
Discrete,Discrete, named attributesnamed attributes thatthat determinedetermine thethe
appearanceappearance ,,behaviorbehavior andand statestate of aof a component.component.
Accessible programmatically throughAccessible programmatically through accessoraccessor
methods.methods.
Accessible visually throughAccessible visually through property sheets.property sheets.
Simple PropertiesSimple Properties
Boolean PropertiesBoolean Properties
Indexed PropertiesProperties
1 Simple Properties:-1 Simple Properties:-
Represent a single value.Represent a single value.
The accessor methods should follow standard namingThe accessor methods should follow standard naming
conventions.conventions.
public <PropertyType> get<PropertyName>();
public void set<PropertyName>(<PropertyType> value);
Example:
public String getHostName();
public void setHostName( String hostName );
22 BooleanPropertiesBooleanProperties:-:-
They are simple propertiesThey are simple properties
The getter methods follow an optional design patternThe getter methods follow an optional design pattern
public boolean is<PropertyName>();
Example:
public boolean isConnected();
33 Indexed PropertiesProperties:-:-
Represent an array of valuesRepresent an array of values
public <PropertyElement> get<PropertyName>(int index);
public void set<PropertyName>(int index,<PropertyElement> value);
public <PropertyElement>[] get<PropertyName>();
public void set<PropertyName>(<PropertyElement>[] values);
Example:
public Color setPalette(int index);
public void setPalette(int index,Color value);
public Color[] getPalette();
public void setPalette(Color[] values);
Bound:-
a bound property notifies other objects when its value
changes
generates a PropertyChange event with property name,
old value and new value
Constrained:-
an object with constrained properties allows other
objects to veto a constrained property value change
Constrained property listeners can veto a change by
throwing a PropertyVetoException
Two types of objects are involved:Two types of objects are involved:
““Source” objects.Source” objects.
““Listener” objects.Listener” objects.
Message sent from one object to another.Message sent from one object to another.
SenderSender firesfires event, recipient (listener)event, recipient (listener) handleshandles thethe
eventevent
There may be many listeners.There may be many listeners.
Event
source
Event
listener
Fire event
Event
Object
Register listener
Sender fires event, recipient (listener) handles
the event
Persistance
Your Bean should be able to store its state, which
means there should be the serializable interface.
Upon the Bean a builder tool should be able to make a
reflaction and be able to create an object of your
component.
[Ex. Drag and drop a component in to a design area and
the builder tool should be able to create the instance of
that component and be able to display the property of
that bean via reflaction.]
Customization
Using the Bean customization, you can specify what
methods or the properties that you want to expose at
rhe run time environment, so such property will be
displayed in the propertysheet.
Introspection
Is nothing but a reflection using which the builder tool
can display all the events and the properties of the
component.
Reflection API
It helps us to find out what are the contents of the class,
so you can findout what are the methods, constructors
and variables in the class and you can find out the
details in return.
Due to the process of the reflection builder tool can be
able to display what are the property of the Component
in the property sheet and also provides the details
regarding the Events and methods.
Buttons
Text Fields
List Boxes
Scroll Bars
Dialogs
BeanBoxToolBoxToolBox BeanBox
Property Sheet
BDK - SunBDK - Sun
NetBeans – www.netbeans.orgNetBeans – www.netbeans.org
Jbuilder - InpriseJbuilder - Inprise
Super Mojo - Penumbra SoftwareSuper Mojo - Penumbra Software
Visual Age for Java - IBMVisual Age for Java - IBM
Visual Cafe - Symantec CorporationVisual Cafe - Symantec Corporation
JDeveloper Suite - OracleJDeveloper Suite - Oracle
Java beans

More Related Content

What's hot

Java beans
Java beansJava beans
Java beans
Mukesh Tekwani
 
Javabeans .pdf
Javabeans .pdfJavabeans .pdf
Javabeans .pdf
Rajkiran Mummadi
 
Beans presentation
Beans presentationBeans presentation
Beans presentation
manjusha ganesan
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
vamsi krishna
 
Advance java session 12
Advance java session 12Advance java session 12
Advance java session 12
Smita B Kumar
 
A Dexterity Intro for Recovering Archetypes Addicts
A Dexterity Intro for Recovering Archetypes AddictsA Dexterity Intro for Recovering Archetypes Addicts
A Dexterity Intro for Recovering Archetypes Addicts
David Glick
 
Dexterity in the Wild
Dexterity in the WildDexterity in the Wild
Dexterity in the Wild
David Glick
 

What's hot (7)

Java beans
Java beansJava beans
Java beans
 
Javabeans .pdf
Javabeans .pdfJavabeans .pdf
Javabeans .pdf
 
Beans presentation
Beans presentationBeans presentation
Beans presentation
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Advance java session 12
Advance java session 12Advance java session 12
Advance java session 12
 
A Dexterity Intro for Recovering Archetypes Addicts
A Dexterity Intro for Recovering Archetypes AddictsA Dexterity Intro for Recovering Archetypes Addicts
A Dexterity Intro for Recovering Archetypes Addicts
 
Dexterity in the Wild
Dexterity in the WildDexterity in the Wild
Dexterity in the Wild
 

Viewers also liked

Unit 3
Unit 3Unit 3
Unit 3
vamsitricks
 
Javabeanproperties
JavabeanpropertiesJavabeanproperties
Javabeanproperties
vamsitricks
 
Bean Intro
Bean IntroBean Intro
Bean Intro
vikram singh
 
Data warehousing and data mining
Data warehousing and data miningData warehousing and data mining
Data warehousing and data mining
vamsi krishna
 
Javabean1
Javabean1Javabean1
Javabean1
Saransh Garg
 
Unit 7
Unit 7Unit 7
Unit 7
vamsitricks
 
Software project management
Software project managementSoftware project management
Software project management
vamsi krishna
 
Network programming
Network programmingNetwork programming
Network programming
vamsi krishna
 
Unit 6
Unit 6Unit 6
Unit 6
vamsitricks
 
Npc13
Npc13Npc13

Viewers also liked (10)

Unit 3
Unit 3Unit 3
Unit 3
 
Javabeanproperties
JavabeanpropertiesJavabeanproperties
Javabeanproperties
 
Bean Intro
Bean IntroBean Intro
Bean Intro
 
Data warehousing and data mining
Data warehousing and data miningData warehousing and data mining
Data warehousing and data mining
 
Javabean1
Javabean1Javabean1
Javabean1
 
Unit 7
Unit 7Unit 7
Unit 7
 
Software project management
Software project managementSoftware project management
Software project management
 
Network programming
Network programmingNetwork programming
Network programming
 
Unit 6
Unit 6Unit 6
Unit 6
 
Npc13
Npc13Npc13
Npc13
 

Similar to Java beans

WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
Bhavsingh Maloth
 
Java beans
Java beansJava beans
Java beans
sptatslide
 
Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)
SURBHI SAROHA
 
Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)
SURBHI SAROHA
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
vamsitricks
 
CommercialSystemsBahman.ppt
CommercialSystemsBahman.pptCommercialSystemsBahman.ppt
CommercialSystemsBahman.ppt
KalsoomTahir2
 
Acceptance Testing of Web UI
Acceptance Testing of Web UIAcceptance Testing of Web UI
Acceptance Testing of Web UI
Vladimir Tsukur
 
How to use the java bean api library
How to use the java bean api libraryHow to use the java bean api library
How to use the java bean api library
nishajj
 
How to use the java bean api library
How to use the java bean api libraryHow to use the java bean api library
How to use the java bean api library
nishajj
 
P20CSP105-AdvJavaProg.pptx
P20CSP105-AdvJavaProg.pptxP20CSP105-AdvJavaProg.pptx
P20CSP105-AdvJavaProg.pptx
DrTCVijayaraghavan
 
Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204
ealio
 
Spring from a to Z
Spring from  a to ZSpring from  a to Z
Spring from a to Z
sang nguyen
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
Vinay Kumar
 
Spring Basics
Spring BasicsSpring Basics
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
Krishnaov
 
Form part1
Form part1Form part1
Form part1
Sanjeev Pandey
 
Custom components in JSF
Custom components in JSFCustom components in JSF
Custom components in JSF
ESRI Bulgaria
 
Java Beans
Java BeansJava Beans
Java Beans
Ankit Desai
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Rajind Ruparathna
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
NexThoughts Technologies
 

Similar to Java beans (20)

WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
 
Java beans
Java beansJava beans
Java beans
 
Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)
 
Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
CommercialSystemsBahman.ppt
CommercialSystemsBahman.pptCommercialSystemsBahman.ppt
CommercialSystemsBahman.ppt
 
Acceptance Testing of Web UI
Acceptance Testing of Web UIAcceptance Testing of Web UI
Acceptance Testing of Web UI
 
How to use the java bean api library
How to use the java bean api libraryHow to use the java bean api library
How to use the java bean api library
 
How to use the java bean api library
How to use the java bean api libraryHow to use the java bean api library
How to use the java bean api library
 
P20CSP105-AdvJavaProg.pptx
P20CSP105-AdvJavaProg.pptxP20CSP105-AdvJavaProg.pptx
P20CSP105-AdvJavaProg.pptx
 
Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204
 
Spring from a to Z
Spring from  a to ZSpring from  a to Z
Spring from a to Z
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
 
Form part1
Form part1Form part1
Form part1
 
Custom components in JSF
Custom components in JSFCustom components in JSF
Custom components in JSF
 
Java Beans
Java BeansJava Beans
Java Beans
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 

Recently uploaded

KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 

Recently uploaded (20)

KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 

Java beans

  • 1.
  • 2. What is a Java Bean.What is a Java Bean. Components and classes with respect to Java Bean.Components and classes with respect to Java Bean. Java.Beans(Package).Java.Beans(Package). The Component and its type in Java Beans.The Component and its type in Java Beans. Useful Terms while Using Java Beans.Useful Terms while Using Java Beans. Software ComponentsSoftware Components Visually Manipulated, Builder ToolsVisually Manipulated, Builder Tools SupportSupport
  • 3. “It’s a Component Architecture of Java which allow you to define the Component ” Java Bean is nothing but the Java Class. Example:- Swing are all the Java Bean component Component (Button,TextField,Label)
  • 4. Java Bean classes follow certain Rule or Condition. All java Bean classes must Implement the Serializable Interface. Component may be used by some apllication builder. A bean has a no argument constructor. Serializing CLASS Class Object Component Object
  • 5. Java Bean API makes it possible to write the component s/w in a java programming language. This package will be used depending upon the need of the Application (based on funcion of bean classes). Now when its only the use of the property or the Getter & Setter Method at that time you might not even make a use of this package.
  • 6. The component is nothing but the group of classes. Example:- Jbutton(it’s a component not a class). In order to a swing Button there are whole lot of class are involved to build this Jbutton. Component is a single Functionality provided by many different classes Component is a group of classses that interact with eachother to fulfill the single purpose.
  • 7. Application developer uses different beans in his application using the Java Beans. You can build two types of Components. Component GUI based Non GUI based Extends Component
  • 9. Discrete,Discrete, named attributesnamed attributes thatthat determinedetermine thethe appearanceappearance ,,behaviorbehavior andand statestate of aof a component.component. Accessible programmatically throughAccessible programmatically through accessoraccessor methods.methods. Accessible visually throughAccessible visually through property sheets.property sheets.
  • 10. Simple PropertiesSimple Properties Boolean PropertiesBoolean Properties Indexed PropertiesProperties
  • 11. 1 Simple Properties:-1 Simple Properties:- Represent a single value.Represent a single value. The accessor methods should follow standard namingThe accessor methods should follow standard naming conventions.conventions. public <PropertyType> get<PropertyName>(); public void set<PropertyName>(<PropertyType> value); Example: public String getHostName(); public void setHostName( String hostName );
  • 12. 22 BooleanPropertiesBooleanProperties:-:- They are simple propertiesThey are simple properties The getter methods follow an optional design patternThe getter methods follow an optional design pattern public boolean is<PropertyName>(); Example: public boolean isConnected();
  • 13. 33 Indexed PropertiesProperties:-:- Represent an array of valuesRepresent an array of values public <PropertyElement> get<PropertyName>(int index); public void set<PropertyName>(int index,<PropertyElement> value); public <PropertyElement>[] get<PropertyName>(); public void set<PropertyName>(<PropertyElement>[] values); Example: public Color setPalette(int index); public void setPalette(int index,Color value); public Color[] getPalette(); public void setPalette(Color[] values);
  • 14. Bound:- a bound property notifies other objects when its value changes generates a PropertyChange event with property name, old value and new value Constrained:- an object with constrained properties allows other objects to veto a constrained property value change Constrained property listeners can veto a change by throwing a PropertyVetoException
  • 15. Two types of objects are involved:Two types of objects are involved: ““Source” objects.Source” objects. ““Listener” objects.Listener” objects. Message sent from one object to another.Message sent from one object to another. SenderSender firesfires event, recipient (listener)event, recipient (listener) handleshandles thethe eventevent There may be many listeners.There may be many listeners.
  • 16. Event source Event listener Fire event Event Object Register listener Sender fires event, recipient (listener) handles the event
  • 17. Persistance Your Bean should be able to store its state, which means there should be the serializable interface. Upon the Bean a builder tool should be able to make a reflaction and be able to create an object of your component. [Ex. Drag and drop a component in to a design area and the builder tool should be able to create the instance of that component and be able to display the property of that bean via reflaction.]
  • 18. Customization Using the Bean customization, you can specify what methods or the properties that you want to expose at rhe run time environment, so such property will be displayed in the propertysheet. Introspection Is nothing but a reflection using which the builder tool can display all the events and the properties of the component.
  • 19. Reflection API It helps us to find out what are the contents of the class, so you can findout what are the methods, constructors and variables in the class and you can find out the details in return. Due to the process of the reflection builder tool can be able to display what are the property of the Component in the property sheet and also provides the details regarding the Events and methods.
  • 22. BDK - SunBDK - Sun NetBeans – www.netbeans.orgNetBeans – www.netbeans.org Jbuilder - InpriseJbuilder - Inprise Super Mojo - Penumbra SoftwareSuper Mojo - Penumbra Software Visual Age for Java - IBMVisual Age for Java - IBM Visual Cafe - Symantec CorporationVisual Cafe - Symantec Corporation JDeveloper Suite - OracleJDeveloper Suite - Oracle