Mercurial > hg > Members > tatsuki > Alice
comparison src/alice/test/topology/aquarium/MakeFrame.java @ 138:87f1a30a8c82 working
change range automatic
author | sugi |
---|---|
date | Tue, 18 Sep 2012 11:46:38 +0900 |
parents | 53aff28cde6b |
children | b51d3bf971e7 |
comparison
equal
deleted
inserted
replaced
137:ed78890ed8e9 | 138:87f1a30a8c82 |
---|---|
26 | 26 |
27 int fSizeX = 800; | 27 int fSizeX = 800; |
28 int fSizeY = 800; | 28 int fSizeY = 800; |
29 private Canvas3D canvas; | 29 private Canvas3D canvas; |
30 private SimpleUniverse universe; | 30 private SimpleUniverse universe; |
31 private KeyInputCodeSegment kics; | |
32 | 31 |
33 public MakeFrame(String str){ | 32 public MakeFrame(String str){ |
34 JFrame frame = new JFrame(str); | 33 JFrame frame = new JFrame(str); |
35 frame.setSize(fSizeX,fSizeY); | 34 frame.setSize(fSizeX,fSizeY); |
36 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | 35 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
46 | 45 |
47 universe = new SimpleUniverse(canvas); | 46 universe = new SimpleUniverse(canvas); |
48 universe.addBranchGraph(createLight()); | 47 universe.addBranchGraph(createLight()); |
49 universe.addBranchGraph(setBackground()); | 48 universe.addBranchGraph(setBackground()); |
50 | 49 |
51 kics = new KeyInputCodeSegment(); | 50 canvas.addKeyListener(new KeyInputCodeSegment()); |
52 canvas.addKeyListener(kics); | |
53 frame.setVisible(true); | 51 frame.setVisible(true); |
54 | 52 |
55 ViewingPlatform camera = universe.getViewingPlatform(); | 53 ViewingPlatform camera = universe.getViewingPlatform(); |
56 camera.setNominalViewingTransform(); | 54 camera.setNominalViewingTransform(); |
57 } | 55 } |
96 } | 94 } |
97 | 95 |
98 public Canvas3D getCanvas(){ | 96 public Canvas3D getCanvas(){ |
99 return this.canvas; | 97 return this.canvas; |
100 } | 98 } |
101 | |
102 public KeyInputCodeSegment getKeySegment(){ | |
103 return this.kics; | |
104 } | |
105 | |
106 } | 99 } |