1 package org.catacomb.druid.gui.base;
2
3 import org.catacomb.datalish.SpriteAnimation;
4 import org.catacomb.druid.swing.DBorderLayout;
5 import org.catacomb.graph.gui.MovieDisplay;
6 import org.catacomb.interlish.structure.ModeController;
7 import org.catacomb.interlish.structure.MovieController;
8
9 import java.awt.Color;
10
11 public class DruMovieDisplay extends DruBorderPanel {
12
13
14 static final long serialVersionUID = 1001;
15
16 MovieDisplay movieDisplay;
17
18 MovieController movieController;
19
20
21 public DruMovieDisplay(int w, int h) {
22
23 movieDisplay = new MovieDisplay(w, h-20);
24
25 addDComponent(movieDisplay, DBorderLayout.CENTER);
26
27
28 }
29
30 public void setModeController(ModeController mc) {
31 mc.addModeSettable(movieDisplay);
32 }
33
34 public void setBg(Color c) {
35 super.setBg(c);
36 movieDisplay.setBg(c);
37 }
38
39
40 public void setMovieController(MovieController movc) {
41 movieController = movc;
42 movc.setMovieOperator(movieDisplay);
43 }
44
45
46 public void setMovie(SpriteAnimation sanim) {
47 movieDisplay.setMovie(sanim);
48 movieController.syncFromOperator();
49 }
50
51
52 public void viewChanged() {
53 movieDisplay.viewChanged();
54 }
55
56
57
58 public void attachGraphicsController(Object obj) {
59 movieDisplay.attach(obj);
60 }
61
62
63
64 public void setXRange(double low, double high) {
65 movieDisplay.setXRange(low, high);
66 }
67
68
69 public void setLimits(double[] xyxy) {
70 movieDisplay.setLimits(xyxy);
71 }
72
73
74 public double[] getXRange() {
75 return movieDisplay.getXRange();
76 }
77
78 public double[] getYRange() {
79 return movieDisplay.getYRange();
80 }
81
82 public void setFixedAspectRatio(double ar) {
83 movieDisplay.setFixedAspectRatio(ar);
84 }
85
86 public void reframe() {
87 movieDisplay.reframe();
88 }
89
90 public void reluctantReframe() {
91 movieDisplay.reluctantReframe();
92 }
93
94
95
96
97 }