Change thumb width in scrollbar by dragging the thumb

Hi All,
I'd like to use a JScrollBar that implements a user-friendly zooming capability. What I mean is the possibility for the user to place the mouse over the scrollbar's thumb edge and drag the thumb edge changing (enlarging or reducing) its width. By knowing the new width of the thumb, I then could change the amount of graphics shown in a separate panel.
Any suggestion? Does anybody know if that is possible at all without using third party custom UI objects?
Thanks in advance
Antonio

I think you can do this by adding a MouseAdapter to JScrollBar. When the user clicks and drags on the edge of the thumb you change the BoundedRangeModel's values by calling setValues(int,int,int,int) on the JScrollBar. The user is either adjusting the value or the extent depending on which side of the thumb the user clicked on. Add a MouseMotionListener to change the cursor of the mouse when it's over the thumb's edge.
Your display component can share the BoundedRangeModel with the JScrollBar so that it can listen for the changes in the value or extent and adjust itself accordingly.
But then again why not go with the simplest thing that could work and use a JSlider? (0-100%)
charlie

Similar Messages

  • The finder window for an external USB hard disk suddenly started separating files by time (today, yesterday, etc.) and stopped allowing me to change column width, order, etc. Also the header bar shifted to flat white from gray.

    The finder window for an external USB hard disk suddenly started separating files by time (today, yesterday, etc.) and stopped allowing me to change column width, order, etc. Also the header bar shifted to flat white from gray.
    All was normal until the icon for the disk stopped showing up on the desktop when I would plug it in. I rebooted the computer, and the disk icon now shows up but this new look to the finder window started as a result. The hard disk does not have this problem when I use it on another Mac running Snow leopard. Also, two other external hard disks that I use on this computer running lion 7.4 still have the normal header bars with columns that can be reordered, etc.
    I have tried looking in preferences and other places but have not seen this discussed. 

    Well duh - I finally figured out that somehow in the View options for the hard drive, the "arrange by" option had been changed to "by date" from "none". Not sure how that happened, I had never used the "view options" menu tem before. Changing "arrange by" back to "none" gets the gray column headers and the collapsible folder icons back. 

  • [kde - Homerun kicker] How change columns width

    I found a new Kde launcher a few months ago, I find great (of course this is only my opinion).
    It is the smaller version (not full screen) Homerun , which is available in Aur at the following address : https://aur.archlinux.org/packages/kdep … s-homerun/ , which can be seen in the following link : http://blogs.kde.org/2014/01/29/homerun-120 , although the current version is slightly advanced.
    This launcher version not full screen, works like Lancelot , but is more simply and more faster.
    Moreover, it displays the recently used applications and the recently used documents .
    However, I have a slight regret about this launcher : the column width is fixed and can not be changed.
    Does anyone know how to change the columns width ?
    Thank you in advance for your help.
    Last edited by Pafrapé (2014-05-02 21:37:58)

    @Julie – you can change column width by alt + shift + dragging left or right cell sides without changing the overall size of the table.
    For other table goodies see:
    http://indesignsecrets.com/18-handy-table-shortcuts.php
    Hope that helps!
    Uwe

  • How can I drag the edge/resize a text box on the 3rd row w/o changing all the rows above it?

    I am new to Acrobat and FormsCentral of course.
    I have three rows of text boxes, something like this:
    Name
    (other text fields)
    Primary Address
    I want the input box to be immediately following the label; for example (pretend the underline is the input box:
    Name ___________
    (other text fields)
    Primary Address ___________
    However, Forms Central looks like this:
    Name        _________________
    (other text fields)
    Primary
    Address     ______________
    When I try to edit the Primary Address box, either by dragging the right label edge or the left text box edge on that field, it also drags the edges of the fields above it!
    Is there a way NOT to do this?
    I've been trying to find tutorials on how to manipulate the design/layout of the forms, but so far all the YouTube and other tutorials I've seen simply do a vertical form, one field per line.
    Thanks!

    You can change the size of the label, the text input box, and the field itself (border around the field in the design tab) - however there is one exception to being able to control the size of every field individually:
    Fields that have "Labels left" or "Labels right" that are also the first field in a row will all share the same label width.
    This is probably what you are encountering, this is how the fields work for now, those first in a row label left/right labels are all the same width.
    Thanks,
    Josh

  • Is there a way to transfer songs from a Sony 16GB MP3 player to an iPod Classic? Tried dragging the songs to iTunes,only accepted 1400 of the songs. MP3 player was full.  I also had compiled the songs in a specific order and iTunes changed order.

    Is there a way to transfer songs from Sony 16GB MP3 player to an iPod Classic?  Tried dragging the songs to iTunes but it only accepted 1400 of the songs, MP3 was full. I also had compiled the songs in a specific order and iTunes changed the order.

    The songs from the Sony MP3 player need to be imported into your iTunes library first before they can be synced or added to your iPod Classic. 
    Regarding the songs that didn't import into iTunes, what format are they in and what seems to be different from them compared with the tracks that did import?
    B-rock

  • Change column width in the run time

    Hi, everyone:
    I have a form with a master and a detail block. The detail block has a tabular layout. I want the user of the form being able to ajust the width of the particular column(s) in the run time by, e.g. dragging the border of the column(s) to the left or to the right. I've seen the examples of these forms, but want to know how easy would it be to implement that.
    Thanks a lot.
    Eugene.

    Hi, everyone:
    I have a form with a master and a detail block. The detail block has a tabular layout. I want the user of the form being able to ajust the width of the particular column(s) in the run time by, e.g. dragging the border of the column(s) to the left or to the right. I've seen the examples of these forms, but want to know how easy would it be to implement that.
    Thanks a lot.
    Eugene.

  • How to automate the changing of Width and Height of the document

    Hi,
    I just want to know if anyone already automate the changing of width and height of document(eps file).
    Thanks,
    Buddy

    Check out SetDocumentSetup from kAIDocumentSuite.

  • Lightroom 5 Help says that to change the size of filmstrip thumbnails: "Place pointer over top edge of filmstrip; when pointer changes to doublearrow, drag the filmstrip edge up or down."  However I never get a double arrow.  Instead I get a hand icon tha

    Lightroom 5 Help says that to change the size of filmstrip thumbnails: "Place pointer over top edge of filmstrip; when pointer changes to doublearrow, drag the filmstrip edge up or down."  However I never get a double arrow.  Instead I get a hand icon that allows me to drag the thumbnails to right or left.  How can I change the filmstrip thumbnail size?

    It works for me. Are you sure you are hovering in the right spot? It's the dividing line between the filmstrip and the Toolbar.

  • I have iMove 11 and photos turn very dark when I drag  them into the project. Changing colour white balance does not fix the problem.

    I have iMove 11 and photos turn very dark when I drag  them into the project. Changing colour white balance does not fix the problem.

    Thanks for your no help line.

  • Is there a way to change fixed width Flat file connection manager to delimited without losing all the column names ?

    Is there a way to change fixed width Flat file connection manager to delimited without losing all the column names ?

    Unfortunately not as it is a quite dramatic change causing the metadata being refreshed. I would try to open though the package file in a text editor and find them before doing the change, then after you made the change to the FF connector try to reconstitute
    / replace the autimatically generated columns with the old names.
    Arthur
    MyBlog
    Twitter

  • Trying to use my home sharing on new macbook air, but I physically can't drag the songs into my music. What do I need to do to change this?

    Basically, I've set up my home sharing between my macbook air, and our mac mini at home. The home sharing option shows up on both computars, and the music is visable and available to listen to when I bring it up on home sharing from the mac mini, but when I try to actually drag the music over to my music on my macbook. Both of our itunes are completely up to date. Is there any way to fix this?

    *When I try to drag over the music, it won't let me. That's what I meant to say.

  • Can't drag the border of JTabbedPane

    Hi,
    I met a problem in programming JTabbedPane. I am now fixing some bugs in a existing project, so I am not familar with JTabbedPane.
    In my case, I am not able to adjust the size of JTabbedPane by dragging the border of it. This JTabbedPane is in the right side of a JSplitPane. However, if the right side pane is replaced by a JLabel, then I can drag the border of JLabel.
    I don't why it happens? Does this mean once a JTabbedPane is created (includes it's component inside), I can't change it size anymore? Is there any one who can give me any ideas?
    Thanks
    Feng

    Yes, I also got this conclusion. The problem is caused by the size of inside component.
    There are one JLabel and one JTextField inside my JToolbar. If the string in the JTextField is short, I am able to adjust the width of JToolbar, however, only made it bigger. But if the text inside the JTextField is longer than than the width of screen. the edge of JToolbar is no longer able to be adjusted.
    I know the cause is the size of text in the JTextField. It made the JTextField very long. I know the reason, but I don't know how to solve it. Any one could help me for that?
    Thanks
    Feng

  • I have several pics that when I click on them another photo comes up. when I click and drag the one underneath comes out but when I drop it the other photo is over top again. How can I fix this?

    I have several pics in my iphoto library that have shown up in my folders with the original photo laid underneath it. How do I seperate them?

    You don't already have a back up?
    Most Simple Back Up
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex:
    Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically. Examples of such apps: Chronosync or DejaVu . But are many others. Search on MacUpdate
    With the back up? Nothing unless things get worse after the fix. If they do, restore from the back up.
    Regards
    TD

  • How do I back up my entire iphoto library to an external hard drive that I have dedicated for photos only?  Can I simply drag the iphoto library onto my seagate (hard drive) icon?

    How do I back up my entire iphoto library on to an external hard drive that will be my second back up plan.  I already have one back up that is also synched with time machine.  But now I want to back up my iphoto library to a new hard drive to have a second copy. Can I simply drag the whole library onto the icon on my desk top?  THX

    WHile you can do it that way, the next time you back up you'll end up copying the entire library again, and,as you'l see, once a library gets bigger that can take a considerable amount of time.
    Try using an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • Hello Apple community... I am trying to combine multiple pdf's into one, using preview, but when I drag the additional pages they show up as separate documents.

    I am trying to combine multiple pdf's into one, using preview, but when I drag the additional pages they show up as separate documents.  When I drag the doc in a line would show up in the past, and if I went above th eline all was good.  It doesn't have a line, and no matter what I try I am having no success.
    Please help!

    According to an Apple Support article, unless there are unforeseen issues
    in file ownership or permissions, the combining of .PDFs should be simple.
    •OS X: Combining PDF documents using Preview - Apple Support
    There are a few variable and similar methods, some change with version
    of OS X in use; some vintage OS X may vary a little in the process...
    A variety of similar topics appear in search results, with terms:
    " mac os x combine pdf into one " such as this page shows...
    https://www.google.com/?gws_rd=ssl#q=mac%20os%20x%20combine%20pdf%20into%20one
    If the system is older than Mavericks there may be other methods to try.
    Suggestions are among linked results in the search. I see a few fair ones.
    •Here's another that offers generally similar suggestions...*  this info looks OK, extra links, do not:
    http://osxdaily.com/2014/06/27/how-to-join-multiple-pdf-files-into-a-single-pdf- document-in-mac-os-x/
    { note: avoid clicking on links to products in * this ^ page, since they likely will not help & may be adware prone }
    If you have a problem after trying other methods, based on an OS X
    your computer is running, post back with more exact information...
    Good luck & happy computing!
    edited

Maybe you are looking for

  • Internal error while creating new company in sap b1 pl 05

    Hi all I installed sap b1 server and clint in PL 05 for USA localization but when I m trying to create new company from login screen system start to create tables but after some time its giving error ''Internal error 101, then system showing that com

  • Getting an error in ECC 6.0 when open table MARA

    Hello  Experts, In ECC 6.0 while opening  table MARA, I am getting an error "Inconsitency inthe Dictionary for the structure "Mara"."and  so on for other tcodes. This error I am getting since yesterday, previously I was not getting such error. Can an

  • Asking for my password when I try and delete a file

    I have a few files that I can't seem to delete without the computer asking for my password. When I try and delete them, it shows this message: Authenticate Finder requires that you type your password Then the window has fields for my name and passwor

  • Iweb photo gallery -- download option unwanted

    I just created my first site using iweb and put a photo gallery on there. I noticed that there is a download option which I DO NOT want on there!! I want to make my photo galleries view ONLY! Is there a way to change the settings?? Thanks!

  • Aged debt report( account receivable)

    Hi, I am supposed to develope a aged debt report. Will anyone please give me the an example of aged debt report.Is there any business content aged debt report available ?? how will we find out the oustanding days, I mean between what date to what dat