|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.inria.zvtm.glyphs.Glyph
fr.inria.zvtm.glyphs.Composite
public class Composite
Composite glyph.
| Field Summary |
|---|
| Fields inherited from class fr.inria.zvtm.glyphs.Glyph |
|---|
alphaC, coef, color, cursorInsideColor, ENTERED_GLYPH, EXITED_GLYPH, fColor, HSV, NO_CURSOR_EVENT, orient, sensit, size, stickedTo, stroke, visible, vx, vy, vz |
| Fields inherited from interface fr.inria.zvtm.glyphs.Translucent |
|---|
acO |
| Constructor Summary | |
|---|---|
Composite()
|
|
| Method Summary | |
|---|---|
void |
addCamera(int index)
Create new projected coordinates. |
void |
addChild(Glyph child)
Adds a child Glyph to this Composite. |
Composite |
clone()
|
void |
computeBounds()
Re-computes the bounds of this Composite. |
boolean |
coordInside(int jpx,
int jpy,
int camIndex,
double cvx,
double cvy)
Detect whether the given point is inside this glyph or not. |
void |
draw(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Draw this glyph. |
void |
drawForLens(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Draw this glyph through a lens. |
boolean |
fillsView(double w,
double h,
int camIndex)
Find out if this glyph completely fills a view. |
double[] |
getBounds()
Get the bounding box of this Glyph in virtual space coordinates. |
Shape |
getJava2DShape()
Get the Java2D Shape corresponding to this Glyph. |
double |
getOrient()
Get the glyph's orientation. |
double |
getSize()
Get glyph's size (diameter of bounding circle). |
void |
highlight(boolean b,
Color selectedColor)
Highlight this glyph to give visual feedback when the cursor is inside it. |
void |
initCams(int nbCam)
Initialize projected coordinates. |
short |
mouseInOut(int jpx,
int jpy,
int camIndex,
double cvx,
double cvy)
Method used internally for firing picking-related events. |
void |
move(double dx,
double dy)
Translate the glyph by (x,y) - relative translation. |
void |
moveTo(double x,
double y)
Translate the glyph to (x,y) - absolute translation. |
void |
orientTo(double angle)
Set the glyph's absolute orientation. |
List<Glyph> |
peekAtChildren()
Returns part of the internal state of this Composite. |
void |
project(Camera c,
Dimension d)
Project glyph w.r.t a given camera's coordinate system, prior to actual painting. |
void |
projectForLens(Camera c,
int lensWidth,
int lensHeight,
float lensMag,
double lensx,
double lensy)
Project glyph w.r.t a given camera's coordinate system, prior to actual painting through a lens. |
void |
removeCamera(int index)
Dispose of projected coordinates. |
boolean |
removeChild(Glyph child)
Removes a child Glyph from this Composite. |
void |
resetMouseIn()
Reset memory of cursor being inside the glyph. |
void |
resetMouseIn(int i)
Reset memory of cursor being inside the glyph for projected coordinates associated with camera at index i. |
void |
reSize(double factor)
Set glyph's size by multiplying its bounding circle diameter by a factor. |
void |
sizeTo(double newSize)
Set glyph's size by setting its bounding circle's diameter. |
boolean |
visibleInRegion(double wb,
double nb,
double eb,
double sb,
int i)
Method used internally to find out if it is necessary to project and draw this glyph for a given camera. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Composite()
| Method Detail |
|---|
public void addChild(Glyph child)
child - Glyph to addpublic boolean removeChild(Glyph child)
child - Glyph to remove
true if child has been removed, false
otherwisepublic List<Glyph> peekAtChildren()
public double[] getBounds()
Glyph
getBounds in class Glyphpublic Composite clone()
clone in class Glyph
public boolean fillsView(double w,
double h,
int camIndex)
fillsView in class Glyph
public short mouseInOut(int jpx,
int jpy,
int camIndex,
double cvx,
double cvy)
mouseInOut in class Glyphjpx - provide projected JPanel coordinates of the associated view, not virtual space coordinatesjpy - provide projected JPanel coordinates of the associated view, not virtual space coordinatescvx - virtual space coordinatescvy - virtual space coordinates
public void resetMouseIn()
resetMouseIn in class Glyphpublic void resetMouseIn(int i)
resetMouseIn in class Glyph
public boolean coordInside(int jpx,
int jpy,
int camIndex,
double cvx,
double cvy)
coordInside in class Glyphjpx - provide projected JPanel coordinates of the associated view, not virtual space coordinatesjpy - provide projected JPanel coordinates of the associated view, not virtual space coordinatescvx - virtual space coordinatescvy - virtual space coordinatespublic void removeCamera(int index)
Glyph
removeCamera in class GlyphGlyph.initCams(int nbCam),
Glyph.addCamera(int verifIndex)public void addCamera(int index)
Glyph
addCamera in class Glyphindex - camera index, just to be sure that the number of projected coordinates is consistent with the number of cameras.Glyph.initCams(int nbCam),
Glyph.removeCamera(int index)public void initCams(int nbCam)
Glyph
initCams in class GlyphnbCam - current number of cameras in the virtual spaceGlyph.addCamera(int verifIndex),
Glyph.removeCamera(int index)
public void drawForLens(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Glyph
drawForLens in class Glyphg - graphics context in which the glyph should be drawnvW - associated View width (used by some closed shapes to determine if it is worth painting the glyph's border)vH - associated View height (used by some closed shapes to determine if it is worth painting the glyph's border)i - camera index in the virtual space containing the glyphstdS - default strokestdT - identity transformdx - horizontal offsetdy - vertical offset
public void draw(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Glyph
draw in class Glyphg - graphics context in which the glyph should be drawnvW - associated View width (used by some closed shapes to determine if it is worth painting the glyph's border)vH - associated View height (used by some closed shapes to determine if it is worth painting the glyph's border)i - camera index in the virtual space containing the glyphstdS - default strokestdT - identity transformdx - horizontal offsetdy - vertical offset
public void projectForLens(Camera c,
int lensWidth,
int lensHeight,
float lensMag,
double lensx,
double lensy)
Glyph
projectForLens in class Glyphc - cameralensWidth - width of lens activated in View using this cameralensHeight - height of lens activated in View using this cameralensMag - magnification factor of lens activated in View using this cameralensx - horizontal coordinateof lens activated in View using this cameralensy - vertical coordinate of lens activated in View using this camera
public void project(Camera c,
Dimension d)
Glyph
project in class Glyphc - camerad - dimension of View using camera c
public void highlight(boolean b,
Color selectedColor)
Glyph
highlight in class Glyphpublic void orientTo(double angle)
Glyph
orientTo in class Glyphangle - in [0:2Pi[public double getOrient()
Glyph
getOrient in class Glyphpublic void reSize(double factor)
Glyph
reSize in class GlyphGlyph.sizeTo(double s)public void sizeTo(double newSize)
Glyph
sizeTo in class GlyphGlyph.reSize(double factor)
public void move(double dx,
double dy)
Glyph
move in class GlyphGlyph.moveTo(double x, double y)
public void moveTo(double x,
double y)
Glyph
moveTo in class GlyphGlyph.move(double x, double y)
public boolean visibleInRegion(double wb,
double nb,
double eb,
double sb,
int i)
Glyph
visibleInRegion in class Glyphwb - west region boundary (virtual space coordinates)nb - north region boundary (virtual space coordinates)eb - east region boundary (virtual space coordinates)sb - south region boundary (virtual space coordinates)i - camera index (useuful only for some glyph classes redefining this method)
public void computeBounds()
public double getSize()
Glyph
getSize in class Glyphpublic Shape getJava2DShape()
Glyph
getJava2DShape in class Glyph
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||