Skip to content

Commit 2df129f

Browse files
committed
Add deprecated annotation to fields and methods
Fixes new warnings due to https://eclipse.dev/eclipse/markdown/?f=news/4.38/jdt.md#changes-concerning-deprecation-warnings
1 parent a0a36c4 commit 2df129f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2017 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -32,13 +32,21 @@
3232
@Deprecated
3333
public class AnimatedProgress extends Canvas {
3434

35+
@Deprecated
3536
static final int SLEEP = 70;
37+
@Deprecated
3638
static final int DEFAULT_WIDTH = 160;
39+
@Deprecated
3740
static final int DEFAULT_HEIGHT = 18;
41+
@Deprecated
3842
boolean active = false;
43+
@Deprecated
3944
boolean showStripes = false;
45+
@Deprecated
4046
int value;
47+
@Deprecated
4148
int orientation = SWT.HORIZONTAL;
49+
@Deprecated
4250
boolean showBorder = false;
4351

4452
/**
@@ -69,6 +77,7 @@ public class AnimatedProgress extends Canvas {
6977
* @see SWT#BORDER
7078
* @see #getStyle()
7179
*/
80+
@Deprecated
7281
public AnimatedProgress(Composite parent, int style) {
7382
super(parent, checkStyle(style));
7483

@@ -94,12 +103,14 @@ private static int checkStyle (int style) {
94103
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
95104
* </ul>
96105
*/
106+
@Deprecated
97107
public synchronized void clear(){
98108
checkWidget();
99109
if (active) stop();
100110
showStripes = false;
101111
redraw();
102112
}
113+
@Deprecated
103114
@Override
104115
public Point computeSize(int wHint, int hHint, boolean changed) {
105116
checkWidget();
@@ -123,6 +134,7 @@ private void drawBevelRect(GC gc, int x, int y, int w, int h, Color topleft, Col
123134
gc.drawLine(x+w, y, x+w, y+h);
124135
gc.drawLine(x, y+h, x+w, y+h);
125136
}
137+
@Deprecated
126138
void paint(PaintEvent event) {
127139
GC gc = event.gc;
128140
Display disp= getDisplay();
@@ -137,6 +149,7 @@ void paint(PaintEvent event) {
137149

138150
paintStripes(gc);
139151
}
152+
@Deprecated
140153
void paintStripes(GC gc) {
141154

142155
if (!showStripes) return;
@@ -184,6 +197,7 @@ void paintStripes(GC gc) {
184197
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
185198
* </ul>
186199
*/
200+
@Deprecated
187201
public synchronized void start() {
188202
checkWidget();
189203
if (active) return;
@@ -205,6 +219,7 @@ public synchronized void start() {
205219
/**
206220
* Stop the animation. Freeze the presentation at its current appearance.
207221
*/
222+
@Deprecated
208223
public synchronized void stop() {
209224
//checkWidget();
210225
active = false;

0 commit comments

Comments
 (0)