Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Display a form on a property label(Edditing propertys using Jface)
Display a form on a property label [message #792506] Tue, 07 February 2012 04:04
luke richards is currently offline luke richardsFriend
Messages: 1
Registered: February 2012
Junior Member
I would like to add this button to a field of a shape's property:

I use it to open a form to fill out a list of strings.

also would like some guidance on how to use JFace inside a GEF project.

Sorry, I'm not very good with English, also i'm newbie with eclipse, but I have much interest in learning.

Add the source of my shape's model:

package org.eclipse.gef.examples.shapes.model;


public class TransitionShape extends Shape {
  /** A 16x16 pictogram of a rectangular shape. */
  private static final String TRANS_NAME_PROP = "Name";
  private static final Image RECTANGLE_ICON = createImage("icons/rectangle16.gif");

  private static final long serialVersionUID = 1;

  private String Name = new String();

  static {

    descriptors = new IPropertyDescriptor[]{new TextPropertyDescriptor(TRANS_NAME_PROP, "Name")};
  } // static

  public IPropertyDescriptor[] getPropertyDescriptors() {
    return descriptors;

  public Object getPropertyValue(Object propertyId) {
    if (TRANS_NAME_PROP.equals(propertyId)) {
      return Name;
    return super.getPropertyValue(propertyId);

  public void setPropertyValue(Object propertyId, Object value) {

    if (TRANS_NAME_PROP.equals(propertyId)) {
      setName((String) value);
    } else {
      super.setPropertyValue(propertyId, value);

  public Image getIcon() {
    return RECTANGLE_ICON;

  public String toString() {
    return "Rectangle " + hashCode();

  public void setName(String name) {
    Name = name;

  public String getName() {
    return Name;

Previous Topic:Problems with autoscroll behavior
Next Topic:Disable connection feedback
Goto Forum:

Current Time: Wed Oct 27 01:51:43 GMT 2021

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

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

Back to the top