-
Notifications
You must be signed in to change notification settings - Fork 55
/
FXFillPropertyDescriptor.java
48 lines (43 loc) · 1.47 KB
/
FXFillPropertyDescriptor.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*******************************************************************************
* Copyright (c) 2014 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexander Nyßen (itemis AG) - initial API and implementation
*
*******************************************************************************/
package org.eclipse.gef4.mvc.fx.ui.properties;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.views.properties.PropertyDescriptor;
/**
* The {@link FXFillPropertyDescriptor} is a {@link PropertyDescriptor} that
* uses the {@link FXFillCellEditor} to edit its value.
*
* @author anyssen
*
*/
public class FXFillPropertyDescriptor extends PropertyDescriptor {
/**
* Creates an property descriptor with the given id and display name.
*
* @param id
* The id of this property
* @param displayName
* The name to display for this property
*/
public FXFillPropertyDescriptor(Object id, String displayName) {
super(id, displayName);
}
@Override
public CellEditor createPropertyEditor(Composite parent) {
CellEditor editor = new FXFillCellEditor(parent);
if (getValidator() != null) {
editor.setValidator(getValidator());
}
return editor;
}
}