Results 1 to 14 of 14
Thread: What is adapter class?
-
01-29-2016, 03:13 AM #1
What is adapter class?
An adapter class provides an empty implementation of all methods in an event listener interface. Adapter classes are useful when you want to receive and process only some of the events that are handled by a particular event listener interface. You can define a new class to act listener by extending one of the adapter classes and implementing only those events in which you are interested. For example, the MouseMotionAdapter class has two methods, mouseDragged()and mouseMoved(). The signatures of these empty are exactly as defined in the MouseMotionListener interface. If you are interested in only mouse drag events, then you could simply extend MouseMotionAdapter and implement mouseDragged() .
-
02-08-2016, 05:15 AM #2
- Join Date
- Jan 2016
- Location
- Mumbai
- Posts
- 148
Re: What is adapter class?
An adapter class provides the default implementation of all methods in an event listener interface. Adapter classes are very useful when you want to process only few of the events that are handled by a particular event listener interface.
Bulkmailstack
-
04-29-2016, 03:27 PM #3
- Join Date
- Feb 2016
- Posts
- 469
Re: What is adapter class?
Adapter is a pattern that provides default (often empty) implementation of interface or abstract class. For example MouseAdapter provides empty implementation of MouseListener interface. It is useful because very often you do not really use all methods declared by interface, so implementing the interface directly is very verbose.
-
05-17-2016, 06:31 AM #4
- Join Date
- Jan 2015
- Posts
- 567
Re: What is adapter class?
I agree with this post.
-
06-01-2016, 12:30 AM #5
- Join Date
- May 2016
- Posts
- 90
Re: What is adapter class?
An adapter is one of the classic design patterns. It is also a class in Java that implements an interface with a set of dummy methods. It lets you rapidly implement an interface.
-
06-01-2016, 12:54 AM #6
- Join Date
- May 2016
- Location
- Bhilai
- Posts
- 312
Re: What is adapter class?
it is the listener interface toll in html. it is the default implementation to this html coding. adapter classes is very useful in the html and reduce clutter. since the java does't implement the clutter reduce.
-
07-02-2016, 03:16 AM #7
Re: What is adapter class?
The Adapter class provides the default modification of all methods of an interface, we don't need to modify all the methods of the interface so we can say it reduces coding burden. The adapter class is very helpful since it already modifies all the methods of an interface and by implementing the Adapter class, we only need to modify the required methods.
-
07-09-2016, 05:21 AM #8
- Join Date
- Jan 2016
- Location
- Mumbai
- Posts
- 563
Re: What is adapter class?
I agree with you this post.
-
09-14-2016, 04:39 AM #9
- Join Date
- Jul 2016
- Location
- Bangalore
- Posts
- 41
Re: What is adapter class?
The adapter is one of classic design patterns it is a class implement interface set of dummy methods most commonly adapter used to help you rapidly construct your own listener class field events.
-
09-22-2016, 05:41 AM #10
- Join Date
- Sep 2016
- Posts
- 20
Re: What is adapter class?
An adapter class provides the default implementation of all methods in an event listener interface.
-
09-28-2016, 10:05 AM #11
Re: What is adapter class?
It seems you are answering your own questions. Good going.
-
10-10-2016, 04:22 AM #12
- Join Date
- Dec 2015
- Location
- Mumbai
- Posts
- 385
Re: What is adapter class?
An adapter class provides the default implementation of all methods in an event listener interface. Adapter classes are very useful when you want to process only few of the events that are handled by a particular event listener interface.
-
10-13-2016, 12:49 AM #13
- Join Date
- Oct 2016
- Posts
- 650
Re: What is adapter class?
An adapter class provides the default implementation of all methods in an event listener interface. Adapter classes are very useful when you want to process only few of the events that are handled by a particular event listener interface. You can define a new class by extending one of the adapter classes and implement only those events relevant to you.
-
01-25-2018, 12:44 AM #14
Re: What is adapter class?
The adapter classes are found in java.awt.event, java.awt.dnd and javax.swing.event packages. An adapter class provides the default implementation of all methods in an event listener interface.
Similar Threads
-
How to repair notebook Adapter?
By sweetcorn in forum General TalkReplies: 3Last Post: 11-15-2013, 08:19 AM -
Analog Telephone Adapter
By Prince25 in forum Technology ForumReplies: 1Last Post: 10-29-2013, 05:19 AM
Bookmarks