summaryrefslogtreecommitdiffstats
path: root/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineTab.java
blob: 619179e54cb5ea53788dc5070b345880ba64875e (plain)
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
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.examples.graphics;

import org.eclipse.swt.graphics.GC;

public class LineTab extends GraphicsTab {
	
public LineTab(GraphicsExample example) {
	super(example);
}

public String getText() {
	return GraphicsExample.getResourceString("Line"); //$NON-NLS-1$
}

public void paint(GC gc, int width, int height) {
	gc.drawLine(0, 0, width, height);
	gc.drawLine(width, 0, 0, height);
}
}