39 @Native public static final int BACK_BUTTON_END_PART = 1 << 5;
40 @Native public static final int FORWARD_BUTTON_END_PART = 1 << 6;
41
42 @Native public static final int HORIZONTAL_SCROLLBAR = 0;
43 @Native public static final int VERTICAL_SCROLLBAR = 1;
44
45 private static int thickness;
46
47 public static int getThickness() {
48 return thickness > 0 ? thickness : 12;
49 }
50
51 public static void setThickness(int value) {
52 thickness = value;
53 }
54
55 protected abstract Ref createWidget(long id, int w, int h, int orientation, int value, int visibleSize, int totalSize);
56
57 public abstract void paint(WCGraphicsContext g, Ref sbRef, int x, int y, int pressedPart, int hoveredPart);
58
59 protected abstract int hitTest(int w, int h, int orientation, int value, int visibleSize, int totalSize, int x, int y);
60
61 protected abstract int getThumbPosition(int w, int h, int orientation, int value, int visibleSize, int totalSize);
62
63 protected abstract int getThumbLength(int w, int h, int orientation, int value, int visibleSize, int totalSize);
64
65 protected abstract int getTrackPosition(int w, int h, int orientation);
66
67 protected abstract int getTrackLength(int w, int h, int orientation);
68
69 public abstract WCSize getWidgetSize(Ref widget);
70 }
|
39 @Native public static final int BACK_BUTTON_END_PART = 1 << 5;
40 @Native public static final int FORWARD_BUTTON_END_PART = 1 << 6;
41
42 @Native public static final int HORIZONTAL_SCROLLBAR = 0;
43 @Native public static final int VERTICAL_SCROLLBAR = 1;
44
45 private static int thickness;
46
47 public static int getThickness() {
48 return thickness > 0 ? thickness : 12;
49 }
50
51 public static void setThickness(int value) {
52 thickness = value;
53 }
54
55 protected abstract Ref createWidget(long id, int w, int h, int orientation, int value, int visibleSize, int totalSize);
56
57 public abstract void paint(WCGraphicsContext g, Ref sbRef, int x, int y, int pressedPart, int hoveredPart);
58
59 protected abstract int hitTest(long id, int x, int y);
60
61 protected abstract int getThumbPosition(long id);
62
63 protected abstract int getThumbLength(long id);
64
65 protected abstract int getTrackPosition(long id);
66
67 protected abstract int getTrackLength(long id);
68
69 public abstract WCSize getWidgetSize(Ref widget);
70 }
|