Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void main(String[] args) {
layout = new TextLayout(display);
layout.setFont(font);
layout.setText("GEF! @ This is a test for hit testing \ufeec\ufeeb\ufeed bidi"); ////$NON-NLS-1$
// layout.setStyle(new TextStyle(null, new Color(null, 100, 200, 150), null),
// layout.setStyle(new TextStyle(null, new Color(100, 200, 150), null),
// 10, 13);

int width = 290;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public void widgetDefaultSelected(SelectionEvent e) {
@SuppressWarnings("static-method")
protected Image createImageFromColor(RGB rgb, int size) {
Image image;
Color color = new Color(Display.getDefault(), rgb);
Color color = new Color(rgb);
image = new Image(Display.getDefault(), size, size);
GC gc = new GC(image);
gc.setBackground(color);
Expand Down Expand Up @@ -353,7 +353,7 @@ public void widgetSelected(SelectionEvent e) {
return;
}
Color old = viewer.getCloud().getBackground();
Color c = new Color(Display.getDefault(), color);
Color c = new Color(color);
viewer.getCloud().setBackground(c);
old.dispose();
viewer.getCloud().redrawTextLayerImage();
Expand Down Expand Up @@ -381,7 +381,7 @@ public void widgetSelected(SelectionEvent e) {
return;
}
Color old = viewer.getCloud().getSelectionColor();
Color c = new Color(Display.getDefault(), color);
Color c = new Color(color);
viewer.getCloud().setSelectionColor(c);
old.dispose();
viewer.getCloud().redrawTextLayerImage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ public TagCloud(Composite parent, int style, int accuracy, int maxSize) {
this.accuracy = accuracy;
this.maxSize = maxSize;
cloudArea = new Rectangle(0, 0, maxSize, maxSize);
highlightColor = new Color(getDisplay(), Display.getDefault().getSystemColor(SWT.COLOR_RED).getRGB());
highlightColor = new Color(Display.getDefault().getSystemColor(SWT.COLOR_RED).getRGB());
gc = new GC(this);
layouter = new DefaultLayouter(accuracy, accuracy);
setBackground(new Color(getDisplay(), Display.getDefault().getSystemColor(SWT.COLOR_BLACK).getRGB()));
setBackground(new Color(Display.getDefault().getSystemColor(SWT.COLOR_BLACK).getRGB()));
initListeners();
textLayerImage = new Image(getDisplay(), 100, 100);
zoomFit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public void paint(Graphics graphics) {
int blue = (int) (baseColor.getBlue() * 0.8 + 0.5);
int red = (int) (baseColor.getRed() * 0.8 + 0.5);
int green = (int) (baseColor.getGreen() * 0.8 + 0.5);
Color darkerBackground = new Color(Display.getCurrent(), new RGB(red, green, blue));
Color darkerBackground = new Color(new RGB(red, green, blue));
graphics.setForegroundColor(darkerBackground);
graphics.setBackgroundColor(getBackgroundColor());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void paint(Graphics graphics) {
green = (int) (green - (green * 0.20));
green = green > 0 ? green : 0;

Color lightenColor = new Color(Display.getCurrent(), new RGB(red, green, blue));
Color lightenColor = new Color(new RGB(red, green, blue));
graphics.setForegroundColor(lightenColor);
graphics.setBackgroundColor(getBackgroundColor());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void setColors(List<RGB> newColors) {
colorList.clear();
colors.clear();
for (RGB color : newColors) {
Color c = new Color(Display.getDefault(), color);
Color c = new Color(color);
colorList.add(c);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class TestLabelProvider extends BaseLabelProvider implements ICloudLabelP

public static final double WEIGHT = 0.987D;
public static final float ANGLE = 12.34F;
public static Color COLOR = new Color(Display.getDefault(), new RGB(100, 100, 100));
public static Color COLOR = new Color(new RGB(100, 100, 100));
public static FontData[] FONT_DATA = Display.getDefault().getShells()[0].getFont().getFontData();

@Override
Expand Down
Loading