How to extend JTable
Hello. I'm using Selena, latest EAP. I try to create custom Component. Specifically I try to extend JTable.
So, I create a class, extend it from JTable, add my own properties, compile, add it to UI Designer panel, drag to a form... but no new properties in the UI Designer Properties Pane.
What do I need to do to?
What do I need? Simply extend JTable with several small things, like predefined column widths. It's easy to do without UIDesigner, but what do I need to create to make it work there?
Thanks.
Please sign in to leave a comment.
Hello Alexander,
What is the type of the properties you have added?
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Several arrays of integer and Color.
Hello Alexander,
Arrays of integer are currently not supported because there is no viewing/editing
UI for array properties. The color properties should be visible if you have
correctly defined public getter and setter methods.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hmm, and can I define editor? Through BeanInfo or something else?
I tried to define String property and I cannot see it too.
Do I need to restart Idea/reload project after I recompiled my Table class?
Hello Alexander,
There's currently no pluggability for defining editors. It's likely that
we'll add BeanInfo support some day, but it's not supported now.
You need to press the "Reload custom components" button on the UI Designer
toolbar.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Ok. I've understood everything I want. Thanks.
And how can I assign "helpful" or "answered" status to your reply? I do not see buttons "next to a message"…