|
Runtime | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.LineBorder
org.eclipse.gmf.runtime.draw2d.ui.figures.OneLineBorder
public class OneLineBorder
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.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.draw2d.AbstractBorder |
|---|
tempRect |
| Constructor Summary | |
|---|---|
OneLineBorder()
|
|
OneLineBorder(Color color)
Constructor |
|
OneLineBorder(Color color,
int width,
int position)
Constructor |
|
OneLineBorder(int width,
int position)
Constructor |
|
| Method Summary | |
|---|---|
Insets |
getInsets(IFigure figure)
|
int |
getPosition()
|
void |
paint(IFigure figure,
Graphics graphics,
Insets insets)
Paints the border based on the inputs given. |
void |
setPosition(int position)
|
| Methods inherited from class org.eclipse.draw2d.LineBorder |
|---|
getColor, getWidth, isOpaque, 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 |
| Constructor Detail |
|---|
public OneLineBorder()
public OneLineBorder(int width,
int position)
width - the width of the line in relative coordinatesposition - the value should be one of PositionConstants.TOP, PositionConstants.BOTTOM,
PositionConstants.LEFT, PositionConstants.RIGHTpublic OneLineBorder(Color color)
color - The color of the border.
public OneLineBorder(Color color,
int width,
int position)
color - The color of the border.width - the width of the line in relative coordinatesposition - the value should be one of PositionConstants.TOP, PositionConstants.BOTTOM,
PositionConstants.LEFT, PositionConstants.RIGHT| Method Detail |
|---|
public int getPosition()
public void setPosition(int position)
position - The position to set.public Insets getInsets(IFigure figure)
getInsets in interface BordergetInsets in class LineBorder
public void paint(IFigure figure,
Graphics graphics,
Insets insets)
paint in interface Borderpaint in class LineBorderfigure - IFigure for which this is the border.graphics - Graphics handle for drawing the border.insets - Space to be taken up by this border.
|
Runtime | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.