Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: f1e0f0d0c25ee744d94e55ca93a0b29cdcf12618 (plain) (blame)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*******************************************************************************
 * Copyright (c) 2000, 2006 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.*;
import org.eclipse.swt.widgets.*;

/**
 * This class is the one used for creating a graphic. Override the paint()
 * method to create the drawing. To create an animated graphic, use the
 * AnimatedGraphicsTab class.
 */
public abstract class GraphicsTab {

GraphicsExample example;

public GraphicsTab(GraphicsExample example) {
	this.example = example;
}

/**
 * Creates the widgets used to control the drawing.
 */
public void createControlPanel(Composite parent) {
}

/**
 * Disposes resources created by the receiver.
 */
public void dispose() {
}

/**
 * Answer the receiver's name.
 */
public abstract String getText();

/**
 * Answer the receiver's category.
 */
public String getCategory() {
	return GraphicsExample.getResourceString("Misc"); //$NON-NLS-1$
}

/**
 *  Answer the receiver's description.
 * */
public String getDescription() {
	return "";
}

/**
 *  Answer whether the receiver's drawing should be double bufferer.
 */
public boolean getDoubleBuffered() {
	return false;
}

/**
 * Paint the receiver into the specified GC.
 */
public void paint(GC gc, int width, int height) {
}

}

Back to the top