Java Reference
In-Depth Information
Figure 1. ViewManager constructor and example
ViewManager (JApplet jApplet, int totalRows, int totalColumns);
// jApplet - the JApplet that ViewManager should manage
// totalRows - number of rows of Canvas3D objects to be displayed in jApplet
// totalColumns - number of columns of Canvas3D objects to be displayed in jApplet
ViewManager viewManager = new ViewManager(this, 2, 2);
// Current applet to display 4 Canvas3D objects in a 2 by 2 configuration
first three objects will be positioned in one row whereas the fourth one will in the second
row below the first Canvas3D object.
addInG canvas3d
Figure 2 summarizes the usage and format of methods for adding Canvas3D objects.
Note that the methods shown can be broadly divided into three different groups. The first
group adds Canvas3D objects without specifying locations, relying instead on ViewManager
Figure 2. Methods for adding Canvas3D objects
viewManager.add (Canvas3D canvas3D, String title);
viewManager.add (Canvas3D canvas3D, String title, JPanel jPanel);
viewManager.add (Canvas3D canvas3D, String title, JPanel jPanel, String location);
viewManager.add (Canvas3D canvas3D, String title, int index);
viewManager.add (Canvas3D canvas3D, String title, JPanel jPanel, int index);
viewManager.add (Canvas3D canvas3D, String title, JPanel jPanel, String location, int index);
viewManager.add (Canvas3D canvas3D, String title, int row, int column);
viewManager.add (Canvas3D canvas3D, String title, JPanel jPanel, int row, int column);
viewManager.add (Canvas3D canvas3D, String title, JPanel jPanel, String location, int row, int
column);
// canvas3D - Canvas3D to be added into the applet
// title - title to identify the Canvas3D
// jPanel - additional panel for holding, say, the Panel1 controls, to be added into the Panel1
// location - may be ViewManager.TOP_CONTROL, ViewManager.RIGHT_CONTROL,
// ViewManager.BOTTOM_CONTROL or ViewManager.LEFT_CONTROL for specifying
// the position for adding jPanel with respect to the Canvas3D
// row - specify the row for adding the Canvas3D
// column - specify the column for adding the Canvas3D
// index
- specify the index of the Canvas3D to be added
Search WWH ::




Custom Search