MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
deryaaltuntas
Post subject: Add new property to JComponents  PostPosted: Apr 06, 2011 - 03:26 PM



Joined: Mar 14, 2011
Posts: 36

I have created a new custom class that extends from JPanel.
I generated a parameter named "type" and set, get methods.
When I add these custom panel to any other Panel , I want to set
type property in "Properties" window of custom JPanel.
But I could not.I think it must be a way to do this. What Am I mising?

enum SelecterType {
CONTINGENCY_LIST, CONTINGENCY, EMPTY
}

public SelecterType getType() {
return type;
}
public void setType(SelecterType type) {
this.type = type;
if(type != null && !type.equals(SelecterType.EMPTY))
populateList();
}
 
 View user's profile Send private message  
Reply with quote Back to top
support-tony
Post subject: RE: Add new property to JComponents  PostPosted: Apr 08, 2011 - 08:57 AM



Joined: Mar 09, 2011
Posts: 916

deryaaltuntas,

You need to add the custom class to the palette.

Go to the Matisse Palette pane and click the menu button, this will show only one menu item, "Manage Palette...", click it. This will bring up a palette manager window. Click the Add Widget button and then type in your custom class name. You should be able to then select your custom class and press OK. You should now be able to use your custom widget in a Matisse form and the properties should display with your "type" property.

If you still have problems after performing these steps, could you post back with more details?

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits