How to change the font of the label name in property view? [message #211941] |
Thu, 16 March 2006 15:41  |
Eclipse User |
|
|
|
Hi, everyone,
I've implemented a small editor using GEF. The properties of objects in
the editor are accessable through property view. As some important
properties must to highlighted, I want to change the color or font of the
label name in property view. Is there any way to do it?
thanks in advance for your help.
cheers,
lucia
|
|
|
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.03189 seconds