Implementando automated linked objects con Delphi parte III

Si observamos la aplicación, nos aparecen las propiedades del enlace de la siguiente manera:

Aquí os dejo también la definición de la clase TConnector:
type
TVertexList = class(TObjectList)
protected
function GetItem(Index: Integer): TVertex; overload;
procedure SetItem(Index: Integer; AObject: TVertex);
public
property Items[Index: Integer]: TVertex read GetItem write SetItem; default;
end;
TConnector = class(TPersistent)
private
vertexList: TVertexList;
Fcolor: TColor;
FPenWidth: integer;
FSelectedColor: TColor;
FSelected: boolean;
procedure Setcolor(const Value: TColor);
procedure SetPenWidth(const Value: integer);
procedure SetSelected(const Value: boolean);
procedure SetSelectedColor(const Value: TColor);
published
property color: TColor read Fcolor write Setcolor;
property PenWidth: integer read FPenWidth write SetPenWidth;
property SelectedColor: TColor read FSelectedColor write SetSelectedColor;
public
property Selected: boolean read FSelected write SetSelected;
constructor Create(color: TColor; SelectedColor: TColor);
procedure Add(vertex: TVertex);
function isInside(vertex: TVertex): boolean;
procedure EmptyList();
destructor Destroy(); override;
end;
Palabras de búsqueda:
Connect two objects.
Draw line between two points
Draw connector
- Enlaces de interés:
Algorithmic Geometry.
Comments
Post a Comment