@doc alias="elem" hierarchy="GMLDOM" also="NavigationLink, BindLink">
Represents a data mapping between two elements.
A data link may be created between plugs in these cases:
Source plug | Source plug parent | Target plug | Target plug parent
@Outplug | @Configurable | @Inplug | @Usage, @DataPort
Multiple data links can be connected to the same target element.
To override this behavior, override the method @Configurable!canConnectDataPlugs on the target plug's parent element.
(c) SAP AG 2003-2006. All rights reserved.
#INCLUDE[svg:defs.inc]
#ALIAS[g=core.svg:GmlDrawing]
///////////////////////////////////////////////////////////////////////
// CLASS HEADER
Class DataLink inherit EventLink;
metadata title = '#TEXT[XTIT_DATA_LINK]';
metadata descr = '#TEXT[XTOL_DATA_LINK]';
attach svg:OrthogonalLine override {
arrowHead: #[SVG_BLOCK_ARROW|SVG_FILLED],
cornerRadius: 5
}
///////////////////////////////////////////////////////////////////////
// PROPERTIES
property navigable = false;
metadata for navigable = {
editor: 'check',
group: 'Behavior',
label: 'Navigation',
visible: 'ISA(data, "core.gml:DataLink")',
priority: 200
}
///////////////////////////////////////////////////////////////////////
// METHODS
///////////////////////////////////////////////////////////////////////
// LISTENERS
listen onUpdateObject for core.gml:DataLink
if(evt.name != 'navigable') return;
evt.object.setProperty('@g:arrowHead', this.navigable? #[SVG_CLASSIC_ARROW|SVG_FILLED] :
#[SVG_BLOCK_ARROW|SVG_FILLED]);
end
listen onUpdateObject for core.gml:DataLink
if(evt.name != 'eventName') return;
evt.object.setProperty('name', evt.value); //event is also link's name
end