BalloonTip Content Margin

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

BalloonTip Content Margin

Postby patelchirag24 » Wed Dec 10, 2008 3:47 pm

Hi,
I am trying to use BalloonTip to rename node (rounded rectangle shape) on my Data Flow Diagram. I could able to show BalloonTip exactly on the top of the existing node. I have added TextEditorPanel(my own panel class extending JPanel) to BalloonTip. I want to get rid of Margin which is left between BalloonTip and the Panel (Its component). Please guide me if any one has any suggestion.

Thanks
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby patelchirag24 » Wed Dec 10, 2008 3:49 pm

Hi..
Also if anyone has idea... Can we remove/disable Border of BalloonTip ? I dont want to show the border of BalloonTip.
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby JIDE Support » Wed Dec 10, 2008 3:52 pm

I am not sure if you refer to the corner size. Please try BalloonTipDemo which has a bunch of options you can adjust in the option pane. Try them all to see if you can get the exact shape you want then look at the source code of BalloonTipDemo.java to find out which API does the trick.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: BalloonTip Content Margin

Postby patelchirag24 » Thu Dec 11, 2008 1:48 pm

Thanks for the suggestion. Now I am facing another problem. I want to get rid of Vertex (Arrow) from the RoundedRectangleBalloonShape, as well as I can get Insets for a given content. But How can i set insets ?
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby JIDE Support » Thu Dec 11, 2008 2:07 pm

Actually the demo will show you the answer as well. For example, RoundedRectangleBalloonShape will always have the arrow (that's why it is called Balloon) but there RoundedRectangularShape which doesn't have an arrow.

What insets do you refer to? BalloonTip doesn't force any insets except the rounded corner (which is why I said you can change corner size in my previous post). The whole content of the balloon tip is controlled by your code.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: BalloonTip Content Margin

Postby patelchirag24 » Thu Dec 11, 2008 2:58 pm

Hey, thank you very much... I really appreciate it. Actually after posting the question, I came to know that insects depend on the corner size. I used RoundedRectangleShape now. Is is possible to disable/make invisible the border of BalloonTip ?
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby patelchirag24 » Thu Dec 11, 2008 3:02 pm

setting it to "null" didn't work out. Infact setting "EmptyBorder" also did not work out. Are they using special border components ? (JIDE)
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby JIDE Support » Thu Dec 11, 2008 3:06 pm

It is not border but painted directly. You can call BalloonTip#setForeground to change the color.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: BalloonTip Content Margin

Postby patelchirag24 » Thu Dec 11, 2008 3:49 pm

Thank you very very much. It just solved my problem. I really appreciate your help. Thanks a lot......
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby patelchirag24 » Fri Dec 12, 2008 2:35 pm

I have another question. It is also related to BalloonTip so I am adding it here.

I kept JPanel inside BalloonTip, and inside this JPanel I have TextArea,
this TextArea may grow/shrink acconding to text inside it. I want to resize BalloonTip accordingly. Can you guide me?
Thank you very much in advance.
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby JIDE Support » Fri Dec 12, 2008 2:41 pm

You probably need to add your own code to do it. JidePopup#packPopup is the method to resize the popup properly. However I don't think there is a way for you to call it. I will add an API for it.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: BalloonTip Content Margin

Postby JIDE Support » Fri Dec 19, 2008 3:35 pm

Just so you know, packPopup method is added in 2.4.7 which is just released.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: BalloonTip Content Margin

Postby patelchirag24 » Mon Dec 22, 2008 11:36 am

Thank you very much...
Is there any provision in BalloonTip, that if the component inside balloonTip (for example ScrollPane) is set to invisible,
scrollPane.setVisible(false);
BalloonTip also disappears ?

I have BalloonTip, inside which I have JScrollPane inside which I am having JTextArea,
now if user types everything what he wants to type, He will press ENTER to confirm it. I did write setVisible(false) for scrollPane and the JTextArea,
but is there any way that BalloonTip can look to its component/content and if disappear automatically ! (lose focus Or anything similar)

Thanking You,
patelchirag24
 
Posts: 18
Joined: Wed Dec 10, 2008 3:35 pm

Re: BalloonTip Content Margin

Postby JIDE Support » Mon Dec 22, 2008 12:44 pm

I don't think it should work that way. You need to call BalloonTip#hide to hide it.

Tahnks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: Google [Bot] and 19 guests