logo       

Re: Help with GraphPinScene and adding of Pins: msg#00072

java.netbeans.modules.graph.user

Subject: Re: Help with GraphPinScene and adding of Pins


Hi,

Yes, it is exactly like this. It is just an optimization since the icon
node is just an image with an label - one on top or left of the other.
Therefore I've used the vertical/horizontal flow layout in the
IconNodeWidget by default. I have updated the javadoc and documentation.

Sorry for inconvenience,
David


Joelle Lam wrote:
> Rajan,
>
> I believe you were correct in assuming that the AbsoluteLayout was set
> by default. However, it seems to be different in IconNodeWidget
> (assuming this is what you are using). By default it uses the
> VerticalFlowLayout unless specified by the overloaded constructor.
>
> Regards,
> Joelle
>
> Rajan Subramanian wrote:
>> I had wanted pins in specific locations and had tried the
>> setPreferredLocation method, however that did not work. After seeing
>> your email I decided to explicitly set the layout to Absolute and it
>> worked! For some reason I had assumed that the layout was by default
>> set to Absolute.
>>
>> Thanks for the pointer.
>> Rajan
>>
>> Joelle Lam wrote:
>>> You can set the a layout for any widget. This might be a good place
>>> to start.
>>> http://www.netbeans.org/download/dev/javadoc/org-netbeans-api-visual/org/netbeans/api/visual/widget/doc-files/documentation.html#Layout
>>>
>>>
>>> It sounds like you are using IconWidget as the Nodes. So you would
>>> just set the IconWidget's layout as show below. If you end having
>>> control over the constructor of the Widget, you can also set the
>>> layout there. Then when you add any children ie pin widgets of some
>>> sort) to that node widget they should fall into you desired layout.
>>> Widget w1 = new Widget (scene);
>>> w1.setBorder (BorderFactory.createLineBorder (1, Color.RED));
>>> w1.setLayout (LayoutFactory.createVerticalFlowLayout ());
>>>
>>> Remember, if you decide to play the pins in very specific location
>>> (ie you don't want to use one of the predefined layouts ), you can
>>> simply set the preferred location rather than modifying the layout.
>>>
>>> Regards,
>>> Joelle
>>>
>>> Rajan Subramanian wrote:
>>>> Hi,
>>>>
>>>> I have been able to try some stuff using GraphPinScene and add Pins
>>>> etc. to an IconWidget. My problem is that I need to place the pins
>>>> (they are images) in certain locations on the IconWidget. Anytime I
>>>> add pins it gets placed in the same location. Could someone guide
>>>> me to the best way to place pins in arbitrary locations on a
>>>> widget? Thanks
>>>> Rajan
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
>>>> users-unsubscribe-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
>>>> For additional commands, e-mail:
>>>> users-help-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> users-unsubscribe-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
>>> For additional commands, e-mail:
>>> users-help-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail:
>> users-help-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
> For additional commands, e-mail:
> users-help-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise