blob: d6506457ce8a04099f9a38c27edef1cf3e21feb4 (
plain) (
blame)
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
49
50
51
52
|
package org.eclipse.swt.animation;
import org.eclipse.swt.effects.*;
import org.eclipse.swt.internal.wpf.*;
import org.eclipse.swt.widgets.*;
class Properties {
static Class getParamType(String property) {
if (property.equalsIgnoreCase("width")
|| property.equalsIgnoreCase("height")
|| property.equalsIgnoreCase("x")
|| property.equalsIgnoreCase("y")
|| property.equalsIgnoreCase("Size")) {
return Double.TYPE;
}
return null;
}
static int getDependencyProperty(Object target, String property) {
if (property.equalsIgnoreCase("x")) return OS.Canvas_LeftProperty();
if (property.equalsIgnoreCase("y")) return OS.Canvas_TopProperty();
if (property.equalsIgnoreCase("Width")) {
if (target instanceof Composite) {
if (!(target instanceof Group
|| target instanceof Spinner
|| target instanceof TabFolder
|| target instanceof Table
|| target instanceof Tree)) {
return OS.Panel_WidthProperty();
}
}
return OS.FrameworkElement_WidthProperty();
}
if (property.equalsIgnoreCase("Height")) {
if (target instanceof Composite) {
if (!(target instanceof Group
|| target instanceof Spinner
|| target instanceof TabFolder
|| target instanceof Table
|| target instanceof Tree)) {
return OS.Panel_HeightProperty();
}
}
return OS.FrameworkElement_HeightProperty();
}
if (property.equalsIgnoreCase("Size")) {
if (target instanceof GlowEffect) return OS.OuterGlowBitmapEffect_GlowSizeProperty();
}
return 0;
}
}
|