/** * This returns Kleidung.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated not */ @Override public Object getImage(Object object) { Beschreibbar beschreibbar = (Beschreibbar) object; if (beschreibbar.getImage() != null) { Image image = AdapterFactoryUtil.getInstance().getImageScaledBy(16, beschreibbar.getImage()); if (image != null) return image; } return overlayImage(object, getResourceLocator().getImage("full/obj16/Kleidung")); }
/** * @param script * @return */ private Print printDescription(Beschreibbar script) { DefaultGridLook look = new DefaultGridLook(5, 5); look.setHeaderGap(5); GridPrint grid = new GridPrint("d:g,d", look); // $NON-NLS-1$ GridPrint innerGrid = new GridPrint("d:g", look); // $NON-NLS-1$ grid.add(innerGrid); Image imageScaledBy = AdapterFactoryUtil.getInstance().getImageScaledBy(BIG_SCALE, script.getImage()); if (imageScaledBy != null) { grid.add(SWT.RIGHT, SWT.TOP, new ImagePrint(imageScaledBy.getImageData())); } // grid.add(new LinePrint(), GridPrint.REMAINDER); innerGrid.add(new TextPrint(toSimpleName(script), head1)); innerGrid.add(new TextPrint(printString(script.getBeschreibung())), GridPrint.REMAINDER); return grid; }
/** * Create contents of the form. * * @param managedForm */ @Override protected void createFormContent(IManagedForm managedForm) { FormToolkit toolkit = managedForm.getToolkit(); ScrolledForm form = managedForm.getForm(); form.setText(AdapterFactoryUtil.getInstance().getLabelProvider().getText(object)); Composite body = form.getBody(); toolkit.decorateFormHeading(form.getForm()); toolkit.paintBordersFor(body); managedForm.getForm().getBody().setLayout(new GridLayout(1, false)); BeschreibbarWidget beschreibbarWidget = new BeschreibbarWidget(managedForm.getForm().getBody(), SWT.NONE, object, toolkit); GridData gd_beschreibbarWidget = new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1); gd_beschreibbarWidget.widthHint = 0; gd_beschreibbarWidget.heightHint = 0; beschreibbarWidget.setLayoutData(gd_beschreibbarWidget); managedForm.getToolkit().adapt(beschreibbarWidget); managedForm.getToolkit().paintBordersFor(beschreibbarWidget); m_bindingContext = initDataBindings(); }