|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yobotics.simulationconstructionset.ViewportConfiguration
public class ViewportConfiguration
Title: SimulationConstructionSet
Description: Class for storing camera view configurations for display in a ViewportPanel.
This class can store the position and size information of several cameras as shown in the following example:
view2.addCameraView("camera 1", 0, 0, 1, 2);
view2.addCameraView("camera 2", 1, 0, 3, 2);
view2.addCameraView("robot cam", 0, 2, 2, 1);
The above code adds three cameras named camera 1, camera 2 and robot cam. The next component of each camera is its column and row.
In this example camera's 1 and 2 are both in the same row, row 0, but are separated into columns 0 and 1 respectively.
The final two components, width and height, indicate the number of columns and rows that the camera fills. Camera 1 has a width of 1 and a height of 2.
When placing cameras ensure that no overlap occurs as it will cause unpredictable behavior.
Copyright: Copyright (c) 2000
Company: Yobotics, Inc.
| Constructor Summary | |
|---|---|
ViewportConfiguration(java.lang.String name)
Creates an empty configuration with the specified name. |
|
| Method Summary | |
|---|---|
void |
addCameraView(java.lang.String cameraName,
int col,
int row,
int width,
int height)
Adds a new camera view to this configuration. |
void |
cache3DViews(java.util.ArrayList cached3DViews)
Store a set of 3DViews for reuse later. |
void |
cacheCanvas3DPanels(java.util.ArrayList cachedPanels)
Stores a list of Canvas3DPanels. |
void |
cacheViewportPanel(javax.swing.JPanel viewportPanel)
Stores a copy of the specified panel. |
java.util.ArrayList |
getCached3DViews()
Retrives the list of cached 3DViews. |
java.util.ArrayList |
getCachedCanvas3DPanels()
Retrieves the stored Canvas3DPanels. |
javax.swing.JPanel |
getCachedViewportPanel()
Retrieve the cached panel. |
java.lang.String |
getName()
Accessor method for the ViewportConfiguration's name |
java.util.ArrayList |
getPanelConfigurations()
Retrieves a list of the stored ViewportPanelConfigurations. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ViewportConfiguration(java.lang.String name)
name - Name of the configuration.| Method Detail |
|---|
public java.lang.String getName()
public void addCameraView(java.lang.String cameraName,
int col,
int row,
int width,
int height)
cameraName - Name of the camera to use.col - Column in which to place the camera.row - Row in which to place the camera.width - Width of the camera in number of columns.height - Height of the camera in number of rows.public java.util.ArrayList getPanelConfigurations()
public void cache3DViews(java.util.ArrayList cached3DViews)
cached3DViews - List to store.public java.util.ArrayList getCached3DViews()
public void cacheCanvas3DPanels(java.util.ArrayList cachedPanels)
cachedPanels - List of cached panels to be stored.public java.util.ArrayList getCachedCanvas3DPanels()
public void cacheViewportPanel(javax.swing.JPanel viewportPanel)
viewportPanel - Panel to store.public javax.swing.JPanel getCachedViewportPanel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||