camera3d.gui
Class ViewportCombo

java.lang.Object
  extended bycamera3d.gui.ViewportFrame
      extended bycamera3d.gui.ViewportCombo
All Implemented Interfaces:
ViewportChangeListener

public final class ViewportCombo
extends ViewportFrame
implements ViewportChangeListener

A version of ViewportFrame that automatically creates a ViewportCommandPane and a Viewport.

Author:
Fábio Roberto de Miranda

Constructor Summary
ViewportCombo(VcView view, GUIControl guiControl)
           
 
Method Summary
 void addView(VcView view)
          Adds a view to the list of view which can be selected for exhibition.
 void disableMessage()
          Turns of exhibition of messages in the canvas.
 Viewport getViewport()
          Returns viewport which belongs to this object.
 void removeView(VcView view)
          Tells ViewportCombo that a view has been removed from the scene graph.
 void setGUIControl(GUIControl guiControl)
          Sets GUIControl that will receive requests from this object.
 void setTitle(java.lang.String title)
          Sets frame title String.
 void showMessage(java.lang.String s)
          Shows a message in the canvas.
 void updateListOfViews(java.util.Vector views)
          Informs this object of changes occurred in the list of Views of the virtual World.
 void viewportChanged(ViewportEvent vpe)
          Method called when a change is made to a viewport.
 
Methods inherited from class camera3d.gui.ViewportFrame
changeToJFrame, changeToJInternalFrame, getJInternalFrame, getPosition, getSize, getViewportCommandPane, getViewportContextMenu, isInternalFrame, maximize, setFrameIcon, setInternalFrame, setPosition, setSize, setViewportContextMenu, setViewportsEventHandler, setVisible, toFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewportCombo

public ViewportCombo(VcView view,
                     GUIControl guiControl)
Method Detail

setGUIControl

public void setGUIControl(GUIControl guiControl)
Sets GUIControl that will receive requests from this object.


removeView

public void removeView(VcView view)
Tells ViewportCombo that a view has been removed from the scene graph. This method has been devised to be called by ViewportWindowManager. In response to the method call, ViewportCombo will check if its own view coincides with the removed view. In this case, it will switch to the default view. Following, ViewportCombo will update the list of views in its ViewportCommandPane.

Parameters:
view - the recently removed view.

addView

public void addView(VcView view)
Adds a view to the list of view which can be selected for exhibition.

Parameters:
view - new view added to list.

updateListOfViews

public void updateListOfViews(java.util.Vector views)
Informs this object of changes occurred in the list of Views of the virtual World.

Parameters:
views - updated list of views.

viewportChanged

public void viewportChanged(ViewportEvent vpe)
Description copied from interface: ViewportChangeListener
Method called when a change is made to a viewport.

Specified by:
viewportChanged in interface ViewportChangeListener
Parameters:
vpe - holds information about the change made.

showMessage

public void showMessage(java.lang.String s)
Shows a message in the canvas.


disableMessage

public void disableMessage()
Turns of exhibition of messages in the canvas.


getViewport

public Viewport getViewport()
Returns viewport which belongs to this object.

Overrides:
getViewport in class ViewportFrame

setTitle

public void setTitle(java.lang.String title)
Sets frame title String.



Copyright © 2001-2003 F.R. Miranda, C.S. Santos, J.E. Kogler Jr.. All Rights Reserved.