Skip to content

Commit 8381585

Browse files
author
Thomas Singer
committed
ControlRenderer.computeDefaultSize: push to implementations
because some implementations will need size hint arguments
1 parent d4f2aa0 commit 8381585

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/ButtonRenderer.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
public abstract class ButtonRenderer extends ControlRenderer<Button> {
2020

21+
public abstract Point computeDefaultSize();
22+
2123
private Image disabledImage;
2224
private boolean pressed;
2325
private boolean hover;

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/ControlRenderer.java

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
public abstract class ControlRenderer <C extends Control> {
2222

23-
public abstract Point computeDefaultSize();
24-
2523
protected abstract void paint(GC gc, int width, int height);
2624

2725
protected final C control;

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/LabelRenderer.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
public abstract class LabelRenderer extends ControlRenderer<Label> {
2020

21+
public abstract Point computeDefaultSize();
22+
2123
/** a string inserted in the middle of text that has been shortened */
2224
private static final String ELLIPSIS = "..."; //$NON-NLS-1$ // could use
2325
// the ellipsis glyph on

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/ScaleRenderer.java

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
* Interface for all scale renderer
2020
*/
2121
public abstract class ScaleRenderer extends ControlRenderer<Scale> {
22+
23+
public abstract Point computeDefaultSize();
24+
2225
/**
2326
* Maps the point to a scale value
2427
*

0 commit comments

Comments
 (0)