Example usage for java.awt Canvas subclass-usage

List of usage examples for java.awt Canvas subclass-usage

Introduction

In this page you can find the example usage for java.awt Canvas subclass-usage.

Usage

From source file Draw2DRotate.java

class MyCanvas extends Canvas {
    public void paint(Graphics graphics) {
        Graphics2D g = (Graphics2D) graphics;
        AffineTransform transform = AffineTransform.getRotateInstance(Math.PI / 16.0d);
        g.setTransform(transform);
        Line2D.Double shape = new Line2D.Double(0.0, 0.0, 300.0, 300.0);

From source file org.evors.rs.ui.sandpit.SandPitCanvas.java

/**
 * Renders the simulation.
 *
 * @author Miles
 */
public abstract class SandPitCanvas extends Canvas {

From source file PrintSampleApp.java

class MyCanvas extends Canvas {
    public void paint(Graphics g) {
        Dimension size = getSize();
        int width = size.width;
        int height = size.height;
        int x1 = (int) (width * 0.1);

From source file KeyTextTester.java

class KeyTextComponent extends Canvas {
    private ActionListener actionListenerList = null;

    public KeyTextComponent() {
        setBackground(Color.cyan);
        KeyListener internalKeyListener = new KeyAdapter() {

From source file KeyTextTester2.java

class KeyTextComponent2 extends Canvas {
    private EventListenerList actionListenerList = new EventListenerList();

    public KeyTextComponent2() {
        setBackground(Color.cyan);
        KeyListener internalKeyListener = new KeyAdapter() {

From source file edu.umn.cs.spatialHadoop.visualization.FrequencyMap.java

/**
 * A frequency map that can be used to visualize data as heat maps
 * @author Ahmed Eldawy
 *
 */
public class FrequencyMap extends Canvas {

From source file ShapeMover.java

class MyCanvas extends Canvas implements MouseListener, MouseMotionListener {
    Rectangle rect = new Rectangle(0, 0, 100, 50);

    Graphics2D g2;

    int preX, preY;

From source file GridsCanvas.java

/**
 * Program to draw grids.
 * 
 * @author Ian Darwin, http://www.darwinsys.com/
 */
class GridsCanvas extends Canvas {

From source file MouseDragClip.java

/**
 * MouseDragClip -- implement simple mouse drag in a window. Speed up by using
 * clipping regions.
 * <p>
 * This version "works" for very simple cases (only drag down and to the right,
 * never move up or back :-) ).

From source file SimpleBufferedImageDemo.java

class DisplayCanvas extends Canvas {
    boolean display = false;

    boolean clear = false;

    boolean buffered = false;