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
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
RectangularDropShadowLineBorder
public RectangularDropShadowLineBorder(int w)
- Constructs a LineBorder
of the specified width.
-
Parameters:
-
w
- Width of inset for border in logic points
RectangularDropShadowLineBorder
public RectangularDropShadowLineBorder()
- Constructs a DropShadowLineBorder with the foreground color and backgroud color
of the figure that it is drawing the border for.
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)
-
Description copied from interface:
org.eclipse.gmf.runtime.draw2d.ui.internal.figures.TransparentBorder
- Method getTransparentInsets.
This method allows a border to indicate which part of it's inset
is transparent. This is important so that if certain methods wish to
ignore this part of the border they can. i.e. When placing resize
handles around a shape.
-
-
Specified by:
-
getTransparentInsets
in interface org.eclipse.gmf.runtime.draw2d.ui.internal.figures.TransparentBorder
-
-
Parameters:
-
figure
- IFigure to calculate the insets of
-
Returns:
- Insets object containing the border offsets which are
transparent.
-
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 constrains 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 drop shadow image.
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.