@doc hierarchy="GMLDOM" also="@Outport">
An object representing a reference to a Configurable element that resides within the same unit.
(c) SAP AG 2004. All rights reserved.
#ALIAS[g=core.svg:GmlDrawing]
#INCLUDE[svg:defs.inc]
///////////////////////////////////////////////////////////////////////
// CLASS HEADER
Class DirectPlug inherit Plug;
metadata icon16 = '#URL[~res:skins.neutral.symbols.outplug16.gif]';
attach svg:QPin override {
symbol: #[SVG_CIRCLE_PIN|SVG_NOTEXT]
};
override virtual readonly property dir = #[DIR_IO];
///////////////////////////////////////////////////////////////////////
// PUBLIC METHODS
///////////////////////////////////////////////////////////////////////
// PRIVATE METHODS
override method getTooltip(textScale)
return null;
end
override method onCreate()
this.supercall();
this.port = null; //readonly, cannot use setProperty
end
///////////////////////////////////////////////////////////////////////
// EVENT LISTENERS
// Every element that can contain a DirectPlug - can contain only one of these
listen canInsertElement for gml:Unit
// elements that are not DirecPlugs
if (!evt.child.isa('core.gml:DirectPlug'))
return true;
return ISEMPTY(evt.object.getPlugsByClass('core.gml:DirectPlug')); //only allow to insert one direct plug if there are no DirectPlug children
end
<@doc>
Queries whether the current plug can be multiple connected .
Return ~true iff the plug can multiple connected
override method canMultipleConnect()
return true;
end