Welcome to the Webmaster Forum.
Results 1 to 14 of 14
  1. #1
    Senior Member
    Join Date
    Jan 2014
    Location
    Banglore
    Posts
    289

    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() .

  2. #2
    Senior Member
    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

  3. #3
    Senior Member
    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.

  4. #4
    Senior Member
    Join Date
    Jan 2015
    Posts
    567

    Re: What is adapter class?

    I agree with this post.

  5. #5
    Member
    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.

  6. #6
    Senior Member
    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.

  7. #7
    Member
    Join Date
    Jun 2016
    Posts
    72

    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.

  8. #8
    Senior Member
    Join Date
    Jan 2016
    Location
    Mumbai
    Posts
    563

    Re: What is adapter class?

    I agree with you this post.

  9. #9
    Member
    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.

  10. #10
    Junior Member
    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.

  11. #11
    Junior Member
    Join Date
    Sep 2016
    Posts
    16

    Re: What is adapter class?

    It seems you are answering your own questions. Good going.

  12. #12
    Senior Member
    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.

  13. #13
    min
    min is offline
    Senior Member
    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.

  14. #14
    Senior Member
    Join Date
    Sep 2017
    Posts
    133

    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

  1. How to repair notebook Adapter?
    By sweetcorn in forum General Talk
    Replies: 3
    Last Post: 11-15-2013, 08:19 AM
  2. Analog Telephone Adapter
    By Prince25 in forum Technology Forum
    Replies: 1
    Last Post: 10-29-2013, 05:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Back to top

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228