|
Re: How to change the font of the label name in property view? [message #212449 is a reply to message #211941] |
Thu, 23 March 2006 08:26 |
Eclipse User |
|
|
|
Originally posted by: rupesh_wakde.yahoo.com
Hi,
try this i have implemented that for my tool
public static final String FONT_PROP = "Symbol.font";
after this declare this in static function for descriptors
descriptors = new IPropertyDescriptor[] {
new DialogPropertyDescriptor(FONT_PROP, "Font Style",
new FileDialogAction("C:/WINDOWS/Fonts","FONT_PROP")),
};
implemrnt this methods
public void setFont(MyFont newFont)
{
if (newFont == null)
{
throw new IllegalArgumentException();
}
font = newFont;
firePropertyChange(FONT_PROP, null, newFont);
}
public Object getPropertyValue(Object propertyId)
{
if (FONT_PROP.equals(propertyId))
{
return font;
}
}
public void setPropertyValue(Object propertyId, Object value)
{
if (FONT_PROP.equals(propertyId))
{
setFont((MyFont) value);
}
}
Hope this will help U :-)
|
|
|
Powered by
FUDForum. Page generated in 0.04375 seconds