Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FocusListener's isTemporary()

 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
there is a confusion in my mind about isTemporary() method,
say, we have a button in a frame and it's selected. so when we minimize that frame we get temporary focus lost on that button and isTemporary() is true in that case (becuase actually focus is not lost and when we maximize the frame again we still have focus on that button)
but, when we will have temporary focus gained??? meaning when we can have isTemporary() true in focusGained() method???
if someone can give me an example it would be great. i tried to think of the example but i'm not able to come up with any example.
thanks!
maulin.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
isTemporary() belongs to FocusEvent, not FocusListener.
Temporary loss of focus includes other operations that are perceived as "quick grabs" from the current component. For example, when the user manipulates the scrollbar's slider, the button shouldn't be simultaneously clickable. Focus changes accordingly, but only for as long as the scrolling operation continues.
When scrolling is complete, all FocusListeners are notified that attention is now back on the original button.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic