aboutsummaryrefslogtreecommitdiffstats
path: root/gl4java/drawable/GLDrawable.java
blob: a0818c0e1260ae37237ee2934121b43a269c22c9 (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
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
package gl4java.drawable;

import java.awt.event.*;
import java.util.EventListener;

import gl4java.*;

/** Abstracts common functionality among the OpenGL components such as
    GLCanvas and GLJPanel. The GLDrawable/GLEventListener interfaces
    allow client code to draw using OpenGL without subclassing. */

public interface GLDrawable 
{
    /** Add a GLEventListener to this drawable. If multiple listeners
        are added to a given drawable, they are notified of events in an
        arbitrary order. */
    public void addGLEventListener(GLEventListener listener);

    /** Remove a GLEventListener from this drawable. */
    public void removeGLEventListener(GLEventListener listener);

    /** Gets the GL functions used by this drawable. */
    public GLFunc getGL();

    /** Gets the GLU functions used by this drawable. */
    public GLUFunc getGLU();

    /**
     * Used to return the created GLContext
     */
    public GLContext getGLContext();

    /**
     * the components listener's should be implemented also !
     * since JDK 1.1
     */
    public void addComponentListener(ComponentListener l);
    public void removeComponentListener(ComponentListener l);
    public void addFocusListener(FocusListener l);
    public void addKeyListener(KeyListener l);
    public void removeFocusListener(FocusListener l);
    public void addMouseListener(MouseListener l);
    public void removeMouseListener(MouseListener l);
    public void addMouseMotionListener(MouseMotionListener l);
    public void removeMouseMotionListener(MouseMotionListener l);
    
    /**
     * JDK 1.2 the components listener's are left, 
     * because of JDK 1.1 compatibility
     *
    public void addInputMethodListener(InputMethodListener l);
    public void removeInputMethodListener(InputMethodListener l);
    */

    /**
     * JDK 1.3 the components listener's are left, 
     * because of JDK 1.1 compatibility
     * 
    public void addHierarchyListener(HierarchyListener l);
    public void removeHierarchyListener(HierarchyListener l);
    public void addHierarchyBoundsListener(HierarchyBoundsListener l);
    public void removeHierarchyBoundsListener(HierarchyBoundsListener l);
    */


    /**
     * JDK 1.3 the listener's methods are left, 
     * because of JDK 1.1 compatibility
     * since JDK 1.3, e.g. implemented within GLCanvas
     *
    public EventListener[] getListeners(Class listenerType);
    */
}