|
org.eclipse.gmf.runtime.draw2d.ui.figures
Class OneLineBorder
java.lang.Object
org.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.LineBorder
org.eclipse.gmf.runtime.draw2d.ui.figures.OneLineBorder
-
All Implemented Interfaces:
-
Border
-
public class OneLineBorder
- extends
LineBorder
This is a border that only draws a line at one position around the shape based on a position
constant. This is useful for cases where it may be necessary to draw a separator between shapes
without instantiating a new figure.
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
OneLineBorder
public OneLineBorder()
OneLineBorder
public OneLineBorder(int width,
int position)
- Constructor
-
Parameters:
-
width - the width of the line in relative coordinates -
position - the value should be one of PositionConstants.TOP , PositionConstants.BOTTOM ,
PositionConstants.LEFT , PositionConstants.RIGHT
OneLineBorder
public OneLineBorder(
Color color)
- Constructor
-
Parameters:
-
color - The color of the border.
OneLineBorder
public OneLineBorder(
Color color,
int width,
int position)
- Constructor
-
Parameters:
-
color - The color of the border. -
width - the width of the line in relative coordinates -
position - the value should be one of PositionConstants.TOP , PositionConstants.BOTTOM ,
PositionConstants.LEFT , PositionConstants.RIGHT
getPosition
public int getPosition()
-
-
Returns:
- Returns the position.
setPosition
public void setPosition(int position)
-
-
Parameters:
-
position - The position to set.
getInsets
public
Insets getInsets(
IFigure figure)
-
-
Specified by:
-
getInsets
in interface
Border
-
Overrides:
-
getInsets
in class
LineBorder
-
paint
public void paint(
IFigure figure,
Graphics graphics,
Insets insets)
- Paints the border based on the inputs given.
-
-
Specified by:
-
paint
in interface
Border
-
Overrides:
-
paint
in class
LineBorder
-
-
Parameters:
-
figure - IFigure for which this is the border. -
graphics - Graphics handle for drawing the border. -
insets - Space to be taken up by this border.
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.
|
|