KeyEvents are to KeyBindings as MouseEvents are to ???

Hey, stupid question here.
I've recently been told (on this forum, actually) that KeyEvents are the "old" way to handle keyboard input. The new way is to use KeyBindings and map Actions to the keys you want input from. That's all fine and good, and I finally have all of my KeyEvent stuff translated to KeyBindings and Actions.
Now, is there a similar "new" way to do mouse input? I haven't found anything on google, so I'm thinking no. Why not though? If binding keyboard input to Actions is the better way to handle keyboard input, why is the same not true for mouse input? Or is there a better way to handle mouse input than listening for MouseEvents? Also, is there a "right" or "wrong" way to mix MouseEvents with keyboard bindings?
Thanks,
Kevin

camickr wrote:
This isn't just about KeyStrokes and Actions, its about a general programming concept. The way you want to write code is to write reusable chunks of code. As mentioned above that is all an Action is, it is a reusable piece of code. The binding allows you to easily reuse this code. Maybe it's just that what I'm using the Actions for isn't a perfect example. Actions seem to be the modular way to handle the case where you want multiple actions to perform the same function. However, what if I have mostly a 1 to 1, "this key does this, this other key does this other thing" relationship? Even in the first case where Actions make more sense, I suppose I'm failing to see the difference between an Action that's mapped to several KeyBindings (or whatever you want to trigger the Action), and a function called by several keys in a KeyListener.
Also, is there a "right" or "wrong" way to mix MouseEvents with keyboard bindings?
I don't know if there is a right or wrong way but the key (to me) is that you want to use the Action, not the binding. So if you know that a component has a certain Action, there is no reason you can't have a MouseEvent invoke that Action. This is the way the [List Action|http://www.camick.com/java/blog.html?name=list-action] works.
When I say mix, I mean basically using the CTRL_DOWN_MASK in a mouse click event to distinguish between a regular mouse click and a mouse click when the ctrl key is being held down. The only way I knew to do that is by using KeyEvents and MouseEvents. Now that I've switched my KeyEvents to KeyBindings mapped to Actions, the logical next step seemed to be doing the same for the MouseEvents? I don't necessarily want the mouse to trigger the same action as some key on the keyboard, I want the keyboard to change what the mouse does when it is clicked. Does that make sense?
Anyway, I mostly understand, I'm just still at the point where I don't really see the benefit of KeyBindings and Actions over KeyEvents in my particular circumstance. I see the benefits in general. Maybe I'm just getting too old and becoming resistant to change, haha..

Similar Messages

  • TS1368 I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.

    I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.
    Can you help please?

    Thanks King_Penguin for taking time to read and reply. 
    I just purchased this movie on Thursday, May 15, so just a few days ago.  I have never had any trouble whatsoever since I have been in Vietnam.  I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase. 
    Sorry, I don't quite understand what you mean by studios and different versions.  Could you please explain? 
    I checked my purchased list in my purchase history under my account and there are no hidden items. 

  • HELP. ............Hi folks hope some one can help me please.Having a problem in Bridge I open my images in ACR,  as I open files in a folder and lets say they are labeled in yellow  they are all going back to  the camera raw default , in other words no ma

    HELP. ............Hi folks hope some one can help me please.Having a problem in Bridge I open my images in ACR,  as I open files in a folder and lets say they are labeled in yellow  they are all going back to  the camera raw default , in other words no matter what work I have done, inc cropping they  all go back to ,as they came out of camera. What on earth is happening? I am on PS CS6. I might point out everything was working normally up to  yesterday, when this first started.
    I recently changed computer to 64bit from 32bit, not sure if this causing  the problem or not. Any help would be appreciated.

    Robert,
    Would you be so kind to rephrase your question with concise, precise information and without any "let's say that" hypotheticals?  Sorry, I can't quite follow you.
    Also please give exact versions of Photoshop CS6 (13.what.what), of Bridge and of your OS.
    Thanks.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • When i open iphoto i see my photo's for 1 second and then they are gone .The photo's are still there but i can see them only on the bottom or top of my screen when i try to open them i get a sign that it is not possible.Can somebody please  help me?

    when i open iphoto i see my photo's for 1 second and then they are gone .The photo's are still there but i can see them only on the bottom or top of my screen when i try to open them i get a sign that it is not possible.Can somebody please  help me?

    Have you upgraded to iPhoto 9.6 for compatibility with Yosemite? If not, try that first.
    It looks like iPhoto has lost the connection between the thumbnails and the original image files.
    This can be caused by a corrupted iPhoto library, or the originals have been deleted or moved.
    Try first to rebuild your iPhoto Library:
    If you do not have a current backup of the iPhoto library, make a copy of the library, but do not overwrite any previous backup.
    Launch iPhoto with the ⌥⌘-key combination (option-command) held down.
    Select "rebuild" from the first aid panel.  This may take a while for a large library.
    Can you now see your photos again?
    If not, rebuild the library with iPhoto Library manager as described by Old Toad:            Re: iphoto crashed

  • I have two apple id's because my hotmail account is no longer active. How can I delete the old one and use or update the new one?  Every time I try it won't allow me and now my iPad thinks there are two accounts and they are arguing with each other. Help!

    I have two apple id's because my hotmail account is no longer active. How can I delete the old one and use or update the new one?  Every time I try it won't allow me and now my iPad thinks there are two accounts and they are arguing with each other. Help!

    You can't merge accounts or copy content to a different account, so anything that you bought or downloaded via the old account is tied to that account - so any updates that those apps get you will only be able to download via that account. You can change which account is logged in on the iPad via Settings > Store

  • I have dragged 2 files to the trash bin but I cannot delete them from the trash bin. It keeps telling me these files are in use when they are not. How do I delete these files? One is a txt file and the other is an xls file

    I have dragged 2 files to the trash bin but I cannot delete them from the trash bin. It keeps telling me these files are in use when they are not. How do I delete these files? One is a txt file and the other is an xls file

    From the Finder menu select 'Secure Empty Trash'. If this or the suggestion above doesn't resolve the problem take a look at the various suggestions in this link:
    http://www.thexlab.com/faqs/trash.html

  • How do i get my photos to stream to my iPad in the events that were oringally created.  Right now they are streaming as photos and are not grouped at all.  I would like to get them back into the events that were originally created

    how do i get my photos to stream to my iPad in the events that were oringally created.  Right now they are streaming as photos and are not grouped at all.  I would like to get them back into the events that were originally created

    Hi..
    Thanks for the reply..
    My original I Phone 5 was running IOS 6.12
    My I phone 5S currently runs IOS 8..When I upgraded it, it had IOS 7 on it which made the I Photo app compatible with everything below IOS 8...( which the photo app is not compatible with ) so I just connected the I Phone 5S to my computer and thinking the new phone had IOS 7 on it that these was nothing to worry about..I thought all 900 + pictures in the photo stream would transfer but somewhere in the process, I Tunes decides to just go and install IOS 8 which requires that you run a " Photo Migration App" to transfer photos from IOS 7 & below. The problem was is that I didn't want IOS 8 on my new 5S so I thought I wouldn't have to do that part..
    Anyway the phone emerged with IOS 8 on it and the only photos that remained were the ones that were actually on the phone..The 900 + I had in the stream didn't transfer because the Photos that works on IOS 7 and below isn't compatible with IOS 8..I guess you have to use the photo migration app that comes with IOS 8 & I phone 6..But I didn't ask to upgrade to IOS 8...It just did it on it's own!
    I still have the I Phone 5 Back up that I did just before giving it back to Verizon but if I try to restore the I Phone 5S running IOS 8 those photos in the stream will not go back on the phone because IOS 8 isn't compatible with the I Photos" that ran on IOS 7 and below..
    So I have an I Pad mini that runs IOS 7..should I try and erase it...and put that I Phone 5 backup on it and pray the photos that were in the stream come back on it so I can transfer them back to my computer...then erase the I pad mini again and restore it using it's original backup that I have on the computer and the in the cloud?
    I know this sounds confusing but I'm at a loss as to what to do..This is what I found ...http://support.apple.com/en-us/HT201386
    but it doesn't help me..
    Steve

  • Server 2012 R2 RDS, User Profile Disks are created but local profiles are created as well. The UPDs aren't mounting correctly.

    2012 R2 RDS Deployment with RDCB HA and UPDs enabled. Everything was working fine with no issues until users started getting temporary profiles. Around the same time UPDs were being created but at the same time a user profile was created in C:\Users. 
    I actually rebuilt the entire RDS configuration except the SQL Server. It took about 5 hours and was not that big a deal but.... we still have the same issue! 
    Does anybody have the solution for this?

    Hi,
    In most cases, the issue is caused by locked UPD. And the workaround is to log off the user. Please check if it is the case.
    For example:
    RDS user profile disks - getting error temporary profile are being used as UPD are not accessible
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/0d4b66fc-b53f-435e-b036-142b6ed15d0b/rds-user-profile-disks-getting-error-temporary-profile-are-being-used-as-upd-are-not-accesible?forum=winserverTS
    Also, please check if you will get the temporary profile when logging on with a local account of the session host server.
    If issue persists, please check if there is any related error in Event Viewer and provide us for further research.
    Hope this helps.
    Jeremy Wu
    TechNet Community Support

  • Did the update to OS 5...synched all my apps..then only 11 pages of apps are visible..the others are invisible..If I move an appfrom the 12 plus pages in itunes to a lower page...It becomes visible....WHY?..How can I get all 20 plus pages visible?

    Did the update to OS 5...synched all my apps..then only 11 pages of apps are visible..the others are invisible..If I move an appfrom the 12 plus pages in itunes to a lower page...It becomes visible....WHY?..How can I get all 20 plus pages visible?

    OK....First,you are right, OS 5 has the 11 page limit....you must create folders of Apps until you get below 11 pages of combined folders and apps...NOTE.....the upgrade to OS 5 killed all of my old folders and folder organizations...this may be an issue for all????.....I have over 300 apps so when the old folders went away...I was left with 20 plus pages....only 11 visible....It took me awhile to find out what happened....Since I have 64G it seems that 11 visible pages is a silly limit since the apps are on the machine...

  • When syncing iPod touch to MacBook, I have selected to sync only events newer than 360 days. Yet I get message that sync will change 8000 events on "this computer"  most of which are years old and many are recurring events.  I'm afraid to proceed

    When syncing iPod touch to MacBook, I have selected to sync only events newer than 360 days. Yet I get message that sync will change 8000 events on "this computer"  most of which are years old and many are recurring events.  I'm afraid to proceed with sync. 

    Having the same problem here. As a first time mac user, Apple has certainly made a bad first impression.
    For me, the issue seems to occur when transferring files between computers that are connected to the same access point (when transferring files from wired computers on the network there is no issue). My vista laptop and every laptop I have tried has worked perfectly fine with this access point so I am 100% convinced it is the mac. Basically when I copy the files, after about 100mb, I am unable to access anything on the local network or internet until I restart Airport. The weird thing is that even though I am unable to access anything, the airport utility says it is connected. I might also note that the wireless signal strength is full.
    If I can't get this figured out in a few days, this computer is going back to the store where it came from and I will officially label myself anti-mac. This type of issue is just unacceptable for something so main stream.

  • For itunes 11: movie that are not purchased via itunes are loaded into and catagorized as "home videos". I want all of my movies in one spot under Movies as they always were. How can i tweak this?

    for itunes 11: movie that are not purchased via itunes are now loaded into and catagorized as "home videos". I want all of my movies in one spot under Movies as they always were. How can i tweak/resolve this?

    Cdaver wrote:
    I have this issue too and want the same result, another feed suggests selecting the movie, going to get info, and changing this under options, but I suppose you have to do that movie by movie.
    You can select all the movies you want and change them at once.

  • On Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    on Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    The ID Program folder will be relevant to your OS...
    I took a shot and right clicked on my Scripts Samples, choose reveal in Explorer and opened up the ID Program folder.
    As shown, there is a Fonts folder.
    Drag/Copy/Paste fonts to this folder.

  • HT4410 I have just installed Windows 7 64-bit full version Home Premium using Bootcamp and cannot get access to the internet. I installed on a Macbook Air Mid 2012 with Mountain Lion. Are there some drivers that are missing from the Windows 7

    Dear Apple. I have just installed Windows 7 64-bit full version Home Premium using Bootcamp and cannot get access to the internet. I installed on a Macbook Air Mid 2012 with Mountain Lion. Are there some drivers that are missing from the Windows 7 bootcamp install download from Apple

    It is a Total Misconception that the Support files are installed when you are installing Windows, even if the USB drive that holds them is inserted in the system when doing the Windows install.
    You must always Run the Setup.exe files from the support files or run the drivers individually once Windows has finished installing and booted to the desktop.
    Also you really need to run the Boot Camp Control Panel Applet and check for updates as not all the newest drivers for full function of all the hardware is included with the original support download. That download is basically a generic version to get the system working and without doing the updates not everything will work properly.

  • I have just downloaded Mac OS X 10.9 and Pages 5. When I open any pre-existing document in the new Pages the format is zoomed to 125%, the headers are out of position, the margins are changes, and inserted images are also relocated. What can I do?

    I have just downloaded Mac OS X 10.9 and Pages 5. When I open any pre-existing document in the new Pages the format is zoomed to 125%, the headers are out of position, the margins are changes, and inserted images are also relocated. What can I do?

    Have you tried resetting the SMC ?     >  Resetting the System Management Controller (SMC)

  • What are ROWID and ROWNUM? Are they stored in database and where?

    Hi All,
    can anybody please answer this question
    What are ROWID and ROWNUM? Are they stored in database and where?
    Thanks,
    Srini

    ROWID can be thought of as a pointer to the physical location (on disk) of the (table) row.
    From a ROWID value, Oracle can extract the file, block-within-that-file and offset-of-the-row-within-that-block. Using these, Oracle can directly access a disk block to retrieve a row.
    ROWNUM is a just sequence number of a row within a result set of a query.
    As said by other repliers, both are not stored. They are 'constructed' when you reference them inside a query.

Maybe you are looking for

  • HT1711 How can you tell if a song has DRM?

    I recently purchased a Sonos speaker system for my home.  I have noticed that I cannot play certain songs from my iTunes on my Sonos system because they were purchased through iTunes pre-iTunes Plus (the songs are DRM).  Is there some kind of filter

  • Activated iTunes Match, now most of my music is missing...

    After I upgraded to IOS6, I activated iTunes Match. Now almost all of music on my iMac is missing. When I click on a song, itunes says it can't find the song and asks if I want to try and locate it. All the songs now have have exclamation marks in a

  • What is the best kind of images should we use in iBook Author?

    We are using a png image in a keynote inside our iBook. But we are loosing the quality of the image when we reduce the box size of the keynote. Is png the best kind of images for a keynote in iBook Author? Is there a better kind of image to use? For

  • Problem in writing to the file

    I use this labview code to read and save some electrical measurement data from a set of instruments. I am having a problem that the code stops writing to the file after a while. It stops responding too. The only way to stop it then is to use the task

  • Doc error in OrderBook Tutorial

    At the end of the chapter for fault handling it says in the summary: Reviewed the credit rating results returned from the Credit Rating service to the client. The invalid social security card number that you entered invoked the fault handling and exc