Dies ist eine alte Version des Dokuments!


ControlDecoration

public void createPartControl(Composite parent) {
   GridLayout gl = new GridLayout(1, false);
   gl.marginRight = 6;  // Um Platz für di Decoration zu schaffen
   parent.setLayout(gl);
   Text text = new Text(parent, SWT.BORDER);
   GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
   text.setLayoutData(gd);
 
   Image image = FieldDecorationRegistry.getDefault()
                       .getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION).getImage();
   ControlDecoration decoration = new ControlDecoration(text, SWT.RIGHT | SWT.BOTTOM);
   decoration.setImage(image);
   decoration.setDescriptionText("Huhu");
}

Eigene Werkzeuge
Werkzeuge

gratis Counter by GOWEB
seit 9.10.2007