|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ engine overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.xerox.VTM.engine
Class View

java.lang.Objectcom.xerox.VTM.engine.View
- Direct Known Subclasses:
- AccEView, AccIView, AppletView, EView, IView
- public abstract class View
- extends java.lang.Object
A view is a window and can be composed of one or several cameras superimposed - use EView or IView
A view is repainted on a regular basis when active - for inactive views, the default is to repaint only if the mouse is inside the view (but the frame is not selected) - this can be changed to repaint the view automatically even if it is not selected and if the mouse is not inside, using setRepaintPolicy()
| Field Summary | |
(package private) java.util.Vector |
cameras
list of Camera objects used in this view |
(package private) boolean |
detectMultipleFullFills
enables detection of multiple full fills in one view repaint - for this specific view - STILL VERY BUGGY - ONLY SUPPORTS VRectangle and VCircle for now |
VCursor |
mouse
mouse glyph |
(package private) java.lang.String |
name
View name |
(package private) boolean |
notifyMouseMoved
triggers the mouseMoved method in AppEventHandler when the mouse is moved - set to false by default because few applications will need this; it is therefore not necessary to overload other applications with these events |
(package private) ViewPanel |
panel
the actual panel |
(package private) VirtualSpaceManager |
parent
root VTM class |
(package private) javax.swing.JLabel |
statusBar
|
| Constructor Summary | |
View()
|
|
| Method Summary | |
void |
activate()
activate the view means that it will be repainted |
(package private) void |
buildConstraints(java.awt.GridBagConstraints gbc,
int gx,
int gy,
int gw,
int gh,
int wx,
int wy)
|
protected void |
close()
called from the window listener when the window is closed |
void |
deactivate()
deactivate the view (will not be repainted unless setRepaintPolicy(true) or mouse inside the view) |
(package private) void |
deiconify()
called from the window listener when the window is deiconified - repaint is automatically re-enabled |
(package private) void |
destroyCamera(Camera c)
|
abstract void |
destroyView()
destroy this view |
Camera |
getActiveCamera()
get active camera (associated with active layer) |
int |
getActiveLayer()
get the active layer in this view (0 is deepest) |
boolean |
getAntialiasing()
get the value of the antialias rendering hint for this view |
java.awt.Color |
getBackgroundColor()
get background color of this view |
Camera |
getCameraNumber(int i)
get camera number i (corresponds to layer) |
boolean |
getDetectMultiFills()
get state of detection of multiple full fills in one view repaint - for this specific view |
abstract java.awt.Container |
getFrame()
get the java.awt.Container for this view |
java.awt.Graphics |
getGraphicsContext()
gives access to the panel's Graphics object - can be useful in some cases, for instance to compute the bounds of a text string that has not yet been added to any virtual space. |
java.awt.image.BufferedImage |
getImage()
returns a BufferedImage representation of this view (this is actually a COPY of the original) that can be used for instance with ImageIO.ImageWriter |
boolean |
getNotifyMouseMoved()
get state of notifyMouseMoved for this view |
int |
getRefreshRate()
Set this view's refresh rate - default is 20 |
long[] |
getVisibleRegion(Camera c)
returns bounds of rectangle representing virtual space's region seen through camera c [west,north,east,south] |
abstract void |
goFullScreen(boolean b,
java.awt.DisplayMode dm)
Go in full screen mode and display this View's content - DOES NOT WORK FOR AccIView or IView or AppletView ; only for AccEView or EView (external views) |
(package private) void |
iconify()
called from the window listener when the window is iconified - repaint is automatically disabled |
(package private) void |
initCameras(java.util.Vector c)
|
java.awt.Color |
isBlank()
tells if a view is in blank mode (returns the fill color) or not (returns null) |
abstract boolean |
isFullScreen()
|
abstract boolean |
isSelected()
tells whether this frame is selected or not |
(package private) void |
repaintNow()
call if the view should be repainted at once |
abstract void |
requestFocus()
used only in Internal Views to get focus in view for key events (called automatically when the mouse enters the (Acc)IView) |
void |
setActiveLayer(int i)
set the layer (camera) active in this view |
void |
setAntialiasing(boolean b)
set antialias rendering hint for this view |
void |
setBackgroundColor(java.awt.Color c)
set background color for this view |
void |
setBlank(java.awt.Color c)
make a view blank (the view is erased and filled with a uniform color) |
void |
setComputeMouseOverListPolicy(boolean b)
if true, compute the list of glyphs under mouse each time the view is repainted (default is false) - note that this list is computed each time the mouse is moved inside the view, no matter the policy |
void |
setCursorIcon(int c)
sets the cursor icon |
void |
setDetectMultiFills(boolean b)
enable/disable detection of multiple full fills in one view repaint - for this specific view |
void |
setEventHandler(AppEventHandler eh)
set application class to which events are sent |
abstract void |
setLocation(int x,
int y)
set the window location |
void |
setNotifyMouseMoved(boolean b)
sets whether the mouseMoved method in AppEventHandler is triggered when the mouse is moved - set to false by default because few applications will need this; it is therefore not necessary to overload other applications with these events |
void |
setRefreshRate(int r)
Set this view's refresh rate - default is 20 |
void |
setRepaintPolicy(boolean b)
should repaint this view on a regular basis or not (even if not activated, but does not apply to iconified views) |
abstract void |
setResizable(boolean b)
can the window be resized or not |
abstract void |
setSize(int x,
int y)
set the window size |
void |
setStatusBarFont(java.awt.Font f)
set font used in status bar text |
void |
setStatusBarForeground(java.awt.Color c)
set color used for status bar text |
void |
setStatusBarText(java.lang.String s)
set status bar text |
abstract void |
setTitle(java.lang.String t)
set the window title |
abstract void |
setVisible(boolean b)
Shows or hides this view |
abstract void |
toBack()
Sends this window to the back. |
abstract void |
toFront()
Brings this window to the front. |
void |
updateFont()
update font used in this view (for all cameras) (should be automatically called when changing the VSM's main font) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
cameras
java.util.Vector cameras
- list of Camera objects used in this view
mouse
public VCursor mouse
- mouse glyph
panel
ViewPanel panel
- the actual panel
detectMultipleFullFills
boolean detectMultipleFullFills
- enables detection of multiple full fills in one view repaint - for this specific view - STILL VERY BUGGY - ONLY SUPPORTS VRectangle and VCircle for now
statusBar
javax.swing.JLabel statusBar
name
java.lang.String name
- View name
parent
VirtualSpaceManager parent
- root VTM class
notifyMouseMoved
boolean notifyMouseMoved
- triggers the mouseMoved method in AppEventHandler when the mouse is moved - set to false by default because few applications will need this; it is therefore not necessary to overload other applications with these events
| Constructor Detail |
View
public View()
| Method Detail |
initCameras
void initCameras(java.util.Vector c)
destroyView
public abstract void destroyView()
- destroy this view
getFrame
public abstract java.awt.Container getFrame()
- get the java.awt.Container for this view
requestFocus
public abstract void requestFocus()
- used only in Internal Views to get focus in view for key events (called automatically when the mouse enters the (Acc)IView)
setCursorIcon
public void setCursorIcon(int c)
- sets the cursor icon
setEventHandler
public void setEventHandler(AppEventHandler eh)
- set application class to which events are sent
setNotifyMouseMoved
public void setNotifyMouseMoved(boolean b)
- sets whether the mouseMoved method in AppEventHandler is triggered when the mouse is moved - set to false by default because few applications will need this; it is therefore not necessary to overload other applications with these events
getNotifyMouseMoved
public boolean getNotifyMouseMoved()
- get state of notifyMouseMoved for this view
setStatusBarText
public void setStatusBarText(java.lang.String s)
- set status bar text
setStatusBarFont
public void setStatusBarFont(java.awt.Font f)
- set font used in status bar text
setStatusBarForeground
public void setStatusBarForeground(java.awt.Color c)
- set color used for status bar text
setDetectMultiFills
public void setDetectMultiFills(boolean b)
- enable/disable detection of multiple full fills in one view repaint - for this specific view
getDetectMultiFills
public boolean getDetectMultiFills()
- get state of detection of multiple full fills in one view repaint - for this specific view
getVisibleRegion
public long[] getVisibleRegion(Camera c)
- returns bounds of rectangle representing virtual space's region seen through camera c [west,north,east,south]
getImage
public java.awt.image.BufferedImage getImage()
- returns a BufferedImage representation of this view (this is actually a COPY of the original) that can be used for instance with ImageIO.ImageWriter
setActiveLayer
public void setActiveLayer(int i)
- set the layer (camera) active in this view
getActiveLayer
public int getActiveLayer()
- get the active layer in this view (0 is deepest)
updateFont
public void updateFont()
- update font used in this view (for all cameras) (should be automatically called when changing the VSM's main font)
setAntialiasing
public void setAntialiasing(boolean b)
- set antialias rendering hint for this view
getAntialiasing
public boolean getAntialiasing()
- get the value of the antialias rendering hint for this view
getCameraNumber
public Camera getCameraNumber(int i)
- get camera number i (corresponds to layer)
getActiveCamera
public Camera getActiveCamera()
- get active camera (associated with active layer)
destroyCamera
void destroyCamera(Camera c)
setBackgroundColor
public void setBackgroundColor(java.awt.Color c)
- set background color for this view
getBackgroundColor
public java.awt.Color getBackgroundColor()
- get background color of this view
isSelected
public abstract boolean isSelected()
- tells whether this frame is selected or not
setTitle
public abstract void setTitle(java.lang.String t)
- set the window title
setLocation
public abstract void setLocation(int x,
int y)
- set the window location
setSize
public abstract void setSize(int x,
int y)
- set the window size
setResizable
public abstract void setResizable(boolean b)
- can the window be resized or not
setVisible
public abstract void setVisible(boolean b)
- Shows or hides this view
toFront
public abstract void toFront()
- Brings this window to the front. Places this window at the top of the stacking order and shows it in front of any other windows
toBack
public abstract void toBack()
- Sends this window to the back. Places this window at the bottom of the stacking order and makes the corresponding adjustment to other visible windows
setRefreshRate
public void setRefreshRate(int r)
- Set this view's refresh rate - default is 20
getRefreshRate
public int getRefreshRate()
- Set this view's refresh rate - default is 20
setRepaintPolicy
public void setRepaintPolicy(boolean b)
- should repaint this view on a regular basis or not (even if not activated, but does not apply to iconified views)
setBlank
public void setBlank(java.awt.Color c)
- make a view blank (the view is erased and filled with a uniform color)
isBlank
public java.awt.Color isBlank()
- tells if a view is in blank mode (returns the fill color) or not (returns null)
goFullScreen
public abstract void goFullScreen(boolean b,
java.awt.DisplayMode dm)
- Go in full screen mode and display this View's content - DOES NOT WORK FOR AccIView or IView or AppletView ; only for AccEView or EView (external views)
isFullScreen
public abstract boolean isFullScreen()
setComputeMouseOverListPolicy
public void setComputeMouseOverListPolicy(boolean b)
- if true, compute the list of glyphs under mouse each time the view is repainted (default is false) - note that this list is computed each time the mouse is moved inside the view, no matter the policy
activate
public void activate()
- activate the view means that it will be repainted
deactivate
public void deactivate()
- deactivate the view (will not be repainted unless setRepaintPolicy(true) or mouse inside the view)
iconify
void iconify()
- called from the window listener when the window is iconified - repaint is automatically disabled
deiconify
void deiconify()
- called from the window listener when the window is deiconified - repaint is automatically re-enabled
close
protected void close()
- called from the window listener when the window is closed
repaintNow
void repaintNow()
- call if the view should be repainted at once
getGraphicsContext
public java.awt.Graphics getGraphicsContext()
- gives access to the panel's Graphics object - can be useful in some cases, for instance to compute the bounds of a text string that has not yet been added to any virtual space. SHOULD NOT BE TAMPERED WITH. USE AT YOUR OWN RISKS!
buildConstraints
void buildConstraints(java.awt.GridBagConstraints gbc, int gx, int gy, int gw, int gh, int wx, int wy)
|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ engine overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.xerox.VTM.engine.View