fr.inria.zvtm.engine
Class EView

java.lang.Object
  extended by fr.inria.zvtm.engine.View
      extended by fr.inria.zvtm.engine.EView
All Implemented Interfaces:
KeyListener, EventListener

public class EView
extends View
implements KeyListener

An external view (EView) is wrapped in a JFrame window and can be composed of one or several cameras superimposed. Double buffering is implemented manually, so as to enable offscreen buffer modifications after rendering but before painting on screen, such as when magnifying a region with a Lens.

Author:
Emmanuel Pietriga

Field Summary
 
Fields inherited from class fr.inria.zvtm.engine.View
activeRepaintTimer, ANONYMOUS, mouse, name, OPENGL_VIEW, STD_VIEW
 
Constructor Summary
protected EView(String viewType, Vector<Camera> v, String t, int w, int h, boolean visible, boolean decorated)
           
protected EView(String viewType, Vector<Camera> v, String t, int w, int h, boolean bar, boolean visible, boolean decorated, JMenuBar mnb)
           
 
Method Summary
 void destroyView()
          Destroy this view.
 Component getFrame()
          Get the java.awt.Component for this View.
 boolean isSelected()
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void setLocation(int x, int y)
          Moves this component to a new location.
 void setResizable(boolean resizable)
          Sets whether this View is resizable by the user.
 void setSize(int width, int height)
          Resizes this component so that it has width width and height height.
 void setTitle(String t)
          Sets the title for this frame to the specified string.
 void setVisible(boolean b)
          Shows or hides this View depending on the value of parameter b.
 
Methods inherited from class fr.inria.zvtm.engine.View
activate, centerOnGlyph, centerOnGlyph, centerOnGlyph, centerOnGlyph, centerOnRegion, centerOnRegion, close, deactivate, getActiveCamera, getActiveLayer, getAntialiasing, getBackgroundColor, getCameraNumber, getCursor, getDetectMultiFills, getGlobalView, getGlobalView, getGlobalView, getGlobalView, getGlyphsInRegion, getGraphicsContext, getImage, getJava2DPainter, getLayerCount, getLens, getName, getNotifyCursorMoved, getPanel, getPanelFactory, getPanelSize, getRefreshRate, getVisibilityPadding, getVisibleRegion, getVisibleRegion, getVisibleRegionHeight, getVisibleRegionWidth, isBlank, rasterize, rasterize, registerViewPanelFactory, removeRepaintListener, repaint, repaint, setActiveLayer, setActiveLayer, setActiveRepaintInterval, setAntialiasing, setBackgroundColor, setBlank, setCursorIcon, setCursorIcon, setDetectMultiFills, setJava2DPainter, setLens, setListener, setListener, setListener, setNotifyCursorMoved, setRefreshRate, setStatusBarFont, setStatusBarForeground, setStatusBarText, setVisibilityPadding, updateFont
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EView

protected EView(String viewType,
                Vector<Camera> v,
                String t,
                int w,
                int h,
                boolean visible,
                boolean decorated)
Parameters:
viewType - one of View.STD_VIEW, View.OPENGL_VIEW - determines the type of view and acceleration method. The use of OPENGL_VIEW requires the following Java property: -Dsun.java2d.opengl=true
v - list of cameras that will constitue the layers of this View.
t - view name/title.
w - width of window in pixels
h - height of window in pixels
visible - should the view be made visible automatically or not
decorated - should the view be decorated with the underlying window manager's window frame or not

EView

protected EView(String viewType,
                Vector<Camera> v,
                String t,
                int w,
                int h,
                boolean bar,
                boolean visible,
                boolean decorated,
                JMenuBar mnb)
Parameters:
viewType - one of View.STD_VIEW, View.OPENGL_VIEW - determines the type of view and acceleration method. The use of OPENGL_VIEW requires the following Java property: -Dsun.java2d.opengl=true
v - list of cameras
t - view name
w - width of window in pixels
h - height of window in pixels
bar - true -> add a status bar to this view (below main panel)
visible - should the view be made visible automatically or not
decorated - should the view be decorated with the underlying window manager's window frame or not
mnb - a menu bar, already configured with actionListeners already attached to items (it is just added to the view). No effect if null.
Method Detail

getFrame

public Component getFrame()
Description copied from class: View
Get the java.awt.Component for this View.

Specified by:
getFrame in class View

isSelected

public boolean isSelected()
Specified by:
isSelected in class View

setLocation

public void setLocation(int x,
                        int y)
Description copied from class: View
Moves this component to a new location. The top-left corner of the new location is specified by the x and y parameters in the coordinate space of this component's parent.

Specified by:
setLocation in class View
Parameters:
x - the x-coordinate of the new location's top-left corner in the parent's coordinate space
y - the y-coordinate of the new location's top-left corner in the parent's coordinate space

setTitle

public void setTitle(String t)
Description copied from class: View
Sets the title for this frame to the specified string.

Specified by:
setTitle in class View
Parameters:
t - - the title to be displayed in the frame's border. A null value is treated as an empty string, "".

setSize

public void setSize(int width,
                    int height)
Description copied from class: View
Resizes this component so that it has width width and height height.

Specified by:
setSize in class View
Parameters:
width - - the new width of this component in pixels
height - - the new height of this component in pixels

setResizable

public void setResizable(boolean resizable)
Description copied from class: View
Sets whether this View is resizable by the user.

Specified by:
setResizable in class View
Parameters:
resizable - - true if this frame is resizable; false otherwise.

setVisible

public void setVisible(boolean b)
Description copied from class: View
Shows or hides this View depending on the value of parameter b.

Specified by:
setVisible in class View

destroyView

public void destroyView()
Description copied from class: View
Destroy this view.

Overrides:
destroyView in class View

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener


Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2011 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.