fr.inria.zvtm.glyphs
Class FRectangle

java.lang.Object
  extended by fr.inria.zvtm.glyphs.Glyph
      extended by fr.inria.zvtm.glyphs.ClosedShape
          extended by fr.inria.zvtm.glyphs.VRectangle
              extended by fr.inria.zvtm.glyphs.FRectangle
All Implemented Interfaces:
RectangularShape, Translucent, Cloneable

public class FRectangle
extends VRectangle

Rectangle becoming gradually translucent.

Author:
Emmanuel Pietriga
See Also:
VRectangle, VRectangleOr, PRectangle, SIRectangle

Field Summary
 
Fields inherited from class fr.inria.zvtm.glyphs.VRectangle
ar, pc, vh, vw
 
Fields inherited from class fr.inria.zvtm.glyphs.ClosedShape
bColor, borderColor, cursorInsideFColor, HSVb
 
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
FRectangle()
           
FRectangle(double x, double y, int z, double w, double h, Color c, Color bc, float ta, float ba)
           
FRectangle(double x, double y, int z, double w, double h, Color c, float ta, float ba)
           
 
Method Summary
 Object clone()
           
 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.
 void setGradientBottomAlpha(float a)
           
 void setGradientTopAlpha(float a)
           
 
Methods inherited from class fr.inria.zvtm.glyphs.VRectangle
addCamera, coordInside, getBounds, getHeight, getJava2DShape, getOrient, getSize, getWidth, initCams, mouseInOut, orientTo, project, projectForLens, removeCamera, resetMouseIn, resetMouseIn, reSize, setHeight, setWidth, sizeTo, visibleInDisc, visibleInRegion
 
Methods inherited from class fr.inria.zvtm.glyphs.ClosedShape
addHSVbColor, getBorderColor, getDefaultBorderColor, getHSVbColor, highlight, isBorderDrawn, isFilled, setBorderColor, setCursorInsideFillColor, setDrawBorder, setFilled, setHSVbColor
 
Methods inherited from class fr.inria.zvtm.glyphs.Glyph
addHSVColor, containedInRegion, getColor, getDefaultColor, getDefaultCursorInsideHighlightColor, getHSVColor, getLocation, getOwner, getStickedGlyphArray, getStroke, getTranslucencyValue, getType, getZindex, isSelected, isSensitive, isVisible, isVisibleThroughLens, move, moveTo, propagateMove, select, setColor, setCursorInsideHighlightColor, setDefaultCursorInsideHighlightColor, setHSVColor, setOwner, setSensitivity, setStroke, setTranslucencyValue, setType, setVisible, setZindex, stick, stickToGlyph, toString, unstick, unstickAllGlyphs, unstickAllGlyphs, unstickFromGlyph, visibleInViewport
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FRectangle

public FRectangle()

FRectangle

public FRectangle(double x,
                  double y,
                  int z,
                  double w,
                  double h,
                  Color c,
                  float ta,
                  float ba)
Parameters:
x - coordinate in virtual space
y - coordinate in virtual space
z - z-index (pass 0 if you do not use z-ordering)
w - width in virtual space
h - height in virtual space
c - fill color
ta - gradient top alpha value
ba - gradient bottom alpha value

FRectangle

public FRectangle(double x,
                  double y,
                  int z,
                  double w,
                  double h,
                  Color c,
                  Color bc,
                  float ta,
                  float ba)
Parameters:
x - coordinate in virtual space
y - coordinate in virtual space
z - z-index (pass 0 if you do not use z-ordering)
w - width in virtual space
h - height in virtual space
c - fill color
bc - border color
ta - gradient top alpha value
ba - gradient bottom alpha value
Method Detail

setGradientTopAlpha

public void setGradientTopAlpha(float a)

setGradientBottomAlpha

public void setGradientBottomAlpha(float a)

fillsView

public boolean fillsView(double w,
                         double h,
                         int camIndex)
Description copied from class: Glyph
Find out if this glyph completely fills a view. (In which case it is not necessary to repaint objects below it in the drawing stack). If implemented, this method should be very efficient, as it is used by an optional top-down clipping algorithm. Otherwise it might cost more time than it can potentially save. Until now it has only been implemented for non-reorientable rectangles and was activated only for treemap-like representations in which a lot of rectangles can potentially overlap each other.

Overrides:
fillsView in class VRectangle

draw

public void draw(Graphics2D g,
                 int vW,
                 int vH,
                 int i,
                 Stroke stdS,
                 AffineTransform stdT,
                 int dx,
                 int dy)
Description copied from class: Glyph
Draw this glyph.

Overrides:
draw in class VRectangle
Parameters:
g - graphics context in which the glyph should be drawn
vW - 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 glyph
stdS - default stroke
stdT - identity transform
dx - horizontal offset
dy - vertical offset

drawForLens

public void drawForLens(Graphics2D g,
                        int vW,
                        int vH,
                        int i,
                        Stroke stdS,
                        AffineTransform stdT,
                        int dx,
                        int dy)
Description copied from class: Glyph
Draw this glyph through a lens.

Overrides:
drawForLens in class VRectangle
Parameters:
g - graphics context in which the glyph should be drawn
vW - 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 glyph
stdS - default stroke
stdT - identity transform
dx - horizontal offset
dy - vertical offset

clone

public Object clone()
Overrides:
clone in class VRectangle


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.