# Deprecated API

## Contents

- Terminally Deprecated
- Classes
- Fields
- Methods
- Constructors

Terminally Deprecated Elements
Element
Description
org.eclipse.draw2d.Figure.bgColor
access using `Figure.getLocalBackgroundColor()`. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.border
access using `Figure.getBorder()` This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.fgColor
access using `Figure.getLocalForegroundColor()`. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.FigureIterator
use ReverseFigureChildrenIterator instead. This class will be removed after the 2027-09 release.
org.eclipse.draw2d.Figure.font
access using `Figure.getLocalFont()`. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.toolTip
access using `Figure.getToolTip()` This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.ALIGN_LEFTTOP
Use `OrderedLayout.ALIGN_TOPLEFT` instead. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.ALIGN_RIGHTBOTTOM
Use `OrderedLayout.ALIGN_BOTTOMRIGHT` instead. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.fill
Use `OrderedLayout.setStretchMinorAxis(boolean)` and `OrderedLayout.isStretchMinorAxis()` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.majorAlignment
Use `FlowLayout.getMajorAlignment()` and `FlowLayout.setMajorAlignment(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.majorSpacing
Use `FlowLayout.getMajorSpacing()` and `FlowLayout.setMajorSpacing(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.minorSpacing
Use `FlowLayout.getMinorSpacing()` and `FlowLayout.setMinorSpacing(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.geometry.Dimension.expand(Point)
Use `Dimension.expand(int, int)` instead.
org.eclipse.draw2d.geometry.Dimension.getDifference(Dimension)
Use `Dimension.getShrinked(Dimension)` instead.
org.eclipse.draw2d.geometry.Point(double, double)
Use `PrecisionPoint` or `Point(int, int)` instead.
org.eclipse.draw2d.geometry.Point.getDistance2(Point)
Use `Point.getDistanceSquared(Point)`.
org.eclipse.draw2d.geometry.PrecisionDimension.preciseHeight
Use `PrecisionDimension.setPreciseHeight(double)` and `PrecisionDimension.preciseHeight()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionDimension.preciseWidth
Use `PrecisionDimension.setPreciseWidth(double)` and `PrecisionDimension.preciseWidth()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionDimension.updateInts()
This method should not be accessed by clients any more (it will be made private in future releases). The update of integer and precision fields is performed automatically if `PrecisionDimension.preciseWidth` and `PrecisionDimension.preciseHeight` field values are not manipulated directly, but only via respective methods offered by this class.
org.eclipse.draw2d.geometry.PrecisionPoint.preciseX
Use `PrecisionPoint.setPreciseX(double)` and `PrecisionPoint.preciseX()` instead. This field will become private in future versions.
org.eclipse.draw2d.geometry.PrecisionPoint.preciseY
Use `PrecisionPoint.setPreciseY(double)` and `PrecisionPoint.preciseY()` instead. This field will become private in future versions.
org.eclipse.draw2d.geometry.PrecisionPoint.updateInts()
This method should not be accessed by clients any more (it will be made private in future releases). The update of integer and precision fields is performed automatically if `PrecisionPoint.preciseX` and `PrecisionPoint.preciseY` field values are not manipulated directly, but only via respective methods offered by this class.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseHeight
Use `PrecisionRectangle.setPreciseHeight(double)` and `PrecisionRectangle.preciseHeight()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseWidth
Use `PrecisionRectangle.setPreciseWidth(double)` and `PrecisionRectangle.preciseWidth()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseX
Use `PrecisionRectangle.setPreciseX(double)` and `PrecisionRectangle.preciseX()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseY
Use `PrecisionRectangle.setPreciseX(double)` and `PrecisionRectangle.preciseY()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionRectangle.setHeight(double)
Use `PrecisionRectangle.setPreciseHeight(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.setWidth(double)
Use `PrecisionRectangle.setPreciseWidth(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.setX(double)
Use `PrecisionRectangle.setPreciseX(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.setY(double)
Use `PrecisionRectangle.setPreciseX(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.union(PrecisionRectangle)
Use `PrecisionRectangle.union(Rectangle)` instead
org.eclipse.draw2d.geometry.PrecisionRectangle.updateInts()
This method should not be accessed by clients any more (it will be made private in future releases). The update of integer and precision fields is performed automatically if `PrecisionRectangle.preciseX`, `PrecisionRectangle.preciseY`, `PrecisionRectangle.preciseWidth`, and `PrecisionRectangle.preciseHeight` field values are not manipulated directly, but only via respective methods offered by this class.
org.eclipse.draw2d.geometry.Ray
Use `Vector` instead, which offers double precision instead of integer precision.
org.eclipse.draw2d.geometry.Rectangle.crop(Insets)
Use `Rectangle.shrink(Insets)` instead.
org.eclipse.draw2d.geometry.Rectangle.getCropped(Insets)
Use `Rectangle.getShrinked(Insets)` instead.
org.eclipse.draw2d.geometry.Rectangle.union(Dimension)
Union with a dimension generally does not make much sense, thus deprecating this. Use `Dimension.max(Dimension, Dimension)` and `Rectangle.setSize(Dimension)` to implement the desired behavior instead.
org.eclipse.draw2d.graph.EdgeList.getEdge(int)
use Use `ArrayList.get(int)` instead.
org.eclipse.draw2d.graph.NodeList.getNode(int)
use Use `ArrayList.get(int)` instead.
org.eclipse.draw2d.LayeredPane.removeLayer(IFigure)
call `IFigure.remove(IFigure)` instead. This method will be removed after the 2027-09 release.
org.eclipse.draw2d.OrderedLayout.horizontal
Use `OrderedLayout.setHorizontal(boolean)` and `OrderedLayout.isHorizontal()` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.OrderedLayout.HORIZONTAL
Pulled up from derived layout manager and deprecated here because unused. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.OrderedLayout.minorAlignment
Use `OrderedLayout.getMinorAlignment()` and `OrderedLayout.setMinorAlignment(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.OrderedLayout.VERTICAL
Pulled up from derived layout manager and deprecated here because unused. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.PrintOperation.getFreshPrinterGraphics()
Use `PrintOperation.getFreshGraphics()` instead. This method will be removed after the 2027-06 release.
org.eclipse.draw2d.PrintOperation.setupGraphicsForPage(PrinterGraphics)
Use `PrintOperation.setupGraphicsForPage(Graphics)` instead. This method will be removed after the 2027-06 release.
org.eclipse.draw2d.Shape.lineStyle
Use `Shape.setLineStyle(int)` instead. This field will be made private with the 2027-09 release.
org.eclipse.draw2d.Shape.lineWidth
Use `Shape.setLineWidth(int)` or `Shape.setLineWidthFloat(float)` instead. This field will be made private with the 2027-09 release.
org.eclipse.draw2d.SWTEventDispatcher.ANY_BUTTON
Use `SWT.BUTTON_MASK` instead. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.getStretchMinorAxis()
Use `ToolbarLayout.isStretchMinorAxis()` instead. This method will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.HORIZONTAL
Unused. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.matchWidth
Use `OrderedLayout.setStretchMinorAxis(boolean)` and `OrderedLayout.isStretchMinorAxis()` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.setMatchWidth(boolean)
use `ToolbarLayout.setStretchMinorAxis(boolean)`. This method will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.setVertical(boolean)
Use `OrderedLayout.setHorizontal(boolean)` with argument `false` instead. This method will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.spacing
Use `ToolbarLayout.getSpacing()` and `ToolbarLayout.setSpacing(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.VERTICAL
Unused. This field will be removed after the 2027-09 release.

Deprecated Classes
Class
Description
org.eclipse.draw2d.Figure.FigureIterator
use ReverseFigureChildrenIterator instead. This class will be removed after the 2027-09 release.
org.eclipse.draw2d.geometry.Ray
Use `Vector` instead, which offers double precision instead of integer precision.
org.eclipse.draw2d.graph.VirtualNode
virtual nodes of an edge should be cast to Node.
org.eclipse.draw2d.SubordinateUpdateManager
this class is not used

Deprecated Fields
Field
Description
org.eclipse.draw2d.ConnectionLocator.END
Use `ConnectionLocator.TARGET`
org.eclipse.draw2d.ConnectionLocator.MIDPOINT
Use `ConnectionLocator.MIDDLE` instead, since the location is not the midpoint of a line-segment, but the middle of a polyline.
org.eclipse.draw2d.ConnectionLocator.START
Use `ConnectionLocator.SOURCE`
org.eclipse.draw2d.Figure.bgColor
access using `Figure.getLocalBackgroundColor()`. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.border
access using `Figure.getBorder()` This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.fgColor
access using `Figure.getLocalForegroundColor()`. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.font
access using `Figure.getLocalFont()`. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.Figure.toolTip
access using `Figure.getToolTip()` This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.ALIGN_LEFTTOP
Use `OrderedLayout.ALIGN_TOPLEFT` instead. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.ALIGN_RIGHTBOTTOM
Use `OrderedLayout.ALIGN_BOTTOMRIGHT` instead. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.fill
Use `OrderedLayout.setStretchMinorAxis(boolean)` and `OrderedLayout.isStretchMinorAxis()` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.majorAlignment
Use `FlowLayout.getMajorAlignment()` and `FlowLayout.setMajorAlignment(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.majorSpacing
Use `FlowLayout.getMajorSpacing()` and `FlowLayout.setMajorSpacing(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.FlowLayout.minorSpacing
Use `FlowLayout.getMinorSpacing()` and `FlowLayout.setMinorSpacing(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.geometry.PrecisionDimension.preciseHeight
Use `PrecisionDimension.setPreciseHeight(double)` and `PrecisionDimension.preciseHeight()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionDimension.preciseWidth
Use `PrecisionDimension.setPreciseWidth(double)` and `PrecisionDimension.preciseWidth()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionPoint.preciseX
Use `PrecisionPoint.setPreciseX(double)` and `PrecisionPoint.preciseX()` instead. This field will become private in future versions.
org.eclipse.draw2d.geometry.PrecisionPoint.preciseY
Use `PrecisionPoint.setPreciseY(double)` and `PrecisionPoint.preciseY()` instead. This field will become private in future versions.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseHeight
Use `PrecisionRectangle.setPreciseHeight(double)` and `PrecisionRectangle.preciseHeight()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseWidth
Use `PrecisionRectangle.setPreciseWidth(double)` and `PrecisionRectangle.preciseWidth()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseX
Use `PrecisionRectangle.setPreciseX(double)` and `PrecisionRectangle.preciseX()` instead. This field will become private in the future.
org.eclipse.draw2d.geometry.PrecisionRectangle.preciseY
Use `PrecisionRectangle.setPreciseX(double)` and `PrecisionRectangle.preciseY()` instead. This field will become private in the future.
org.eclipse.draw2d.graph.DirectedGraph.ranks
org.eclipse.draw2d.graph.Edge.delta
use accessors instead
org.eclipse.draw2d.graph.Edge.end
use `Edge.getPoints()`
org.eclipse.draw2d.graph.Edge.isFeedback
INTERNAL field, use accessor method Indicates an edge was inverted during the layout
org.eclipse.draw2d.graph.Edge.offsetSource
use accessors instead
org.eclipse.draw2d.graph.Edge.offsetTarget
use accessors instead
org.eclipse.draw2d.graph.Edge.padding
use accessors instead
org.eclipse.draw2d.graph.Edge.start
use `Edge.getPoints()`
org.eclipse.draw2d.graph.Edge.width
use accessors instead
org.eclipse.draw2d.graph.Node.rowOrder
use `Node.setRowConstraint(int)` and `Node.getRowConstraint()`
org.eclipse.draw2d.graph.Node.sortValue
for internal use only
org.eclipse.draw2d.InputEvent.ALT
Use `SWT.ALT` instead.
org.eclipse.draw2d.InputEvent.ANY_BUTTON
Use `SWT.BUTTON_MASK` instead.
org.eclipse.draw2d.InputEvent.BUTTON1
Use `SWT.BUTTON1` instead.
org.eclipse.draw2d.InputEvent.BUTTON2
Use `SWT.BUTTON2` instead.
org.eclipse.draw2d.InputEvent.BUTTON3
Use `SWT.BUTTON3` instead.
org.eclipse.draw2d.InputEvent.BUTTON4
Use `SWT.BUTTON4` instead.
org.eclipse.draw2d.InputEvent.BUTTON5
Use `SWT.BUTTON5` instead.
org.eclipse.draw2d.InputEvent.CONTROL
Use `SWT.CONTROL` instead.
org.eclipse.draw2d.InputEvent.SHIFT
Use `SWT.SHIFT` instead.
org.eclipse.draw2d.OrderedLayout.horizontal
Use `OrderedLayout.setHorizontal(boolean)` and `OrderedLayout.isHorizontal()` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.OrderedLayout.HORIZONTAL
Pulled up from derived layout manager and deprecated here because unused. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.OrderedLayout.minorAlignment
Use `OrderedLayout.getMinorAlignment()` and `OrderedLayout.setMinorAlignment(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.OrderedLayout.VERTICAL
Pulled up from derived layout manager and deprecated here because unused. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.RoundedRectangle.corner
Use `RoundedRectangle.getCornerDimensions()` instead.
org.eclipse.draw2d.Shape.lineStyle
Use `Shape.setLineStyle(int)` instead. This field will be made private with the 2027-09 release.
org.eclipse.draw2d.Shape.lineWidth
Use `Shape.setLineWidth(int)` or `Shape.setLineWidthFloat(float)` instead. This field will be made private with the 2027-09 release.
org.eclipse.draw2d.SWTEventDispatcher.ANY_BUTTON
Use `SWT.BUTTON_MASK` instead. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.HORIZONTAL
Unused. This field will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.matchWidth
Use `OrderedLayout.setStretchMinorAxis(boolean)` and `OrderedLayout.isStretchMinorAxis()` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.spacing
Use `ToolbarLayout.getSpacing()` and `ToolbarLayout.setSpacing(int)` instead. This field will be made private after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.VERTICAL
Unused. This field will be removed after the 2027-09 release.

Deprecated Methods
Method
Description
org.eclipse.draw2d.Figure.fireMoved()
call fireFigureMoved() or fireCoordinateSystemChanged() as appropriate
org.eclipse.draw2d.FigureUtilities.getGC()
do not mess with this GC
org.eclipse.draw2d.geometry.Dimension.expand(Point)
Use `Dimension.expand(int, int)` instead.
org.eclipse.draw2d.geometry.Dimension.getDifference(Dimension)
Use `Dimension.getShrinked(Dimension)` instead.
org.eclipse.draw2d.geometry.Point.getDistance2(Point)
Use `Point.getDistanceSquared(Point)`.
org.eclipse.draw2d.geometry.PrecisionDimension.updateInts()
This method should not be accessed by clients any more (it will be made private in future releases). The update of integer and precision fields is performed automatically if `PrecisionDimension.preciseWidth` and `PrecisionDimension.preciseHeight` field values are not manipulated directly, but only via respective methods offered by this class.
org.eclipse.draw2d.geometry.PrecisionPoint.updateInts()
This method should not be accessed by clients any more (it will be made private in future releases). The update of integer and precision fields is performed automatically if `PrecisionPoint.preciseX` and `PrecisionPoint.preciseY` field values are not manipulated directly, but only via respective methods offered by this class.
org.eclipse.draw2d.geometry.PrecisionRectangle.setHeight(double)
Use `PrecisionRectangle.setPreciseHeight(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.setWidth(double)
Use `PrecisionRectangle.setPreciseWidth(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.setX(double)
Use `PrecisionRectangle.setPreciseX(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.setY(double)
Use `PrecisionRectangle.setPreciseX(double)` instead.
org.eclipse.draw2d.geometry.PrecisionRectangle.union(PrecisionRectangle)
Use `PrecisionRectangle.union(Rectangle)` instead
org.eclipse.draw2d.geometry.PrecisionRectangle.updateInts()
This method should not be accessed by clients any more (it will be made private in future releases). The update of integer and precision fields is performed automatically if `PrecisionRectangle.preciseX`, `PrecisionRectangle.preciseY`, `PrecisionRectangle.preciseWidth`, and `PrecisionRectangle.preciseHeight` field values are not manipulated directly, but only via respective methods offered by this class.
org.eclipse.draw2d.geometry.Rectangle.crop(Insets)
Use `Rectangle.shrink(Insets)` instead.
org.eclipse.draw2d.geometry.Rectangle.getCropped(Insets)
Use `Rectangle.getShrinked(Insets)` instead.
org.eclipse.draw2d.geometry.Rectangle.union(Dimension)
Union with a dimension generally does not make much sense, thus deprecating this. Use `Dimension.max(Dimension, Dimension)` and `Rectangle.setSize(Dimension)` to implement the desired behavior instead.
org.eclipse.draw2d.graph.EdgeList.getEdge(int)
use Use `ArrayList.get(int)` instead.
org.eclipse.draw2d.graph.NodeList.getNode(int)
use Use `ArrayList.get(int)` instead.
org.eclipse.draw2d.graph.Rank.sort()
Do not call
org.eclipse.draw2d.Label.setIconDimension(Dimension)
the icon is automatically displayed at 1:1
org.eclipse.draw2d.LayeredPane.removeLayer(IFigure)
call `IFigure.remove(IFigure)` instead. This method will be removed after the 2027-09 release.
org.eclipse.draw2d.PrintOperation.getFreshPrinterGraphics()
Use `PrintOperation.getFreshGraphics()` instead. This method will be removed after the 2027-06 release.
org.eclipse.draw2d.PrintOperation.setupGraphicsForPage(PrinterGraphics)
Use `PrintOperation.setupGraphicsForPage(Graphics)` instead. This method will be removed after the 2027-06 release.
org.eclipse.draw2d.ScrollPane.getView()
use getContents()
org.eclipse.draw2d.ScrollPane.setView(IFigure)
call setContents(IFigure) instead
org.eclipse.draw2d.ToolbarLayout.getStretchMinorAxis()
Use `ToolbarLayout.isStretchMinorAxis()` instead. This method will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.setMatchWidth(boolean)
use `ToolbarLayout.setStretchMinorAxis(boolean)`. This method will be removed after the 2027-09 release.
org.eclipse.draw2d.ToolbarLayout.setVertical(boolean)
Use `OrderedLayout.setHorizontal(boolean)` with argument `false` instead. This method will be removed after the 2027-09 release.

Deprecated Constructors
Constructor
Description
org.eclipse.draw2d.geometry.Point(double, double)
Use `PrecisionPoint` or `Point(int, int)` instead.
org.eclipse.draw2d.graph.VirtualNode(Edge, int)
This class is for internal use only.
org.eclipse.draw2d.MouseEvent(int, int, EventDispatcher, IFigure, int, int)
Use `MouseEvent(EventDispatcher, IFigure, org.eclipse.swt.events.MouseEvent)` instead.