-
Notifications
You must be signed in to change notification settings - Fork 48
/
SeparatorBorder.java
36 lines (31 loc) · 1.15 KB
/
SeparatorBorder.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.gef.internal.ui.palette.editparts;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.Rectangle;
final class SeparatorBorder extends MarginBorder {
SeparatorBorder(int t, int l, int b, int r) {
super(t, l, b, r);
}
@Override
public void paint(IFigure f, Graphics g, Insets i) {
Rectangle r = getPaintRectangle(f, i);
r.height--;
g.setForegroundColor(ColorConstants.buttonDarker);
g.drawLine(r.x, r.bottom(), r.right(), r.bottom());
}
}