Runtime

## org.eclipse.gmf.runtime.draw2d.ui.figures
Class RectangularDropShadowLineBorder

    java.lang.Object
      org.eclipse.draw2d.AbstractBorder
          org.eclipse.draw2d.LineBorder
              org.eclipse.gmf.runtime.draw2d.ui.internal.figures.LineBorderEx
                  org.eclipse.gmf.runtime.draw2d.ui.figures.RectangularDropShadowLineBorder

All Implemented Interfaces:
  Border, DropShadowBorder, org.eclipse.gmf.runtime.draw2d.ui.internal.figures.TransparentBorder

    public class RectangularDropShadowLineBorder

extends org.eclipse.gmf.runtime.draw2d.ui.internal.figures.LineBorderEx
implements DropShadowBorder

Field Summary

Fields inherited from class org.eclipse.draw2d.AbstractBorder
`tempRect`

Constructor Summary
`RectangularDropShadowLineBorder()` Constructs a DropShadowLineBorder with the foreground color and backgroud color of the figure that it is drawing the border for.
`RectangularDropShadowLineBorder(int w)` Constructs a LineBorder of the specified width.

Method Summary
`protected RectangularDropShadow` `getDropShadow()`
`Insets` `getInsets(IFigure figure)` Method for determining the inset the border will take up on the shape.
`protected int` `getShadowHeight()` Method for determining the height of the drop shadow border will take up on the shape.
`protected int` `getShadowWidth()` Method for determining the width of the drop shadow border will take up on the shape.
`Insets` `getTransparentInsets(IFigure figure)`
`boolean` `isOpaque()` Is this border Opaque or not.
`void` `paint(IFigure figure, Graphics g, Insets insets)` Overridden method for painting the border on the shape.
`void` `paintDropShadowBorder(IFigure figure, Graphics g, Insets insets, Rectangle rBox)` Paint the border of the figure with a dropshadow.
`void` `paintLineBorder(IFigure figure, Graphics g, Insets insets)` Method paintLineBorder.
`void` `setShouldDrawDropShadow(boolean bDrawDropShadow)` Sets whether the border will draw a drop shadow with the border edge.
`boolean` `shouldDrawDropShadow()`
`protected boolean` `shouldDrawShadow(IFigure figure)` Method shouldDrawShadow.

Methods inherited from class org.eclipse.draw2d.LineBorder
`getColor, getWidth, setColor, setWidth`

Methods inherited from class org.eclipse.draw2d.AbstractBorder
`getPaintRectangle, getPreferredSize`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.draw2d.Border
`getPreferredSize`

Constructor Detail

### RectangularDropShadowLineBorder

    public RectangularDropShadowLineBorder(int w)

  Constructs a LineBorder of the specified width.

  Parameters:
    `w` - Width of inset for border

### RectangularDropShadowLineBorder

    public RectangularDropShadowLineBorder()

  Constructs a DropShadowLineBorder with the foreground color and backgroud color of the figure that it is drawing the border for.

Method Detail

### getShadowWidth

    protected int getShadowWidth()

  Method for determining the width of the drop shadow border will take up on the shape.

  Returns:
    int the width of the drop shadow

### getShadowHeight

    protected int getShadowHeight()

  Method for determining the height of the drop shadow border will take up on the shape.

  Returns:
    int the height of the drop shadow

### getInsets

    public Insets getInsets(IFigure figure)

  Method for determining the inset the border will take up on the shape.

  Specified by:
    `getInsets` in interface `Border`
  Overrides:
    `getInsets` in class `LineBorder`
  Parameters:
    `figure` - Figure that will be inset from the border
  Returns:
    Insets the Insets for the border on the given figure.

### shouldDrawShadow

    protected boolean shouldDrawShadow(IFigure figure)

  Method shouldDrawShadow. Determines if the shadow should be drawn on the figure border. Checks that a drop shadow is the preferred border, and that the drop shadow can be drawn on this figure.

  Parameters:
    `figure` - Figure that the border will be drawn on
  Returns:
    boolean true if the shadow should be drawn, false otherwise.

### getTransparentInsets

    public Insets getTransparentInsets(IFigure figure)

  Specified by:
    `getTransparentInsets` in interface `org.eclipse.gmf.runtime.draw2d.ui.internal.figures.TransparentBorder`
  See Also:
    `TransparentBorder#getTransparentInsets(IFigure)`

### isOpaque

    public boolean isOpaque()

  Is this border Opaque or not.

  Specified by:
    `isOpaque` in interface `Border`
  Overrides:
    `isOpaque` in class `LineBorder`
  Returns:
    boolean true if opaque, false otherwise

### paintLineBorder

    public void paintLineBorder(IFigure figure,
                                Graphics g,
                                Insets insets)

  Method paintLineBorder. Painting the line border on the shape without the dropshadow.

  Parameters:
    `figure` - Figure that the border will be painted on
    `g` - Graphics context
    `insets` - Insets value that contrains how the border will be painted.

### paintDropShadowBorder

    public void paintDropShadowBorder(IFigure figure,
                                      Graphics g,
                                      Insets insets,
                                      Rectangle rBox)

  Paint the border of the figure with a dropshadow.

  Parameters:
    `figure` - Figure that the border will be painted on
    `g` - Graphics context
    `insets` - Insets value that contrains how the border will be painted.
    `rBox` - Rectangle representing figure bounds.

### paint

    public void paint(IFigure figure,
                      Graphics g,
                      Insets insets)

  Overridden method for painting the border on the shape.

  Specified by:
    `paint` in interface `Border`
  Overrides:
    `paint` in class `org.eclipse.gmf.runtime.draw2d.ui.internal.figures.LineBorderEx`
  Parameters:
    `figure` - Figure that the border will be painted on
    `g` - Graphics context
    `insets` - Insets value that contrains how the border will be painted.

### shouldDrawDropShadow

    public boolean shouldDrawDropShadow()

  Specified by:
    `shouldDrawDropShadow` in interface `DropShadowBorder`
  Returns:
    true iff the border painting method will draw a shadow

### setShouldDrawDropShadow

    public void setShouldDrawDropShadow(boolean bDrawDropShadow)

  Description copied from interface: `DropShadowBorder`
  Sets whether the border will draw a drop shadow with the border edge.

  Specified by:
    `setShouldDrawDropShadow` in interface `DropShadowBorder`

### getDropShadow

    protected RectangularDropShadow getDropShadow()

  Returns:
    Returns the drip shadow iamge.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.