DirectX Media for Animation Java Reference |
![]() Previous |
![]() Classes |
![]() Index |
![]() Next |
public class DXMCanvas extends java.awt.Canvas{ // Constructor public DXMCanvas(); // Methods from java.awt.Canvas public void addNotify(); public boolean handleEvent(Event e); public synchronized void hide(); public void paint(Graphics g); public void removeNotify(); public synchronized void reshape(int x, int y, int width, int height); public synchronized void show(); public void update(Graphics g); //Methods from Runnable Interface public void run(); // Methods from Viewer Interface public double getCurrentTime(); public double getCurrentTickTime(); public Preferences getPreferences(); public ErrorAndWarningReceiver registerErrorAndWarningReceiver(ErrorAndWarningReceiver w); public void setPreferences(Preferences p); public void startModel(); public void stopModel(); public void tick(); public synchronized void tick (double timeToUse); // Methods public synchronized void addModel(); public Model getModel(); public synchronized void hideModel(); public synchronized void removeModel(); public void setModel(Model); public synchronized void showModel(); }
Creates an Java canvas for creating and displaying Direct Animation behaviors. By default, DXMCanvas provides its own frameloop which means the applications need not provide one explicitly. It is possible, of course, to do so by overriding the default behavior.
public DXMCanvas();Creates an DXMCanvas object.
public void addNotify();Overrides the Java implementation and calls the superclass. This method should not be overridden.
public boolean handleEvent(Event e);Overrides the Java implementation and calls the superclass. For more information, see a Java reference.
public synchronized void hide();Overrides the Java implementation and calls the superclass. This method should not be overridden. For more information, see a Java reference.
public void paint(Graphics g);Overrides the Java implementation and calls the superclass. For more information, see a Java reference.
public void removeNotify();Overrides the Java implementation and calls the superclass. This method should not be overridden.
public synchronized void reshape(int x, int y, int width, int height);Overrides the Java implementation and calls the superclass. For more information, see a Java reference.
public synchronized void show();Overrides the Java implementation and calls the superclass. This method should not be overridden. For more information, see a Java reference.
public void update(Graphics g);Overrides the Java implementation and calls the superclass. For more information, see a Java reference.
Parameter Description g The object to be updated.
public void run();Implements the Runnable interface to create a background thread for ticking the model. For more information about Runnable, consult a Java reference.
public double getCurrentTime();See getCurrentTime in the Viewer Interface.
public void getCurrentTickTime();See getCurrentTickTime in the Viewer Interface.
public Preferences getPreferences();See getPreferences in the Viewer Interface.
public ErrorAndWarningReceiver registerErrorAndWarningReceiver(ErrorAndWarningReceiver w);See registerErrorAndWarningReceiver in the Viewer Interface section.
public void setPreferences(Preferences p);See setPreferences in the Viewer Interface section.
public void startModel();See startModel in the Viewer Interface section.
public void stopModel();See stopModel in the Viewer Interface section.
public void tick();See tick in the Viewer Interface section.
public synchronized void tick (double timeToUse);See tick in the Viewer Interface section.
public synchronized void addModel();Creates a background thread to tick the model and calls startModel. To perform manual ticking, override this method.
public Model getModel();Gets the model that was set by setModel.
public synchronized void hideModel();In the default implementation, this method pauses the background thread. This method can be overridden.
public synchronized void removeModel();This method terminates the thread and then calls stopModel. This method can be overridden.
public void setModel(Model model);Sets the model that will be used.
Parameter Description model The model to be set.
public synchronized void showModel();In the default implementation, this method ensures that the thread is resumed. This method can be overridden.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.