Mouse Resizing Control

Hi there coders.
I need to create image resizing control where when you insert a picture into a JTextPane, that picture has mouse resizable handles on every corner of that image and on every side of it. I should be able to click on that handle and drag it, and that would resize my image. I need same for JTextPane, so I could resize it the same way as image. Its similar to whats shown on image here: http://www.codeguru.com/cpp/controls/controls/resizing/article.php/c2151/
Does anybody know how to do this in java? Or maybe point me in a right direction about this? Im realy stuck and I NEED this feature.
Thanx a lot.

You might be interested in [url http://forum.java.sun.com/thread.jspa?forumID=57&threadID=638151&start=2]this.

Similar Messages

  • Bottom right corner resize controls trump vertical scroll button if set to appear in the bottom corner

    My bottom right corner square of the Firefox window normally sits below the bottom of the vertical scroll bar and right of the horizontal scroll bar if one exists. The square is used to click and drag to resize the window's right and bottom boundaries.
    At issue is when a web site places its vertical scroll down-arrow button in the bottom right corner. I cannot access the down-arrow button with my mouse to cause the page to scroll down a few lines at a time because when I point the mouse there, I get the resize controls instead. Even though the down-arrow button is plainly visible on the screen, the resize controls take charge and I cannot use the scroll control.
    Two example web sites display their down-arrow control at the very bottom of the window; TIME.com and GMAIL.com. I have also viewed two PDF documents in the browser, and they too, have a vertical scroll bar all the way to the bottom, and I cannot use that down-arrow button because instead I get the northwest-southeast click-to-resize cursor instead of the mouse pointer when I attempt to use that button for scrolling.
    Someone on the Google Help forum was not able to replicate that issue, showing me screenshots of his lower right corner mouse behavior. He does not have the resize control covering access to the scroll bar.
    I am using the latest Firefox, I have reset Firefox, thus dumping all of my add-ons and custom settings, and have only put back AdBlock Plus and Cookie Monster. And Troubleshooter, when I asked a similar question.
    I am running Windows XP, on its last days of support. This computer is not capable of running anything newer, unless I run with Linux.
    Going to TIME.com, its vertical scroll is in the bottom corner and I get the resize control arrows instead of the mouse pointer when I point to the down-button. If I disable page styles in the View menu, I get a useful output that sets the end of the vertical scroll above the bottom corner. So somebody's idea of styling the page (CSS) creates this issue for me.
    Going to Gmail, turning off the styles gives me a useless output of nonsense, so I must use page styling enabled.
    Can someone please give me some guidance? This forum page has vertical and horizontal scroll above and left of the bottom corner square. I have access to all the parts of both scroll bars, as is the case on most well-designed pages.
    My window-resize controls are in charge always of the bottom corner square even if the vertical scroll is supposed to be there.
    See also my first wording of this question: https://support.mozilla.org/en-US/questions/993519

    Those layout.css prefs are about enabling some CSS feature, in this case vertical writing, so have nothing to do with scroll bars.
    *Bug 772321 - implement CSS parsing of writing-mode property
    *resource://gre/greprefs.js
    <pre><nowiki>// Is support for CSS vertical text enabled?
    pref("layout.css.vertical-text.enabled", false); </nowiki></pre>
    Can you attach a screenshot?
    *http://en.wikipedia.org/wiki/Screenshot
    *https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
    Use a compressed image type like PNG or JPG to save the screenshot.

  • Labview resizing control.....

    Hello All,
    I am in the middle of developing an application that will be bundled with our product.  I have developed many such applications using visual studio, however this is my first adventure using Labview.
    As many of you know, one of the most common variables in distributing an application is the und-user screen resolution.  With the relatively recent explosion of differing screen resolutions and aspect ratios, making applications resolution independent is even more important than ever.  Along with this, giving the customer the ability to resize the appliction at will is a huge benefit.  On many occasions I have walked into a customer's site to see my application shrunk down to a corner of the window, where the use can still see it, almost like an indicator.
    For visual studio, I had purchased a third party control.  Plunk the control onto the window (it became invisible at run time) and all of the controls, fonts, etc resized as the screen was resized.  When visual studio went to .Net, this particular control no longer worked.  I had to evaluate 5 different controls to get one that even came close to working properly, and even then I had to work with support and beta test many versions of that control to get the bugs out. 
    Now I know that Labview has the panel resize options, etc and I have played around with them.  However, as most of you know, many problems still exist, such as the fonts not resizing, and multiple window changes cause control distortion, even when brought back to the same panel size.
    So, what I am wondering is this:  A) Does anyone make a control that I can purchase that does a good job in this regard, or B) if not, how about opening a discussion on how to implement a control to do just this?
    If I need to, as I forsee doing more applications with Labview, I could tackle this on my own, but as I am new to LV my learning curve may be steep so I'd like to draw on the abundance of talent and experience I've read on this board.
    I was thinking of a control that would enumerate all of the controls, labels, etc on the panel.  During the development cycle it would store all of the control / font sizes (internally? to a file?) as the developer intended the panel to appear.  At execution time (after it is built) each time the panel is resized, the control would set the height/widths and font sizes as needed.  Why store the development time sizes?  To eliminate the errors that creep up when sizing the panel up and down multiple times.  I assume this occurs in LV since original size is not tracked and pixel displacement is non-uniform across the pane, and the moving / scaling is non-integer in nature but gets applied to integer properties.  For example, when resizing from the lower right corner, to say half the width / height, controls in that corner move ALOT while controls in the Upper-left only move slightly, yet all controls are scaled in size the same amount.
    I would love it if someone could dope-slap me upside the head and say "just do this".  If not, what are some of the methods I should be looking at, and pitfalls to avoid?
    Thanks for your input!  

    tartan5 wrote:
    Wouldn't life be grand if every control included a set of read-only properties, say XOrigin, YOrigin, XSize, and YSize that were updated as you move the component around during development, but was fixed as you run the compiled program.  This would at least give you an absolute reference to use as you resize the panel, and eliminate the truncation errors we now see.
    You could do that using tags if that is what is needed.
    One interesting control I tested actually increased performance by grabbing an image of the window when the resize handle was moved, placing the image over the window, resizing the image as the corner was dragged.  Then when the corner was released, updated all of the controls / fonts as required, then hid the image.  It actually worked amazing well vs resizing the controls in real-time.......That might be very do-able in labview, show a picturebox, have it size to the window, etc....
    It probably would not be needed. You can just defer the panel updates until after you're done with your resizing. I was thinking the performance issue would be in going over all the controls and changing their size, but there is probably not going to be one.
    On another note, is it possible to recurse through an xcontrol and get all of the components at run time?  I have just finished developing my first xcontrol (so it's fresh on my mind) but I'm not sure how the xcontrol is viewed by the environment (ie if all the sub-components can be reference / obtained)?
    No idea. I use LV 7.0, which does not have them. My guess would be that you can't, at least in the earlier versions. Maybe the newer ones allow this, but I would doubt that. You might need to write a resize method (or ability or whatever they're called) for the control. That is one example of how writing a generic framework would be complicated.
    On your first point, are you suggesting that the resizer control would add the tags to each enumerated control itself?  That's almost as good as my wish above (LOL)....
    Well, I wouldn't call it a control. It would be a special resize handling (TM) process, but yes, that is exactly what I'm suggesting. See attached for a simple example.
    P.S. No, I don't know how to access these in LV 8.x.
    Try to take over the world!
    Attachments:
    Pos Tags.vi ‏36 KB

  • Resizing Control

    Hi there,
    C'ld anyone point out the meaning and the purpose of "anti-alias & details control" from the collume of Resizing Control in the Frame Control tab?
    Thanks!!

    From page 259 Compressor User Manual:
    Anti-alias: Use this slider to set a softness level from 0 to 100. This parameter
    improves the quality of conversions when you’re scaling media up. For example,
    when transcoding standard definition video to high definition, Anti-alias smooths
    out jagged edges that might appear in the image.
    Details Level: Use this slider to set a level (from 0 to 100) to preserve sharp edges.
    This is a sharpening control that lets you add detail back to an image being enlarged.
    Unlike other sharpening operations, the Details Level setting is able to distinguish
    between noise and feature details, and generally doesn’t increase unwanted grain.
    Increasing this parameter may introduce jagged edges, however, which can be
    eliminated by increasing the Anti-alias level.
    Note: Adaptive Details, Anti-alias, and Details Level pertain only to frame resizing
    (scaling), not deinterlacing.

  • Resize controls VI - control references

    Within the Full OI - Resize Controls.vi, I recently added a container reference used to display the comment associated with the selected sequence file.  Anyway, the way I did this was to copy one of the existing container references and modify it.  I could not figure out how to create a new container reference with the desired properties.
    I see the icon in the .Net and ActiveX pallette.  When I select the ActiveX Container, I get an empty box.  I tried a right-click and selected 'Insert ActiveX Object', but then I didn't see anything applicable in the list of available servers.
    So instead I right-clicked the copy of the container reference I made and selected Select VI Server Class -> Generic -> GObject -> Control ActiveX Container.  The "Select Ctrl Type" is set to ActiveX Container.  Then I just changed the label in the properties.
    How would I create an ActiveX Container otherwise?

    Hey  mrbean,
    There are two methods that I was able to find to create a reference to an ActiveX container.  The first one is the one that you discovered by changing the VI Server class.  The easier method in my opinion is to start with a refnum control such as an application refnum or VI refnum, and then drag and drop an ActiveX container into the Refnum control.  This should automatically change it to the correct class.
    Pat P.
    Software Engineer
    National Instruments

  • Mouse to control sliders in Adobe Elements 12 ?

    I used to be able to control the sliders on my earlier Adobe Elements with my middle wheel on my mouse but on installing 12 version this does not seem to work any more, which is a great pity as it was so precise. Can anyone be of help with any suggestions?

    Thanks so much for your help will give it a try. Cant at the moment as ,would you believe it, my mouse has died on me!!!Kind regardsMike Davies
    Date: Fri, 3 Jan 2014 15:13:44 -0800
    From: [email protected]
    To: [email protected]
    Subject: Mouse to control sliders in Adobe Elements 12 ?
        Re: Mouse to control sliders in Adobe Elements 12 ?
        created by nealeh in Photoshop Elements - View the full discussion
    There are a couple of timesaving tricks. Open an image and go to Layer> New Adjustment Layer> Brightness/Contrast.
    Click in the box that has the number at the right-hand end of the brightness slider. Now you can use the scroll wheel to increase/decrease the brightness.Hover the mouse over the word Brightness at the left-hand end of the brightness slider and the cursor will change to a double headed arrow with a pointing finger and hand in the middle. Now click and hold the left mouse button. Move the mouse left/right to decrease/increase the brightness level. Cheers,
    Neale
    Insanity is hereditary, you get it from your children If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5978637#5978637
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5978637#5978637
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5978637#5978637. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Elements at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Resizing controls in top level VI

    In the LabVIEW8 version of the TestStand3.5 OI, in the Top-Level VI, there is a call to FULL OI - Resize Controls.vi.  If I (at the top-level VI) set the VI properties in Window Appearance::customize:: and uncheck the show vertical/horizontal scrollbars, thus disallowing the user to resizer the OI, do I need the Resize Controls.VI?

    Hi MrBean,
    I would recommend to leave the Resize Controls.VI there because even though you have disabled the scrollbars there are other things that can affect the control sizes such as Windows themes, using large fonts, etc.
    Pat P.
    Software Engineer
    National Instruments

  • Use Kensington trackball mouse to control motors

    Hello experts,
    I am writing a Labview program using a Kensington expert trackball mouse to control two motors. Here is the mouse that I am using :
    http://www.kensington.com/kensington/us/us/p/1444/K64325/expert-mouse%C2%AE.aspx
    I would like to use the motion of the trackball to rotate the first motor: when I move the trackball left (or right), the motor will rotate left (or right); and the motion of the scroll ring (left/right) to control the second motor (left/ right). Besides, I would like to use the four click buttons as different ON/OFF buttons.
    I do not want to use the trackball as a mouse, it means that I do not want the cursor of my computer moves when I move the trackball/rotate the scrolling ring!
    So is there any solution that make only Labview "see" the trackball mouse motion, so that I can control my motors, without affecting the cursor function/position  of the computer?
    Thank you for your help.

    I haven't done something like this myself, but like Bob said, once you plug the mouse in, Windows automatically recognizes it as a mouse. You might want to read these on how you can prevent that from happening and get the data yourself. If I understand correctly, you will need to parse and interpet all the raw data yourself:
    http://forums.ni.com/t5/LabVIEW/Nugget-1-of-n-GEtting-started-with-USB-communication-via-VISA/m-p/74...
    http://forums.ni.com/t5/LabVIEW/Nugget-2-of-n-USB-Control-transfers-using-VISA/m-p/757011
    http://forums.ni.com/t5/LabVIEW/USB-Nugget-3-of-n-Unifying-the-multitude-of-USB-driver/m-p/1814964/
    Try to take over the world!

  • Mouse loses control when resizing columns in TFS

    I work actively on Team Foundation Server and always noticed that when I click the mouse to drag or re-size a column in a table inside a work item, it does not work. The column keeps getting re-sized even after releasing the mouse. When i move the mouse to a different part of the screen also, the column keeps getting dragged. This is very annoying. This does not happen on other browsers. So I am assuming, its not a TFS problem.

    When your mouse pointer is over a movable area, the mouse pointer should turn into a double-arrow. If you notice that after dragging and releasing the mouse, the mouse pointer ''stays'' a double arrow, try positioning the mouse pointer where you want the new boundary and click again. The mouse pointer should change back to a standard pointer.
    Does that work?
    (This suggestion is based on behavior I've seen with some Infragistics ASP.Net controls in IE8.)

  • After moving and resizing control, some controls don't redraw properly as the cursor passes over them.

    I have a top-level VI with three panes (two splitters).  One of the panes contains nested tab controls.  One of the tab pages contains six XY-graphs, a table and some decorations.
    I use a subVI to resize and relocate the tabs and contained controls.  All this is working fine, and everything looks fine after the resizing is complete.
    The problem is when the cursor passes over certain controls (the chart legends and the table column headers for example), they redraw with gray boxes.  The problem only occurs after enlarging the window from its minimum size.  It goes away if the window is resized back down to minimum.
    Anything that causes the window to redraw, like another resize or minimize/restore, properly refreshes the screen.
    Has anyone seen this problem, and have a workaround?
    The problem exists in development environment or built in LV 9.01 or LV 2010.
    Thanks!
    Matt Dennie
    Attachments:
    Resize Redraw Problem.zip ‏125 KB
    Resize Redraw Problem.JPG ‏210 KB

    Thanks again for taking a look at my problem.
    force redraw - This is apparently only available in LV2010.  I did give at a try, but it did not prevent the problem, nor did it correct the problem once the gray boxes appeared.
    disable updates (on a graph) - This apparently only applies to 3-D graphs, which is not what I am using in this case.
    disable front panel updates - I tried disabling updates before moving/resizing the front panel controls, then re-enabling updates afterwards.  The problem is exactly the same as before.  Once the move/resize is complete, passing the mouse over the table column headers or the graph plot legend results in the gray boxes.
    I would appreciate any other suggestions you may have. 
    Again... the problem is not that the moving and resizing don't work.  They work fine.  But once the resizing is complete, passing the mouse over the legend or table column headers causes gray boxes to appear.
    Thanks!
    -- Matt

  • Resizing controls with custom skin

    Hi,
    Can someone tell me how to make a spark control with a custom skin made in Catalyst to behave like a standard unskinned control when resized in design view of Flash Builder or during runtime? In other words I want it to behave like it's 9-sliced. For example, I've made a simple and ugly rounded skin for TextInput in Catalyst like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009">
         <fx:Metadata>[HostComponent("spark.components.TextInput")]</fx:Metadata>
         <s:states>
              <s:State name="normal"/>
              <s:State name="disabled"/>
         </s:states>
         <s:Group x="0" y="0">
              <s:Rect height="31" radiusX="5" width="182" x="0.5" y="0.5">
                   <s:stroke>
                        <s:SolidColorStroke caps="none" color="#000000" joints="miter" miterLimit="4" weight="1"/>
                   </s:stroke>
                   <s:fill>
                        <s:SolidColor color="#FF90CD"/>
                   </s:fill>
              </s:Rect>
              <s:RichEditableText color="#2B4381" fontFamily="Arial" fontSize="12" tabStops="S0 S50 S100" x="11" y="11" width="161" heightInLines="1" id="textDisplay"/>
         </s:Group>
    </s:Skin>
    How to do that in this example?
    I have searched everywhere on the net, and in a 1000 page book I have about Flash Builder and Flex and couldn't find even a single example. And I need this if I want to make something like resizable web form with a resize grip or resizable options panel.
    Thanks in advance,
    Petar

    I've got an answer but on other forum. Here is link if someone finds answer to this question useful: http://stackoverflow.com/questions/3299385/resizing-flex-spark-control-with-a-custom-skin

  • Programatically resize controls at runtime

    I have a series of controls on a GUI and a GUI that I want to be able to resize according to the machine that is running the program.
    Basically my logic is this. A GUI can fill most of the available display space, but not all, and must never be shown on a monitor that it is not designed for.
    Currently my Laptop is having display issues and keeps chaning the resolution thus hiding parts  of my GUI.
    I want to resize (and position all visible controls and indicators - I know which ones they are) so that my GUI fits in a know space on certain default screen resolutions. (800x600, 1024x768 and 1280x1024)
    I can get the position and bounds of a control, but I can't change the bounds of a control (generic) with the property node. This is frustrating. as one of my controls is a large Multicolumn listbox which takes up most of the display and definitely needs resizing according to screen resolution.
    Any ideas?
    James
    Solved!
    Go to Solution.

    unbundling from your cluster would be simplest, yes.
    I think in general though you could be better served by keeping it simple and letting the user deal with the front panel.  Leave the scrollbars visible, let the user resize the panel.  Look at the bounding box of the pane and initially resize the window to fit the contents rather than the other way around.  I only like to lock down the window if it's to be a terminal type application (only thing running, I know the hardware at dev time, etc.)
    There are some other ways to resize things, too.  I'm sure you've seen the "scale with pane" and "fit to pane" options.  I've always been unsatisfied with the former, but the latter is pretty nice when combined with splitters, especially if you camouflage the splitter and get the various splitter options right.
    Check out the UI of VI Package Manager to see a nice MCL that resizes as you resize the window.  I think JKI even have a how-to-video that might show it....found it: http://forums.jkisoft.com/index.php?showtopic=988
    and for an extra tidbit, check out these properties:
     the top one gives you the resolution of each monitor on the system (mine shows 1680x1050) the bottom one gives you the workspace rectangle of the main monitor (and mine shows (0,1680),(0,990) which shows that the last 60 pixels there at the bottom are taskbar)
    These should be useful for checking what the available space is for dynamically sizing things. 
    -Barrett
    CLD

  • How to Resize Dialogue Boxes that do not have Resize Controls

    Windows CS3 5.0.3
    Is there a way to increase the default size of a dialogue box that does not have re-sizing controls? Specifically the "New Page Reference" box for building an Index. The Index is becoming a little large and I'm having to do a lot of scrolling through the alpha list.

    Well, there is the dreaded (for programmers) DPI Setting in your monitor settings. It attempts to re-size dialogs, to cater for larger or smaller fonts (and the reason it is feared by programmers is that it may fail spectacularly). It may or may not influence the size of Windows dialogs in InDesign.
    But that really doesn't matter. If the dialog
    i does
    get drawn larger, that will be because the texts in it are larger. You will not suddenly have more items visible -- it's a different kind of "resize".

  • Mouse click control on non-LabVIEW Windows

    I'm using an ActiveX interface to talk to Opus spectrometer software. I can pass data around and start acquiring just fine but each time I run my acquisition LabVIEW software I get a little "ok" popup message from Opus that wants me to confirm acquisition. Is there anyway I can programmatically click this box so it will go away? It is running in a different process than LabVIEW so I didn't know if that kind of mouse control was possible.

    Just check out if pressing Returen (Enter) key closes the dialog?
    If yes then download the llb located at
    http://forums.lavag.org/index.php?act=attach&type=post&id=91
    in this llb file you will get the VI to simulate the keypress.
    then as you launch application wait for some time and then simulate keypress and go ahead
    Note: This may not be very robust solution as the keypress will not work if somebody clicks somewhere on screen and application in focus is changed.
    but its quick solution
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • Magic Mouse + Mission Controls

    i tried using two finger to double click on my newly bought magic mouse but it did not activate mission controls.  I go to system preference/mission controls/keyboard and mouse shortcut, the only selection is "middle mouse button" or "secondary mouse button". 
    Is my magic mouse having problem or setting?
    appreciate if someone can help.

    Captfred
    Thanks for your reply.
    Appologise if i am not clear. 
    Yes i can view the Magic Mouse Preference. 
    The problem i had is, i cannot go into Mission Controls when i do a double tap on my magic mouse.   (when i double tap, nothing happen)
    Thanks
    Ben

Maybe you are looking for