[Gephi-plugins] [Gephi] ComboBox in a layout interface

Mathieu Bastian mathieu.bastian at gmail.com
Wed Dec 15 16:59:12 CET 2010


Hi,

I not already known, you may have a look on the Netbeans API documentation
for the property sheet:

http://bits.netbeans.org/dev/javadoc/org-openide-explorer/org/openide/explorer/propertysheet/package-summary.html

I believe what you want to do is an Custom or InplaceEditor:
http://platform.netbeans.org/tutorials/nbm-property-editors.html#inplace-editor

Mathieu

On Wed, Dec 15, 2010 at 12:40 AM, Sébastien Heymann <
sebastien.heymann at gephi.org> wrote:

> Hi,
>
> I send this discussion on gephi-plugins as the solution is of interest for
> more people.
>
> Cheers!
> Seb
>
> 2010/12/15 Matt Groeninger <mgroeninger at gmail.com>
>
>> Thanks for the code, Alexis!
>>
>>
>>
>> I just looked it over and it looks like we came up with nearly identical
>> solutions.  You can see my method in the branch here:
>>
>> https://code.launchpad.net/~mgroeninger/gephi/circularlayout<https://code.launchpad.net/%7Emgroeninger/gephi/circularlayout>
>>
>>
>>
>> Basically, I created an abstract class called AbstractComboBoxEditor which
>> extends PropertyEditorSupport and overrides getTags(), getAsText() and
>> setAsText to use an <enum,string> Map variable to dynamically build the
>> list.  I then reused the class across several layouts in my plugin by
>> creating other classes which extend it and setting the Map variable using
>> “super”.
>>
>>
>>
>> It is good to know I wasn’t way off in left field with what I came up
>> with!
>>
>>
>>
>> I’ve researched the dialog box a bit and I am pretty sure I have a way to
>> do it… Now I just need a bit of time.
>>
>>
>>
>> @Sébastien: Thanks for mentioning my questions to Alexis!  I appreciate
>> it!
>>
>>
>>
>> Hope you both are having a good week,
>>
>> Matt
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *From:* Alexis Jacomy [mailto:alexis.jacomy at gmail.com]
>> *Sent:* Monday, December 13, 2010 4:23 PM
>> *To:* mgroeninger at gmail.com
>> *Cc:* Sébastien Heymann
>> *Subject:* [Gephi] ComboBox in a layout interface
>>
>>
>>
>> Hi Matthew,
>>
>>
>>
>> Sébastien just told me about your ComboBox issue, and I actually had the
>> same trouble some months ago, when I was implementing the GeoLayout plugin.
>> You will find the sources in GeoLayout.zip has an attached file. I don't
>> remember exactly how I solved that problem, but it is all in the *
>> AbstractProjectionPropertyEditor.java* and *CustomComboBoxEditor.java*classes. I fill my ComboBox in the first class through a static String[] in
>> my layout class. About the dialog boxes, sorry but I have no idea...
>>
>>
>>
>> So, I hope this will help you, tell me if you meet any issue in that code!
>>
>> @Sébastien: As you can see, I finally found back my sources :) no time to
>> put them on GitHub tonight, but I will to it ASAP...
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Alexis
>>
>
>
> _______________________________________________
> gephi-plugins mailing list
> gephi-plugins at lists.gephi.org
> http://gephi.org/mailman/listinfo/gephi-plugins
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gephi.org/pipermail/gephi-plugins/attachments/20101215/0a53664a/attachment.html>


More information about the gephi-plugins mailing list