public class StoryBoard1 {
//this is my idea for storyBoard1:
//Computer graphics in 3D
private String idea;
//these are supposed to be the frames for the storyboard
private JPanel first;
private JPanel second;
private JPanel third;
private Image stuff; //this is not really a static image,
//but a changing one, like a video something like that...
public StoryBoard1() {
idea = "some computer graphics (animated)";
}
/************************ This is the first panel **************************/
public JPanel setFirstPanel(Image stuff) {
Image.setVisible(true); // make the image visible
//make it rotate....
//The idea is to animate it
for (double deg = 0; deg < 360; deg += 5) {
AffineTransform at = AffineTransform.getTranslateInstance(w/2, h/2);
at.rotate(Math.toRadians(deg));
g2d.draw(at.createTransformedShape(e));
}
//put everything on the panel
return first;
}
/************************ End of first panel ****************************/
/************************ This is the Second Panel ***********************/
public JPanel setSecondPanel(Image stuff) {
Image.setVisible(true); //show the image
//Here, I want to zoom in and out...
Image.zoomIn(2); //2 is the speed of the zooming;
Image.zoomOut(2);
second.paint(Image); //put image in second JPanel
second.setVisible(true); //show the frame
return second;
}
/************************* End of Second Panel ************************/
/************************* This is the Third Panel ***********************/
public JPanel setThirdPanel(Image stuff) {
Image.setVisible(true);
Image.panRight(1); //maybe make a pan-right
Image.panLeft(1); //or a pan-left
Image.showSurroundings(); //try to show the background...
}
/************************** End of Third Panel *************************/
}
public class StoryBoard2 {
//my second idea for project2 is
//the balcony in my apt....
private String idea;
//these are supposed to be the frames for the storyboard
private JPanel first;
private JPanel second;
private Image stuff; //this is not really a static image,
//but a changing one, like a video something like that...
public StoryBoard1() {
idea = "balcony with objects";
}
/************************* This is the first panel *********************/
public JPanel setFirstPanel(Image stuff) {
//show depth
stuff.setVisible(true); //start recording
stuff.zoomIn(2); //do some zooming
//put everything on the panel
return first;
}
/************************** End of first panel ***********************/
/************************** This is the Second Panel ******************/
public JPanel setSecondPanel(Image stuff) {
Image[] objects = new Image[N]; //this will be some objects in the balcony
objects.setVisible(true);
objects.animate(); //make objects move
//add the motion to the panel
second.add(objects);
second.add(stuff);
second.setVIsible(true);
return second;
}
/*************************** End of Second Panel ********************/
}
No comments:
Post a Comment