Set a tooltip for a shape, not a button

Hi everybody,
Hope you are all ok wherever you are :)
I have this little problem guys; I want to set a tooltip button in my application but the problem is that i'm not using buttons but shapes instead, in which shapes i've added mouse click handle code.
I need when the mouse goes over these shapes-buttons i have, some tooltip text to be displayed. I've tried to create a rectangle and display the small text i want into that rectangle and then call repaint for restoring the program to the previous state before the tooltip display, but unfortunately it is too slow.
Can you please help me out of that? Can you give a way of setting tooltips for shapes instead of buttons?
Any help would be appreciated.
Thanks,
-John

Your trying to set a tooltip for a given area on some JComponent defined by a Shape which holds the points that make up the border of the Shape, like GeneralPath or something like that? Is that what you mean? I'm not sure but I think you can use Shape.contains(Point2D ...) without actually have drawn the Shape, so that you can test where the mouse is on your JComponent, then check contains to see if a tooltip needs to be displayed. You'll have to write your own tooltip frame that's not dependent on a JComponent, but thats fairly straightforward. Don't know if this is any help to you, but its a possibility.
Tom
ioannisc: the OP talks about the use of Shape's, where did subclasses of JComponent come into it?!

Similar Messages

  • Set Stroke weight for a frame not working in CS4.

    Hi All,
    How to set Stroke weight for a frame.
    I tried using CreateStrokeWeightCommand of IGraphicAttributeUtils, but its not working in CS4.
    Regards,
    Jasmine
    Message was edited by: Jasmine_Shaikh

    Hi All,
    CreateStrokeWeightCommand of IGraphicAttributeUtils works only when if the frame has some stroke weight already applied to it.
    So do i need to set something else before using CreateStrokeWeightCommand to make it work programatically on a frame with no stroke weight.
    Jasmine

  • Can I set default colors for generated shapes in Premiere Pro CC?

    I'm working on some highlight video where I need to generate an ellipse on each clip to highlight a player. I'd like to use a yellow/yellow, 20% softness, 8 thickness ellipse each time, but by default PP gives me an ugly green/blue combination, and I have to change the inside/outside colors, softness and thickness each time I add a clip and generate an ellipse.
    Is there a way to set a default inner/outer color, thickness, and softness setting for each new generated shape so that I don't have to keep repeating these steps?

    If you are using the Title Designer to generate your ellipse, and if I understand what you want, the answer is yes.
    Unless I am completely off-base, your default font style below the title has the colors of that ugly green/blue combo.
    You can easily just set the ellipse the exact way you want it, and then go into the Font Styles menu and create a new font style. Give it a unique name like "Ellipse" and then drag that new style from the end up to the beginning of the list. (Upper left hand corner).
    I created an ellipse using a greenish yellow, rather unattractive color for both the shape and the stroke. I used a higher opacity because it shows up better in the screen shot, but I could have set it for 20% easily enough. I then went to the styles menu, created a new style, gave it a name, then went to the last style and dragged it up to the top left where you see it now. You have to look close.
    It is not particularly obvious that the shapes are based on the font style just as much as the text is.

  • Setting different vibrations for contacts is not working in iOS 7. Thoughts?

    Setting a different vibration alert for a variety of contacts "appears" to be working; the settings are accepted and visible, however, when an incoming text arrives, they all vibe the same - not differentiated. <shrug>.  Using iphone 4S / iOS7

    Works fine for me on my iPad and iPhone.
    Did you turn it on on the iPad?
    Settings-videos-homesharing

  • FYI: Setting OLE DB for OLAP does not work in BW Add-On Frontend Patch 402

    The setting for property 'Allow External Access for this Query' (OLE DB for OLAP) for a BEx query is not being saved when patch 402 for GUI 720 is used. There is no warning or error message. It works in patch 401 and hopefully as well in the upcoming 500.
    This impacts all external use of BEx queries, including access from Business Objects. By the way, a universe connection to the query will still function after the property setting is gone, but a new connection cannot be created as the query is not visible anymore.
    Regards,
    József Zérczi.

    Hallo Christian,
    Please see note 1587566 where it states:
    When uninstalling with the command line options "/uninstall /all", the event
    scripts of installed packages, which are defined to run on uninstall, are now
    executed.
    Recommend to update your installation server to the latest nwsapsetup patches referenced in the attached note http://service.sap.com/sap/support/notes/1587566
    Best Regards,
    Jude

  • I have a ipod mini from 2005, it will only work on my charger.  I did get a new ipod 4touch, how do i get the music to the new one if i don't know the password of the mini.  My ex-husband set it up for me, i not aboout to call and ask for the password.

    I have a ipod mini from 2005,  it will only work on my charger.  I did get a new i pod touch 4, how do i get the music from the old mini to the new touch.  I have never put any music on it myself, my ex-husband did it all and has the password.  I never new it.  I'm sure not about to call him and I don't think he'd give it to me anyway.  Please help!!!

    I don't think the password will matter, because you can't use anything on the iPod or in iTunes to transfer song files from iPod to computer (except for songs purchased from the iTunes Store).  However, there are third-party methods and utilities that can transfer from iPod to computer.  If you do a Google search on something like "ipod transfer," you should get some links.
    The simple software "lock" used on iPods should not prevent you from off-loading the song files.  Once the song files are on your computer, you can add them to your iTunes library.  Then, you can do a Restore on the iPod to give it a fresh start and sync it (and the iPod touch) as desired.
    NOTE:  For songs purchased by you from the iTunes Store, you can also re-download them to your computer at no cost, from the iTunes Store Purchased screen.  The link to Purchased is on the iTunes Store Home screen, under QUICK LINKS.

  • Set Dolby Digital for optical only, not HDMI?

    Just wondering if there's a way to set the ATV2 to output Dolby Digital only over optical but not over HDMI? My TV doesn't support DD but (obviously) my 5.1 receiver does. If I leave the setting on "Auto" it just sends a stereo signal to both HDMI and optical, but if I turn it on to "On" then it works via optical but not over HDMI since the TV can't understand it.

    I set up my TV as a monitor only and route all sound directly via optical to my receiver. I then muted my TV, and control sound via the receiver.

  • Unable to set tooltip for item (sap.ui.core.Item)

    sap.ui.core.Item does not have the property 'tooltip'. But it borrows 'tooltip' property and setTooltip( ), getTooltip( ) methods from sap.ui.core.Element.
    Still, if I set the tooltip for item, it is not reflected. What might be wrong?
    Consider the following piece of code for example:
    var item = new sap.ui.core.Item({text:'Item'});
      item.setTooltip('tooltip');
      var oCollection = new sap.ui.ux3.Collection({ items: item
      var oCollectionInspector = new sap.ui.ux3.CollectionInspector({
      'fitParent' : false,
      'collections' : [
      new sap.ui.ux3.Collection({
      'title' : 'My Accounts',
      'items' : [ item]
      oCollectionInspector.placeAt('content');

    Tooltip is applied on the Item, but it seems Collection Inspector set its own tooltip for the Item. You can do something like this to set your own tooltip,
    var item = new sap.ui.core.Item("myItem",{text:'Item'});
    var oCollectionInspector = new sap.ui.ux3.CollectionInspector({
      'fitParent' : false,
      'collections' : [
      new sap.ui.ux3.Collection({
      'title' : 'My Accounts',
      'items' : [ item]
      oCollectionInspector.placeAt('content');
      oCollectionInspector.onAfterRendering = function(){
           sap.ui.ux3.CollectionInspector.prototype.onAfterRendering.apply(this,arguments);
           $('#myItem').attr('title','My Tooltip');

  • I have Firefox set to check for updates but do not install, just notify. WHen I start Yahoo email, F automatically downloads and updates anyway.

    I have FF set to check for but do not install updates. When I start yahoo email, FF automatically instals updates. I am only user/administartor. How do I make this stop? It is messing up other programs - destroyed my Norton security.

    Usually, the "notify" setting works fine. I don't know whether having Yahoo as the home page makes a difference. ??
    Updates are available for your Norton add-ons. Please see this article: [http://community.norton.com/t5/Norton-Toolbar-Norton-Identity/Firefox-15-Support-for-Norton-Toolbar/td-p/791174 Firefox 15 Support for Norton Toolbar - Norton Community].
    (Firefox probably can't find those automatically because the updates arrive through Norton LiveUpdate instead of the Mozilla add-ons site.)

  • JTree- seperate tooltip for each node

    hi,
    i would like to have different tooltips for different nodes. in all tutorials they have given the method of assinging tooltip in a general class i.e. setting a tooltip for all leaf nodes etc.. But i would like to have seperate tooltip for each node.
    thanx

    hi,
    Doing both of the above tasks will lead to have a tooltip same for all nodes. But i need all the toltips to be different for different leafs.
    However i solved that problem using mouseListeners and getPath() method..
    Now i have another problem. when i move my mouse over any leaf node(not necessarily selecting just on moving over the text) i would like to change the color of the text of that particular node to another color. If i use renderer to do this then it may change the color of all the nodes.
    how it could be done for only a particular node and not for all. Aren't there any renderers for nodes.
    thanx

  • Yone Tooltip for each item of select-list

    Could an

    To set the tooltip for each value selected from Drop Down list - means value is selected in drop down list and the mouse over on the field (i thought this way, if its not correct ignore the same.
    For the above case check the selected drop down value on change event and set the desired text as tooltip.
    For example
    if(xfa.event.newText == "One")
    this.assist.toolTip.value = "You Selected Choice " +xfa.event.newText;
    Thanks,
    Raghu.

  • Tooltip for AttributedString?

    Hi all,
    I format text in a JTextPane with Styles and Attributes. This works fine and looks like I expected. Is it possible to add a Tooltip to an AttributedString?
    I tried to add an AttributeComponent (in this case a JLabel) instead of the attributed string, because I could set a Tooltip for the JLabel. But the JLabel is not shown in my JTextPane. Maybe someone can give me a hint how to add a Tooltip to an AttributedString or how to display the JLabel as ComponentAttribute.
    Thank you.
    Axel

    Here's some code for a MouseMotionListener I put on my JTextPane and use to implement a hyperlink cursor over styled text representing a url reference:
    class TextPaneMouseMotion extends MouseMotionAdapter
      public void mouseMoved(MouseEvent e)
        JTextComponent jt = (JTextComponent)e.getComponent();
        int pos = jt.viewToModel(e.getPoint());
        if (pos >= 0)
          Element el = d.getCharacterElement(pos);
          AttributeSet as = el.getAttributes();
          if (as.getAttribute(urlRef__) != null)
            jt.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          else
            jt.setCursor(Cursor.getDefaultCursor());
    }You can put anything you like into thje style - not just text attributes. Define your own keys (urlRef__ in my case) and if they are present when the mouse is over that part of the text then take the appropriate action.
    So in your case may be put the tool tip text into the style against your own well-known key and if its there in the mouse listener set the tool tip on the JTextPane.

  • Tooltip for RadioButtonGroupByKey

    Hi,
    Can anyone tell me how to set different tooltip for a RadioButtonGroupByKey UI element. I create the Simple Values for the an attribute and bind this to the RadioButtonGroupByKey.
    As each UI element has one setTooltip() method, how can we set different tooltip for each radio button in the RadioButtonGroupByKey UI element.
    Thanks.

    Hi Armin,
    Thanx for the answer, actually I was looking for someone to confirm it
    Partially Saravanan is correct as I can modify the tooltip on each selection of the radiobutton but this will not solve the problem as for all the radiobuttons I will see the same tooltip.
    Thanks Again.

  • How to set password policy for apps users

    Hi All,
    Can anyone please help me.
    I am working on apps 11i.
    How to set password policy for users
    Thanks

    Check Note: 189367.1 - Best Practices for Securing the E-Business Suite
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=189367.1

  • Tooltip for chart's bar or line

    Hi,
    I need to set a tooltip for my chart's bars, so when the user hovers on each one the chart's bars, a tooltip popup and give that bar's value.  I heard there is no direct solution for this problem.  If so, can we solve this problem in any advanced tricky way or I should just look for some other reporting tool other that Crystal Reports to meet this requirement?
    Thanks,
    Al

    Thank you very much!  It's funny that I've been looking for something that already existed as you pointed.  By the way, can I change the bar's default tooltip's text? I just need to have the x-axis value on the tooltip.  I need to exclude the field name from the tooltip's text.  Thanks again.
    Regards,
    Al

Maybe you are looking for

  • VL10B

    hi,         This is pretty urgent.Im not able to creatae delivery for a subcontracting purchase order and for a stock transport order of z document type. Is there any related configurations?I am getting the error "Selection criterium "Delivery creati

  • Translation date for exchange rate type 'M'

    Hello friends, How do I change the translation date for an exchange rate type, for a particular company code? My client wants the translation date for the exchange rate type 'M' to be document date instead of posting date. It is required as per Roman

  • Will mountain lion supports a 10 bits color depth?

    Just wondering if and when it will, and how much it affects color accuracy in photography comparing to chain that supports a full 10 bits per channel color depth. Thanks in advance for your answer. Max

  • Unable to Uninstall Adobe Reader X 10.0.1

    This issue error message states "The patch couldn't be opened...Verify the patch package exists and is accessable......Windows installer patch..."

  • Price based on purity

    hi experts, I have raised a PO for qty of 100 nos of ROH materials type. I have received 100 nos but the purity is not 100 % . for example 80%. I have to pay to the vendor  for 80% of purity only. We can amend the PO price befor GR. Kindly advice is