Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to change the font of the label name in property view?
How to change the font of the label name in property view? [message #211941] Thu, 16 March 2006 15:41 Go to next message
Yong cheng is currently offline Yong chengFriend
Messages: 46
Registered: July 2009
Member
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 Go to previous message
Eclipse UserFriend
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 :-)
Previous Topic:Chart axis with units
Next Topic:How do i run my Gef Application?
Goto Forum:
  


Current Time: Fri Apr 19 11:14:10 GMT 2024

Powered by FUDForum. Page generated in 0.01701 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top