Surround with ... own classes?

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Surround with ... own classes?

Postby mkornatzki » Thu Apr 29, 2010 2:45 am

Hi,

is it possible to extend the "Surround with" menu with own entrys?

regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Surround with ... own classes?

Postby Konstantin.Scheglov » Thu Apr 29, 2010 5:20 am

Yes, you can contribute new surround target using new plug-in.
See "com.instantiations.designer.core.surroundWith" extension point.

Currently this is not possible do to in declarative way and I'm not sure that this can be done, because each component has specific API to add component into it.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: Surround with ... own classes?

Postby mkornatzki » Thu Apr 29, 2010 5:31 am

only to clarify.
did that mean that i have to start with developing/extending eclipse-plugins?
And then i can extend the menu?
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Surround with ... own classes?

Postby Konstantin.Scheglov » Fri Apr 30, 2010 5:19 am

Yes, see how targets are contributed for some Swing containers.

If you can describe in more details, what do you want to do in new entries, there may be different answer. :-)

Code: Select all
   <extension point="com.instantiations.designer.core.surroundWith">
      <!-- processors -->
      <processor toolkit="com.instantiations.designer.swing"
         class="com.instantiations.designer.swing.model.layout.absolute.AbsoluteLayout_SurroundProcessor"/>
      <processor toolkit="com.instantiations.designer.swing"
         class="com.instantiations.designer.swing.model.layout.gbl.GridBagLayout_SurroundProcessor"/>
      <!-- targets -->
      <target toolkit="com.instantiations.designer.swing"
         class="com.instantiations.designer.swing.model.util.surround.JPanel_SurroundTarget"/>
      <target toolkit="com.instantiations.designer.swing"
         class="com.instantiations.designer.swing.model.util.surround.JPanelWithBorder_SurroundTarget"/>
      <target toolkit="com.instantiations.designer.swing"
         class="com.instantiations.designer.swing.model.util.surround.JSplitPane_SurroundTarget"/>
      <target toolkit="com.instantiations.designer.swing"
         class="com.instantiations.designer.swing.model.util.surround.JScrollPane_SurroundTarget"/>
      <target toolkit="com.instantiations.designer.swing"
         class="com.instantiations.designer.swing.model.util.surround.JTabbedPane_SurroundTarget"/>
   </extension>
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: Surround with ... own classes?

Postby mkornatzki » Fri Apr 30, 2010 5:36 am

ok, thank you.
i have to start with eclipse-development if we want to extend the menu for something like an advancedJTable of a tablelibrary and so on.
at this thime this was only a question on how to do this. we didn't have the requirement.

thanks, michael
can you have a look at my other question (wbp-component.xml and generics) this was more important to me because we can not configure all the properties of a component with swingdesigner?
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Surround with ... own classes?

Postby Konstantin.Scheglov » Sat May 01, 2010 12:10 am

mkornatzki wrote:ok, thank you.
can you have a look at my other question (wbp-component.xml and generics) this was more important to me because we can not configure all the properties of a component with swingdesigner?


This is not easy problem, so it requires some time to check what we can do and prepare answer.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest