Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-12-03 11:52:49 +0000
committerAlexander Kurtakov2013-12-03 11:52:49 +0000
commit49533f5c459dbf07a5def26b2f0889ab7234c8b9 (patch)
tree72e0a1cd4d9ad9fcaab53ae3a8f1fd735f0cf1b0 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets
parent741bc6e1d6fba188a6d8fb1fa43ab365cc257527 (diff)
downloadeclipse.platform.swt-49533f5c459dbf07a5def26b2f0889ab7234c8b9.tar.gz
eclipse.platform.swt-49533f5c459dbf07a5def26b2f0889ab7234c8b9.tar.xz
eclipse.platform.swt-49533f5c459dbf07a5def26b2f0889ab7234c8b9.zip
Add missing @Override annotations.
Since moving to 1.5 this warning was left to enabled which caused 1000+ warnings. Add all annotations. Change-Id: I647cbd86fe93e8daed655def41f9d5fbcf16e609 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/Bullet.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java35
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java25
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormData.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledCompositeLayout.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextDropTargetEffect.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeEditor.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeItem.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java3
29 files changed, 208 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java
index 1ba6793a6d..b4b465093f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/AnimatedProgress.java
@@ -74,6 +74,7 @@ public AnimatedProgress(Composite parent, int style) {
showBorder = (style & SWT.BORDER) != 0;
addControlListener(new ControlAdapter() {
+ @Override
public void controlResized(ControlEvent e) {
redraw();
}
@@ -108,6 +109,7 @@ public synchronized void clear(){
showStripes = false;
redraw();
}
+@Override
public Point computeSize(int wHint, int hHint, boolean changed) {
checkWidget();
Point size = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/Bullet.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/Bullet.java
index 69c4694d3f..fa552406cf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/Bullet.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/Bullet.java
@@ -121,6 +121,7 @@ int indexOf (int lineIndex) {
}
return -1;
}
+@Override
public int hashCode() {
return style.hashCode() ^ type;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
index 69d4b037a7..75cdeef5f0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
@@ -180,6 +180,7 @@ public Control getBottom() {
checkWidget();
return bottom;
}
+@Override
public Rectangle getClientArea() {
return new Rectangle(0, 0, 0, 0);
}
@@ -417,6 +418,7 @@ public void setBottom(Control control) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setLayout (Layout layout) {
checkWidget();
return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java
index 2b0b5f19af..10a65ea3e4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBannerLayout.java
@@ -21,6 +21,7 @@ import org.eclipse.swt.widgets.*;
*/
class CBannerLayout extends Layout {
+@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
CBanner banner = (CBanner)composite;
Control left = banner.left;
@@ -100,11 +101,13 @@ int computeTrim(Control c) {
}
return c.getBorderWidth () * 2;
}
+@Override
protected boolean flushCache(Control control) {
Object data = control.getLayoutData();
if (data != null && data instanceof CLayoutData) ((CLayoutData)data).flushCache();
return true;
}
+@Override
protected void layout(Composite composite, boolean flushCache) {
CBanner banner = (CBanner)composite;
Control left = banner.left;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
index 04c0528d5d..c742c07cd2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
@@ -358,6 +358,7 @@ void arrowEvent (Event event) {
}
}
}
+@Override
protected void checkSubclass () {
String name = getClass ().getName ();
int index = name.lastIndexOf ('.');
@@ -426,6 +427,7 @@ void comboEvent (Event event) {
}
}
+@Override
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
@@ -643,6 +645,7 @@ String getAssociatedLabel () {
}
return null;
}
+@Override
public Control [] getChildren () {
checkWidget();
return new Control [0];
@@ -755,6 +758,7 @@ public boolean getListVisible () {
checkWidget ();
return isDropped();
}
+@Override
public Menu getMenu() {
return text.getMenu();
}
@@ -791,6 +795,7 @@ public int getSelectionIndex () {
checkWidget ();
return list.getSelectionIndex ();
}
+@Override
public Shell getShell () {
checkWidget ();
Shell shell = super.getShell ();
@@ -802,6 +807,7 @@ public Shell getShell () {
}
return _shell;
}
+@Override
public int getStyle () {
int style = super.getStyle ();
style &= ~SWT.READ_ONLY;
@@ -957,6 +963,7 @@ public int indexOf (String string, int start) {
void initAccessible() {
AccessibleAdapter accessibleAdapter = new AccessibleAdapter () {
+ @Override
public void getName (AccessibleEvent e) {
String name = null;
String text = getAssociatedLabel ();
@@ -965,6 +972,7 @@ void initAccessible() {
}
e.result = name;
}
+ @Override
public void getKeyboardShortcut(AccessibleEvent e) {
String shortcut = null;
String text = getAssociatedLabel ();
@@ -976,6 +984,7 @@ void initAccessible() {
}
e.result = shortcut;
}
+ @Override
public void getHelp (AccessibleEvent e) {
e.result = getToolTipText ();
}
@@ -985,21 +994,26 @@ void initAccessible() {
list.getAccessible ().addAccessibleListener (accessibleAdapter);
arrow.getAccessible ().addAccessibleListener (new AccessibleAdapter() {
+ @Override
public void getName (AccessibleEvent e) {
e.result = isDropped () ? SWT.getMessage ("SWT_Close") : SWT.getMessage ("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
}
+ @Override
public void getKeyboardShortcut (AccessibleEvent e) {
e.result = "Alt+Down Arrow"; //$NON-NLS-1$
}
+ @Override
public void getHelp (AccessibleEvent e) {
e.result = getToolTipText ();
}
});
getAccessible().addAccessibleTextListener (new AccessibleTextAdapter() {
+ @Override
public void getCaretOffset (AccessibleTextEvent e) {
e.offset = text.getCaretPosition ();
}
+ @Override
public void getSelectionRange(AccessibleTextEvent e) {
Point sel = text.getSelection();
e.offset = sel.x;
@@ -1008,6 +1022,7 @@ void initAccessible() {
});
getAccessible().addAccessibleControlListener (new AccessibleControlAdapter() {
+ @Override
public void getChildAtPoint (AccessibleControlEvent e) {
Point testPoint = toControl (e.x, e.y);
if (getBounds ().contains (testPoint)) {
@@ -1015,6 +1030,7 @@ void initAccessible() {
}
}
+ @Override
public void getLocation (AccessibleControlEvent e) {
Rectangle location = getBounds ();
Point pt = getParent().toDisplay (location.x, location.y);
@@ -1024,30 +1040,36 @@ void initAccessible() {
e.height = location.height;
}
+ @Override
public void getChildCount (AccessibleControlEvent e) {
e.detail = 0;
}
+ @Override
public void getRole (AccessibleControlEvent e) {
e.detail = ACC.ROLE_COMBOBOX;
}
+ @Override
public void getState (AccessibleControlEvent e) {
e.detail = ACC.STATE_NORMAL;
}
+ @Override
public void getValue (AccessibleControlEvent e) {
e.result = getText ();
}
});
text.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter () {
+ @Override
public void getRole (AccessibleControlEvent e) {
e.detail = text.getEditable () ? ACC.ROLE_TEXT : ACC.ROLE_LABEL;
}
});
arrow.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter() {
+ @Override
public void getDefaultAction (AccessibleControlEvent e) {
e.result = isDropped () ? SWT.getMessage ("SWT_Close") : SWT.getMessage ("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -1056,6 +1078,7 @@ void initAccessible() {
boolean isDropped () {
return !isDisposed() && popup.getVisible ();
}
+@Override
public boolean isFocusControl () {
checkWidget();
if (text.isFocusControl () || arrow.isFocusControl () || list.isFocusControl () || popup.isFocusControl ()) {
@@ -1242,12 +1265,14 @@ void popupEvent(Event event) {
break;
}
}
+@Override
public void redraw () {
super.redraw();
text.redraw();
arrow.redraw();
if (popup.isVisible()) list.redraw();
}
+@Override
public void redraw (int x, int y, int width, int height, boolean all) {
super.redraw(x, y, width, height, true);
}
@@ -1422,6 +1447,7 @@ public void select (int index) {
}
}
}
+@Override
public void setBackground (Color color) {
super.setBackground(color);
background = color;
@@ -1445,18 +1471,21 @@ public void setEditable (boolean editable) {
checkWidget ();
text.setEditable(editable);
}
+@Override
public void setEnabled (boolean enabled) {
super.setEnabled(enabled);
if (popup != null) popup.setVisible (false);
if (text != null) text.setEnabled(enabled);
if (arrow != null) arrow.setEnabled(enabled);
}
+@Override
public boolean setFocus () {
checkWidget();
if (!isEnabled () || !getVisible ()) return false;
if (isFocusControl ()) return true;
return text.setFocus ();
}
+@Override
public void setFont (Font font) {
super.setFont (font);
this.font = font;
@@ -1464,6 +1493,7 @@ public void setFont (Font font) {
list.setFont (font);
internalLayout (true);
}
+@Override
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
@@ -1527,6 +1557,7 @@ public void setItems (String [] items) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setLayout (Layout layout) {
checkWidget ();
return;
@@ -1553,6 +1584,7 @@ public void setListVisible (boolean visible) {
checkWidget ();
dropDown(visible);
}
+@Override
public void setMenu(Menu menu) {
text.setMenu(menu);
}
@@ -1632,6 +1664,7 @@ public void setTextLimit (int limit) {
text.setTextLimit (limit);
}
+@Override
public void setToolTipText (String string) {
checkWidget();
super.setToolTipText(string);
@@ -1639,6 +1672,7 @@ public void setToolTipText (String string) {
text.setToolTipText (string);
}
+@Override
public void setVisible (boolean visible) {
super.setVisible(visible);
/*
@@ -1884,6 +1918,7 @@ void textEvent (Event event) {
}
}
}
+@Override
public boolean traverse(int event){
/*
* When the traverse event is sent to the CCombo, it will create a list of
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
index 9e4ef9eb65..fcdd095a23 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
@@ -149,6 +149,7 @@ private static int checkStyle (int style) {
return style |= SWT.NO_FOCUS | SWT.DOUBLE_BUFFERED;
}
+@Override
public Point computeSize(int wHint, int hHint, boolean changed) {
checkWidget();
Point e = getTotalSize(image, text);
@@ -270,6 +271,7 @@ private Point getTotalSize(Image image, String text) {
return size;
}
+@Override
public int getStyle () {
int style = super.getStyle();
switch (align) {
@@ -289,6 +291,7 @@ public String getText() {
//checkWidget();
return text;
}
+@Override
public String getToolTipText () {
checkWidget();
return appToolTipText;
@@ -307,14 +310,17 @@ public int getTopMargin() {
private void initAccessible() {
Accessible accessible = getAccessible();
accessible.addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
e.result = getText();
}
+ @Override
public void getHelp(AccessibleEvent e) {
e.result = getToolTipText();
}
+ @Override
public void getKeyboardShortcut(AccessibleEvent e) {
char mnemonic = _findMnemonic(CLabel.this.text);
if (mnemonic != '\0') {
@@ -324,10 +330,12 @@ private void initAccessible() {
});
accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
+ @Override
public void getChildAtPoint(AccessibleControlEvent e) {
e.childID = ACC.CHILDID_SELF;
}
+ @Override
public void getLocation(AccessibleControlEvent e) {
Rectangle rect = getDisplay().map(getParent(), null, getBounds());
e.x = rect.x;
@@ -336,14 +344,17 @@ private void initAccessible() {
e.height = rect.height;
}
+ @Override
public void getChildCount(AccessibleControlEvent e) {
e.detail = 0;
}
+ @Override
public void getRole(AccessibleControlEvent e) {
e.detail = ACC.ROLE_LABEL;
}
+ @Override
public void getState(AccessibleControlEvent e) {
e.detail = ACC.STATE_READONLY;
}
@@ -616,6 +627,7 @@ public void setAlignment(int align) {
}
}
+@Override
public void setBackground (Color color) {
super.setBackground (color);
// Are these settings the same as before?
@@ -793,6 +805,7 @@ public void setBottomMargin(int bottomMargin) {
this.bottomMargin = bottomMargin;
redraw();
}
+@Override
public void setFont(Font font) {
super.setFont(font);
redraw();
@@ -902,6 +915,7 @@ public void setText(String text) {
redraw();
}
}
+@Override
public void setToolTipText (String string) {
super.setToolTipText (string);
appToolTipText = super.getToolTipText();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index 8fc0086ec6..7ca2d43a9f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -630,6 +630,7 @@ int getControlHeight(Point ctrlSize) {
// SWT.error (SWT.ERROR_INVALID_SUBCLASS);
// }
//}
+@Override
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BODY, SWT.NONE, x, y, width, height);
@@ -791,6 +792,7 @@ ToolBar getChevron() {
checkWidget();
return chevronVisible;
}
+@Override
public Rectangle getClientArea() {
checkWidget();
//TODO: HACK - find a better way to get padding
@@ -1161,6 +1163,7 @@ public boolean getSingle() {
return single;
}
+@Override
public int getStyle() {
int style = super.getStyle();
style &= ~(SWT.TOP | SWT.BOTTOM);
@@ -1289,6 +1292,7 @@ public int indexOf(CTabItem item) {
void initAccessible() {
final Accessible accessible = getAccessible();
accessible.addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
CTabItem item = null;
int childID = e.childID;
@@ -1302,6 +1306,7 @@ void initAccessible() {
e.result = item == null ? null : stripMnemonic(item.getText());
}
+ @Override
public void getHelp(AccessibleEvent e) {
String help = null;
int childID = e.childID;
@@ -1313,6 +1318,7 @@ void initAccessible() {
e.result = help;
}
+ @Override
public void getKeyboardShortcut(AccessibleEvent e) {
String shortcut = null;
int childID = e.childID;
@@ -1333,6 +1339,7 @@ void initAccessible() {
});
accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
+ @Override
public void getChildAtPoint(AccessibleControlEvent e) {
Point testPoint = toControl(e.x, e.y);
int childID = ACC.CHILDID_NONE;
@@ -1353,6 +1360,7 @@ void initAccessible() {
e.childID = childID;
}
+ @Override
public void getLocation(AccessibleControlEvent e) {
Rectangle location = null;
Point pt = null;
@@ -1376,10 +1384,12 @@ void initAccessible() {
}
}
+ @Override
public void getChildCount(AccessibleControlEvent e) {
e.detail = items.length;
}
+ @Override
public void getDefaultAction(AccessibleControlEvent e) {
String action = null;
int childID = e.childID;
@@ -1389,6 +1399,7 @@ void initAccessible() {
e.result = action;
}
+ @Override
public void getFocus(AccessibleControlEvent e) {
int childID = ACC.CHILDID_NONE;
if (isFocusControl()) {
@@ -1401,6 +1412,7 @@ void initAccessible() {
e.childID = childID;
}
+ @Override
public void getRole(AccessibleControlEvent e) {
int role = 0;
int childID = e.childID;
@@ -1412,10 +1424,12 @@ void initAccessible() {
e.detail = role;
}
+ @Override
public void getSelection(AccessibleControlEvent e) {
e.childID = (selectedIndex == -1) ? ACC.CHILDID_NONE : selectedIndex;
}
+ @Override
public void getState(AccessibleControlEvent e) {
int state = 0;
int childID = e.childID;
@@ -1436,6 +1450,7 @@ void initAccessible() {
e.detail = state;
}
+ @Override
public void getChildren(AccessibleControlEvent e) {
int childIdCount = items.length;
Object[] children = new Object[childIdCount];
@@ -1470,6 +1485,7 @@ void initAccessible() {
}
void initAccessibleMinMaxTb() {
minMaxTb.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
if (e.childID != ACC.CHILDID_SELF) {
if (minItem != null && e.childID == minMaxTb.indexOf(minItem)) {
@@ -1483,6 +1499,7 @@ void initAccessibleMinMaxTb() {
}
void initAccessibleChevronTb() {
chevronTb.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
if (e.childID != ACC.CHILDID_SELF) {
if (chevronItem != null && e.childID == chevronTb.indexOf(chevronItem)) {
@@ -2231,6 +2248,7 @@ public void removeSelectionListener(SelectionListener listener) {
removeListener(SWT.DefaultSelection, listener);
}
+@Override
public void reskin(int flags) {
super.reskin(flags);
for (int i = 0; i < items.length; i++) {
@@ -2238,6 +2256,7 @@ public void reskin(int flags) {
}
}
+@Override
public void setBackground (Color color) {
super.setBackground(color);
renderer.createAntialiasColors(); //TODO: need better caching strategy
@@ -2366,6 +2385,7 @@ public void setBackground(Color[] colors, int[] percents, boolean vertical) {
// Refresh with the new settings
redraw();
}
+@Override
public void setBackgroundImage(Image image) {
super.setBackgroundImage(image);
renderer.createAntialiasColors(); //TODO: need better caching strategy
@@ -2508,6 +2528,7 @@ void setButtonBounds(GC gc) {
controlRects = rects;
if (changed || hovering) updateBkImages();
}
+@Override
public boolean setFocus () {
checkWidget ();
@@ -2537,6 +2558,7 @@ boolean isAncestor (Control control) {
}
return control == this;
}
+@Override
public void setFont(Font font) {
checkWidget();
if (font != null && font.equals(getFont())) return;
@@ -2544,6 +2566,7 @@ public void setFont(Font font) {
oldFont = getFont();
updateFolder(REDRAW);
}
+@Override
public void setForeground (Color color) {
super.setForeground(color);
redraw();
@@ -2841,6 +2864,7 @@ public void setMaximizeVisible(boolean visible) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setLayout (Layout layout) {
checkWidget();
return;
@@ -3563,6 +3587,7 @@ void showList (Rectangle rect) {
item.setImage(tab.getImage());
item.setData(id, tab);
item.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
MenuItem menuItem = (MenuItem)e.widget;
int index = indexOf((CTabItem)menuItem.getData(id));
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
index d97cdfe853..de14982f3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
@@ -78,6 +78,7 @@ CTabFolderEvent(Widget w) {
*
* @return a string representation of the event
*/
+@Override
public String toString() {
String string = super.toString ();
return string.substring (0, string.length() - 1) // remove trailing '}'
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
index 592bf96dfe..9b5413aea2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
@@ -20,6 +20,7 @@ import org.eclipse.swt.widgets.*;
* @see CTabFolder
*/
class CTabFolderLayout extends Layout {
+@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
CTabFolder folder = (CTabFolder)composite;
CTabItem[] items = folder.items;
@@ -101,9 +102,11 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
return new Point (minWidth, minHeight);
}
+@Override
protected boolean flushCache(Control control) {
return true;
}
+@Override
protected void layout(Composite composite, boolean flushCache) {
CTabFolder folder = (CTabFolder)composite;
// resize content
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index 0a982229a7..7efd1d1721 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
@@ -120,6 +120,7 @@ public CTabItem (CTabFolder parent, int style, int index) {
}
+@Override
public void dispose() {
if (isDisposed ()) return;
//if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
@@ -355,6 +356,7 @@ public void setFont (Font font){
this.font = font;
parent.updateFolder(CTabFolder.UPDATE_TAB_HEIGHT | CTabFolder.REDRAW_TABS);
}
+@Override
public void setImage (Image image) {
checkWidget();
if (image != null && image.isDisposed ()) {
@@ -386,6 +388,7 @@ public void setShowClose(boolean close) {
showClose = close;
parent.updateFolder(CTabFolder.REDRAW_TABS);
}
+@Override
public void setText (String string) {
checkWidget();
if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
index c944b71b52..4e2ea4d20b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
@@ -114,6 +114,7 @@ Sash createSash() {
*
* @return SWT.HORIZONTAL or SWT.VERTICAL
*/
+@Override
public int getOrientation() {
//checkWidget();
return (sashStyle & SWT.VERTICAL) != 0 ? SWT.HORIZONTAL : SWT.VERTICAL;
@@ -135,6 +136,7 @@ public int getSashWidth() {
checkWidget();
return SASH_WIDTH;
}
+@Override
public int getStyle() {
int style = super.getStyle();
style |= getOrientation() == SWT.VERTICAL ? SWT.VERTICAL : SWT.HORIZONTAL;
@@ -306,6 +308,7 @@ void onDragSash(Event event) {
* <li>ERROR_INVALID_ARGUMENT - if the value of orientation is not SWT.HORIZONTAL or SWT.VERTICAL, SWT.RIGHT_TO_LEFT or SWT.LEFT_TO_RIGHT
* </ul>
*/
+@Override
public void setOrientation(int orientation) {
checkWidget();
if (orientation == SWT.RIGHT_TO_LEFT || orientation == SWT.LEFT_TO_RIGHT) {
@@ -324,6 +327,7 @@ public void setOrientation(int orientation) {
}
layout(false);
}
+@Override
public void setBackground (Color color) {
super.setBackground(color);
background = color;
@@ -331,6 +335,7 @@ public void setBackground (Color color) {
sashes[i].setBackground(background);
}
}
+@Override
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
@@ -353,6 +358,7 @@ public void setForeground (Color color) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setLayout (Layout layout) {
checkWidget();
return;
@@ -410,6 +416,7 @@ public void setSashWidth(int width) {
SASH_WIDTH = width;
layout(false);
}
+@Override
public void setToolTipText(String string) {
super.setToolTipText(string);
for (int i = 0; i < sashes.length; i++) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormData.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormData.java
index eea3b39638..9a75cdb425 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormData.java
@@ -27,6 +27,7 @@ String getName () {
*
* @return a string representation of the event
*/
+@Override
public String toString () {
return getName()+" {weight="+weight+"}"; //$NON-NLS-2$
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java
index f01d0a2c16..c9d7086e92 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashFormLayout.java
@@ -20,6 +20,7 @@ import org.eclipse.swt.widgets.*;
* @see SashForm
*/
class SashFormLayout extends Layout {
+@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
SashForm sashForm = (SashForm)composite;
Control[] cArray = sashForm.getControls(true);
@@ -81,10 +82,12 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
return new Point(width, height);
}
+@Override
protected boolean flushCache(Control control) {
return true;
}
+@Override
protected void layout(Composite composite, boolean flushCache) {
SashForm sashForm = (SashForm)composite;
Rectangle area = sashForm.getClientArea();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
index fc7a513a0f..473321fd15 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
@@ -561,6 +561,7 @@ public void setExpandVertical(boolean expand) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setLayout (Layout layout) {
checkWidget();
return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledCompositeLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledCompositeLayout.java
index c99710d11f..cd9d1749a2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledCompositeLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledCompositeLayout.java
@@ -25,6 +25,7 @@ class ScrolledCompositeLayout extends Layout {
static final int DEFAULT_WIDTH = 64;
static final int DEFAULT_HEIGHT = 64;
+@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
ScrolledComposite sc = (ScrolledComposite)composite;
Point size = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
@@ -41,10 +42,12 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
return size;
}
+@Override
protected boolean flushCache(Control control) {
return true;
}
+@Override
protected void layout(Composite composite, boolean flushCache) {
if (inLayout) return;
ScrolledComposite sc = (ScrolledComposite)composite;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
index 275d2602ab..62b2e4ace1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
@@ -89,6 +89,7 @@ public class StackLayout extends Layout {
*/
public Control topControl;
+@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
Control children[] = composite.getChildren();
int maxWidth = 0;
@@ -105,10 +106,12 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
return new Point(width, height);
}
+@Override
protected boolean flushCache(Control control) {
return true;
}
+@Override
protected void layout(Composite composite, boolean flushCache) {
Control children[] = composite.getChildren();
Rectangle rect = composite.getClientArea();
@@ -135,6 +138,7 @@ String getName () {
*
* @return a string representation of the layout
*/
+@Override
public String toString () {
String string = getName ()+" {";
if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java
index 492f27a898..5e69916573 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java
@@ -104,6 +104,7 @@ public StyleRange(int start, int length, Color foreground, Color background, int
*
* @see #hashCode()
*/
+@Override
public boolean equals(Object object) {
if (object == this) return true;
if (object instanceof StyleRange) {
@@ -125,6 +126,7 @@ public boolean equals(Object object) {
*
* @see #equals(Object)
*/
+@Override
public int hashCode() {
return super.hashCode() ^ fontStyle;
}
@@ -169,6 +171,7 @@ public boolean similarTo(StyleRange style) {
*
* @return a shallow copy of this StyleRange
*/
+@Override
public Object clone() {
try {
return super.clone();
@@ -183,6 +186,7 @@ public Object clone() {
*
* @return a string representation of the StyleRange
*/
+@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("StyleRange {");
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 6f7e6a422b..ad60b1ce8b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -698,6 +698,7 @@ public class StyledText extends Canvas {
* <b>NOTE:</b> <code>toString()</code> does not return a valid RTF string until
* <code>close()</code> has been called.
*/
+ @Override
public void close() {
if (!isClosed()) {
writeHeader();
@@ -866,6 +867,7 @@ public class StyledText extends Canvas {
* <li>ERROR_IO when the writer is closed.</li>
* </ul>
*/
+ @Override
public void writeLine(String line, int lineOffset) {
if (isClosed()) {
SWT.error(SWT.ERROR_IO);
@@ -903,6 +905,7 @@ public class StyledText extends Canvas {
* <li>ERROR_IO when the writer is closed.</li>
* </ul>
*/
+ @Override
public void writeLineDelimiter(String lineDelimiter) {
if (isClosed()) {
SWT.error(SWT.ERROR_IO);
@@ -1104,6 +1107,7 @@ public class StyledText extends Canvas {
*
* @return the string
*/
+ @Override
public String toString() {
return buffer.toString();
}
@@ -1704,6 +1708,7 @@ void clearSelection(boolean sendEvent) {
}
}
}
+@Override
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int lineCount = (getStyle() & SWT.SINGLE) != 0 ? 1 : content.getLineCount();
@@ -3418,6 +3423,7 @@ void doWordPrevious() {
void endAutoScroll() {
autoScrollDirection = SWT.NULL;
}
+@Override
public Color getBackground() {
checkWidget();
if (background == null) {
@@ -3713,6 +3719,7 @@ public StyledTextContent getContent() {
checkWidget();
return content;
}
+@Override
public boolean getDragDetect () {
checkWidget ();
return dragDetect;
@@ -3744,6 +3751,7 @@ public boolean getEditable() {
checkWidget();
return editable;
}
+@Override
public Color getForeground() {
checkWidget();
if (foreground == null) {
@@ -4478,6 +4486,7 @@ int getOffsetAtPoint(int x, int y, int[] trailing, boolean inTextOnly) {
*
* @since 2.1.2
*/
+@Override
public int getOrientation () {
return super.getOrientation ();
}
@@ -6338,6 +6347,7 @@ void handleVerticalScroll(Event event) {
void initializeAccessible() {
final Accessible accessible = getAccessible();
accessible.addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName (AccessibleEvent e) {
String name = null;
String text = getAssociatedLabel ();
@@ -6346,9 +6356,11 @@ void initializeAccessible() {
}
e.result = name;
}
+ @Override
public void getHelp(AccessibleEvent e) {
e.result = getToolTipText();
}
+ @Override
public void getKeyboardShortcut(AccessibleEvent e) {
String shortcut = null;
String text = getAssociatedLabel ();
@@ -6362,18 +6374,22 @@ void initializeAccessible() {
}
});
accessible.addAccessibleTextListener(new AccessibleTextExtendedAdapter() {
+ @Override
public void getCaretOffset(AccessibleTextEvent e) {
e.offset = StyledText.this.getCaretOffset();
}
+ @Override
public void setCaretOffset(AccessibleTextEvent e) {
StyledText.this.setCaretOffset(e.offset);
e.result = ACC.OK;
}
+ @Override
public void getSelectionRange(AccessibleTextEvent e) {
Point selection = StyledText.this.getSelectionRange();
e.offset = selection.x;
e.length = selection.y;
}
+ @Override
public void addSelection(AccessibleTextEvent e) {
StyledText st = StyledText.this;
Point point = st.getSelection();
@@ -6384,6 +6400,7 @@ void initializeAccessible() {
e.result = ACC.OK;
}
}
+ @Override
public void getSelection(AccessibleTextEvent e) {
StyledText st = StyledText.this;
if (st.blockSelection && st.blockXLocation != -1) {
@@ -6408,6 +6425,7 @@ void initializeAccessible() {
}
}
}
+ @Override
public void getSelectionCount(AccessibleTextEvent e) {
StyledText st = StyledText.this;
if (st.blockSelection && st.blockXLocation != -1) {
@@ -6418,6 +6436,7 @@ void initializeAccessible() {
e.count = point.x == point.y ? 0 : 1;
}
}
+ @Override
public void removeSelection(AccessibleTextEvent e) {
StyledText st = StyledText.this;
if (e.index == 0) {
@@ -6429,6 +6448,7 @@ void initializeAccessible() {
e.result = ACC.OK;
}
}
+ @Override
public void setSelection(AccessibleTextEvent e) {
if (e.index != 0) return;
StyledText st = StyledText.this;
@@ -6439,9 +6459,11 @@ void initializeAccessible() {
st.setSelection(e.start, end);
e.result = ACC.OK;
}
+ @Override
public void getCharacterCount(AccessibleTextEvent e) {
e.count = StyledText.this.getCharCount();
}
+ @Override
public void getOffsetAtPoint(AccessibleTextEvent e) {
StyledText st = StyledText.this;
Point point = new Point (e.x, e.y);
@@ -6449,6 +6471,7 @@ void initializeAccessible() {
point = display.map(null, st, point);
e.offset = st.getOffsetAtPoint(point.x, point.y, null, true);
}
+ @Override
public void getTextBounds(AccessibleTextEvent e) {
StyledText st = StyledText.this;
int start = e.start;
@@ -6531,6 +6554,7 @@ void initializeAccessible() {
}
return ranges;
}
+ @Override
public void getRanges(AccessibleTextEvent e) {
StyledText st = StyledText.this;
Point point = new Point (e.x, e.y);
@@ -6542,6 +6566,7 @@ void initializeAccessible() {
e.end = e.ranges[e.ranges.length - 1];
}
}
+ @Override
public void getText(AccessibleTextEvent e) {
StyledText st = StyledText.this;
int start = e.start;
@@ -6635,6 +6660,7 @@ void initializeAccessible() {
e.count = count;
e.result = st.content.getTextRange(start, end - start);
}
+ @Override
public void getVisibleRanges(AccessibleTextEvent e) {
e.ranges = getRanges(leftMargin, topMargin, clientAreaWidth - rightMargin, clientAreaHeight - bottomMargin);
if (e.ranges.length > 0) {
@@ -6642,6 +6668,7 @@ void initializeAccessible() {
e.end = e.ranges[e.ranges.length - 1];
}
}
+ @Override
public void scrollText(AccessibleTextEvent e) {
StyledText st = StyledText.this;
int topPixel = getTopPixel(), horizontalPixel = st.getHorizontalPixel();
@@ -6716,6 +6743,7 @@ void initializeAccessible() {
}
});
accessible.addAccessibleAttributeListener(new AccessibleAttributeAdapter() {
+ @Override
public void getAttributes(AccessibleAttributeEvent e) {
StyledText st = StyledText.this;
e.leftMargin = st.getLeftMargin();
@@ -6727,6 +6755,7 @@ void initializeAccessible() {
e.alignment = st.getAlignment();
e.indent = st.getIndent();
}
+ @Override
public void getTextAttributes(AccessibleTextAttributeEvent e) {
StyledText st = StyledText.this;
int contentLength = st.getCharCount();
@@ -6802,9 +6831,11 @@ void initializeAccessible() {
}
});
accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
+ @Override
public void getRole(AccessibleControlEvent e) {
e.detail = ACC.ROLE_TEXT;
}
+ @Override
public void getState(AccessibleControlEvent e) {
int state = 0;
if (isEnabled()) state |= ACC.STATE_FOCUSABLE;
@@ -6815,6 +6846,7 @@ void initializeAccessible() {
else state |= ACC.STATE_MULTILINE;
e.detail = state;
}
+ @Override
public void getValue(AccessibleControlEvent e) {
e.result = StyledText.this.getText();
}
@@ -7372,6 +7404,7 @@ public Runnable print(Printer printer, StyledTextPrintOptions options) {
*
* @see Control#update()
*/
+@Override
public void redraw() {
super.redraw();
int itemCount = getPartialBottomIndex() - topIndex + 1;
@@ -7410,6 +7443,7 @@ public void redraw() {
*
* @see Control#update()
*/
+@Override
public void redraw(int x, int y, int width, int height, boolean all) {
super.redraw(x, y, width, height, all);
if (height > 0) {
@@ -7867,6 +7901,7 @@ void resetSelection() {
sendAccessibleTextCaretMoved();
}
+@Override
public void scroll(int destX, int destY, int x, int y, int width, int height, boolean all) {
super.scroll(destX, destY, x, y, width, height, false);
if (all) {
@@ -8236,6 +8271,7 @@ public void setAlwaysShowScrollBars(boolean show) {
/**
* @see Control#setBackground(Color)
*/
+@Override
public void setBackground(Color color) {
checkWidget();
background = color;
@@ -8390,6 +8426,7 @@ void setBlockSelectionOffset (int anchorOffset, int offset, boolean sendEvent) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setCaret(Caret caret) {
checkWidget ();
super.setCaret(caret);
@@ -8598,6 +8635,7 @@ public void setContent(StyledTextContent newContent) {
*
* @see Control#setCursor(Cursor)
*/
+@Override
public void setCursor (Cursor cursor) {
checkWidget();
if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -8625,6 +8663,7 @@ public void setDoubleClickEnabled(boolean enable) {
checkWidget();
doubleClickEnabled = enable;
}
+@Override
public void setDragDetect (boolean dragDetect) {
checkWidget ();
this.dragDetect = dragDetect;
@@ -8657,6 +8696,7 @@ public void setEditable(boolean editable) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setFont(Font font) {
checkWidget();
int oldLineHeight = renderer.getLineHeight();
@@ -8678,6 +8718,7 @@ public void setFont(Font font) {
setCaretLocation();
super.redraw();
}
+@Override
public void setForeground(Color color) {
checkWidget();
foreground = color;
@@ -9323,6 +9364,7 @@ void setMouseWordSelectionAnchor() {
*
* @since 2.1.2
*/
+@Override
public void setOrientation(int orientation) {
int oldOrientation = getOrientation();
super.setOrientation(orientation);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextDropTargetEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextDropTargetEffect.java
index ba6c2ff230..d05b99f2b4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextDropTargetEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextDropTargetEffect.java
@@ -91,6 +91,7 @@ public class StyledTextDropTargetEffect extends DropTargetEffect {
* @see DropTargetAdapter
* @see DropTargetEvent
*/
+ @Override
public void dragEnter(DropTargetEvent event) {
currentOffset = -1;
scrollBeginTime = 0;
@@ -114,6 +115,7 @@ public class StyledTextDropTargetEffect extends DropTargetEffect {
* @see DropTargetAdapter
* @see DropTargetEvent
*/
+ @Override
public void dragLeave(DropTargetEvent event) {
StyledText text = (StyledText) getControl();
if (currentOffset != -1) {
@@ -141,6 +143,7 @@ public class StyledTextDropTargetEffect extends DropTargetEffect {
* @see DND#FEEDBACK_SELECT
* @see DND#FEEDBACK_SCROLL
*/
+ @Override
public void dragOver(DropTargetEvent event) {
int effect = event.feedback;
StyledText text = (StyledText) getControl();
@@ -232,6 +235,7 @@ public class StyledTextDropTargetEffect extends DropTargetEffect {
* @see DropTargetAdapter
* @see DropTargetEvent
*/
+ @Override
public void dropAccept(DropTargetEvent event) {
if (currentOffset != -1) {
StyledText text = (StyledText) getControl();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java
index c7e52c5085..fffd1963cd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java
@@ -25,6 +25,7 @@ StyledTextListener(SWTEventListener listener) {
*
* @param e the event to handle
*/
+@Override
public void handleEvent(Event e) {
switch (e.type) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
index 18710d7e91..09d21f80bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
@@ -164,11 +164,13 @@ public TableCursor(Table parent, int style) {
}
getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
+ @Override
public void getRole(AccessibleControlEvent e) {
e.detail = ACC.ROLE_TABLECELL;
}
});
getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
if (row == null) return;
int columnIndex = column == null ? 0 : table.indexOf(column);
@@ -479,6 +481,7 @@ void setRowColumn(TableItem row, TableColumn column, boolean notify) {
getAccessible().setFocus(ACC.CHILDID_SELF);
}
+@Override
public void setVisible(boolean visible) {
checkWidget();
if (visible) _resize();
@@ -540,6 +543,7 @@ public int getColumn() {
*
* @return the receiver's background color
*/
+@Override
public Color getBackground() {
checkWidget();
if (background == null) {
@@ -552,6 +556,7 @@ public Color getBackground() {
*
* @return the receiver's foreground color
*/
+@Override
public Color getForeground() {
checkWidget();
if (foreground == null) {
@@ -591,6 +596,7 @@ public TableItem getRow() {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setBackground (Color color) {
background = color;
super.setBackground(getBackground());
@@ -613,6 +619,7 @@ public void setBackground (Color color) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setForeground (Color color) {
foreground = color;
super.setForeground(getForeground());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java
index 3e9a69059b..b2889fad45 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableEditor.java
@@ -107,6 +107,7 @@ public TableEditor (Table table) {
// To be consistent with older versions of SWT, grabVertical defaults to true
grabVertical = true;
}
+@Override
Rectangle computeBounds () {
if (item == null || column == -1 || item.isDisposed()) return new Rectangle(0, 0, 0, 0);
Rectangle cell = item.getBounds(column);
@@ -153,6 +154,7 @@ Rectangle computeBounds () {
* Removes all associations between the TableEditor and the cell in the table. The
* Table and the editor Control are <b>not</b> disposed.
*/
+@Override
public void dispose () {
if (table != null && !table.isDisposed()) {
if (this.column > -1 && this.column < table.getColumnCount()){
@@ -233,6 +235,7 @@ public void setItem (TableItem item) {
this.item = item;
resize();
}
+@Override
public void setEditor (Control editor) {
super.setEditor(editor);
resize();
@@ -252,6 +255,7 @@ public void setEditor (Control editor, TableItem item, int column) {
setColumn(column);
setEditor(editor);
}
+@Override
public void layout () {
if (table == null || table.isDisposed()) return;
if (item == null || item.isDisposed()) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
index 9259ceb3cc..598027d53d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTree.java
@@ -212,10 +212,12 @@ private static int checkStyle (int style) {
style = style & mask;
return style;
}
+@Override
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
return table.computeSize (wHint, hHint, changed);
}
+@Override
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
return table.computeTrim(x, y, width, height);
@@ -249,6 +251,7 @@ void expandItem (TableTreeItem item) {
notifyListeners(SWT.Expand, event);
}
}
+@Override
public Color getBackground () {
// This method must be overridden otherwise, in a TableTree in which the first
// item has no sub items, a grey (Widget background colour) square will appear in
@@ -258,12 +261,15 @@ public Color getBackground () {
// the TableTree adapting to changes in the System color settings.
return table.getBackground();
}
+@Override
public Rectangle getClientArea () {
return table.getClientArea();
}
+@Override
public Color getForeground () {
return table.getForeground();
}
+@Override
public Font getFont () {
return table.getFont();
}
@@ -348,6 +354,7 @@ public int getSelectionCount () {
return table.getSelectionCount();
}
+@Override
public int getStyle () {
checkWidget();
return table.getStyle();
@@ -701,6 +708,7 @@ public void selectAll () {
checkWidget();
table.selectAll();
}
+@Override
public void setBackground (Color color) {
super.setBackground(color);
table.setBackground(color);
@@ -712,18 +720,22 @@ public void setBackground (Color color) {
gc.dispose();
}
}
+@Override
public void setEnabled (boolean enabled) {
super.setEnabled(enabled);
table.setEnabled(enabled);
}
+@Override
public void setFont (Font font) {
super.setFont(font);
table.setFont(font);
}
+@Override
public void setForeground (Color color) {
super.setForeground(color);
table.setForeground(color);
}
+@Override
public void setMenu (Menu menu) {
super.setMenu(menu);
table.setMenu(menu);
@@ -766,6 +778,7 @@ public void setSelection (TableTreeItem[] items) {
}
table.setSelection(tableItems);
}
+@Override
public void setToolTipText (String string) {
super.setToolTipText(string);
table.setToolTipText(string);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeEditor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeEditor.java
index ea33a6921c..1613a0fd6c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeEditor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeEditor.java
@@ -130,6 +130,7 @@ public TableTreeEditor (TableTree tableTree) {
// To be consistent with older versions of SWT, grabVertical defaults to true
grabVertical = true;
}
+@Override
Rectangle computeBounds () {
if (item == null || column == -1 || item.isDisposed() || item.tableItem == null) return new Rectangle(0, 0, 0, 0);
Rectangle cell = item.getBounds(column);
@@ -170,6 +171,7 @@ Rectangle computeBounds () {
* Removes all associations between the TableTreeEditor and the cell in the table tree. The
* TableTree and the editor Control are <b>not</b> disposed.
*/
+@Override
public void dispose () {
if (tableTree != null && !tableTree.isDisposed()) {
Table table = tableTree.getTable();
@@ -247,6 +249,7 @@ public void setEditor (Control editor, TableTreeItem item, int column) {
setColumn(column);
setEditor(editor);
}
+@Override
public void layout () {
if (tableTree == null || tableTree.isDisposed()) return;
if (item == null || item.isDisposed()) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeItem.java
index 8abde81911..1fb1bc188d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableTreeItem.java
@@ -357,6 +357,7 @@ public Color getForeground () {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public Image getImage () {
checkWidget();
return getImage(0);
@@ -468,6 +469,7 @@ public TableTreeItem getParentItem () {
//checkWidget();
return parentItem;
}
+@Override
public String getText () {
checkWidget();
return getText(0);
@@ -549,6 +551,7 @@ int visibleChildrenCount () {
return count;
}
+@Override
public void dispose () {
if (isDisposed()) return;
for (int i = items.length - 1; i >= 0; i--) {
@@ -784,6 +787,7 @@ public void setImage (int index, Image image) {
* <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
* </ul>
*/
+@Override
public void setImage (Image image) {
setImage(0, image);
}
@@ -820,6 +824,7 @@ public void setText(int index, String text) {
texts[index] = text;
if (tableItem != null) tableItem.setText(index, text);
}
+@Override
public void setText (String string) {
setText(0, string);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java
index aacccbe55d..9560fae0ec 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeCursor.java
@@ -236,11 +236,13 @@ public TreeCursor(Tree parent, int style) {
}
getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
+ @Override
public void getRole(AccessibleControlEvent e) {
e.detail = ACC.ROLE_TABLECELL;
}
});
getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
if (row == null) return;
int columnIndex = column == null ? 0 : tree.indexOf(column);
@@ -375,6 +377,7 @@ TreeItem findItem(TreeItem[] items, Point pt) {
*
* @return the receiver's background color
*/
+@Override
public Color getBackground() {
checkWidget();
if (background == null) {
@@ -403,6 +406,7 @@ public int getColumn() {
*
* @return the receiver's foreground color
*/
+@Override
public Color getForeground() {
checkWidget();
if (foreground == null) {
@@ -741,6 +745,7 @@ void _resize() {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setBackground (Color color) {
background = color;
super.setBackground(getBackground());
@@ -763,6 +768,7 @@ public void setBackground (Color color) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setForeground (Color color) {
foreground = color;
super.setForeground(getForeground());
@@ -857,6 +863,7 @@ public void setSelection(TreeItem row, int column) {
setRowColumn(row, col, false);
}
+@Override
public void setVisible(boolean visible) {
checkWidget();
if (visible) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java
index abaf4d0d7c..66b14d7baa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TreeEditor.java
@@ -129,6 +129,7 @@ public TreeEditor (Tree tree) {
grabVertical = true;
}
+@Override
Rectangle computeBounds () {
if (item == null || column == -1 || item.isDisposed()) return new Rectangle(0, 0, 0, 0);
Rectangle cell = item.getBounds(column);
@@ -180,6 +181,7 @@ Rectangle computeBounds () {
* Removes all associations between the TreeEditor and the row in the tree. The
* tree and the editor Control are <b>not</b> disposed.
*/
+@Override
public void dispose () {
if (tree != null && !tree.isDisposed()) {
if (this.column > -1 && this.column < tree.getColumnCount()){
@@ -289,6 +291,7 @@ public void setEditor (Control editor, TreeItem item, int column) {
setColumn(column);
setEditor(editor);
}
+@Override
public void setEditor (Control editor) {
super.setEditor(editor);
resize();
@@ -308,6 +311,7 @@ public void setEditor (Control editor, TreeItem item) {
setEditor(editor);
}
+@Override
public void layout () {
if (tree == null || tree.isDisposed()) return;
if (item == null || item.isDisposed()) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
index c601ac0ef8..20e9d6f63a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
@@ -185,6 +185,7 @@ static int checkStyle (int style) {
// }
//}
+@Override
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
int trimX = x - borderLeft - highlight;
@@ -193,6 +194,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
int trimHeight = height + borderTop + borderBottom + 2*highlight;
return new Rectangle(trimX, trimY, trimWidth, trimHeight);
}
+@Override
public Rectangle getClientArea() {
checkWidget();
Rectangle clientArea = super.getClientArea();
@@ -342,6 +344,7 @@ public void setContent(Control content) {
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
+@Override
public void setLayout (Layout layout) {
checkWidget();
return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
index 20522f5a45..261fdf5195 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
@@ -21,6 +21,7 @@ import org.eclipse.swt.widgets.*;
*/
class ViewFormLayout extends Layout {
+@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
ViewForm form = (ViewForm)composite;
Control left = form.topLeft;
@@ -97,12 +98,14 @@ int computeTrim(Control c) {
return c.getBorderWidth () * 2;
}
+@Override
protected boolean flushCache(Control control) {
Object data = control.getLayoutData();
if (data != null && data instanceof CLayoutData) ((CLayoutData)data).flushCache();
return true;
}
+@Override
protected void layout(Composite composite, boolean flushCache) {
ViewForm form = (ViewForm)composite;
Control left = form.topLeft;

Back to the top