<@doc alias="in" hierarchy="GMLDOM"> An inbound port through which data or execution enter a component. (c) SAP AG 2003-2006. All rights reserved. #ALIAS[g=core.svg:GmlDrawing] #INCLUDE[svg:defs.inc] /////////////////////////////////////////////////////////////////////// // CLASS HEADER Class Inport inherit DataPort; metadata title = '#TEXT[XTIT_IN_PORT]'; metadata descr = '#TEXT[XTOL_IN_PORT]'; metadata icon16 = '#URL[~res:skins.neutral.symbols.inport16.gif]'; metadata icon32 = '#URL[~res:skins.neutral.symbols.inport32.gif]'; metadata namestem = 'in'; attach svg:Unipolar override { fillColor: '#F3F3F7', strokeColor: '#726F9B', textColor: '#726F9B', geometry: { resizeMode: #[SVG_KEEP_WIDTH|SVG_FIXED_HEIGHT], rotateMode: #[SVG_ROTATE_FULL|SVG_FLIP_VBODY], defWidth: 30, defHeight: 20, minWidth: 60, poleStart: 10, poleEnd: 10, padding: [0,2.5,0,7.5] }, frameParts: [ {type:'path', d:'"M"+@x1+","+@y1+" L"+(@x1+7.5)+",0 "+@x1+","+@y2+" "+@x2+","+@y2+" "+@x2+","+@y1+" Z"', fill:'@fillColor', stroke:'currentColor', 'stroke-width':2} ], bodyParts: [ {type:'text', action:'rename', text:'((@name).length > $ENV.maxNameLength ? (@name).substring(0,$ENV.maxNameLength)+"..." : @name )', x:0, y:3, 'font-size':'80%', fill:'@textColor', 'text-anchor':'middle'} ] } /////////////////////////////////////////////////////////////////////// // PROPERTIES /////////////////////////////////////////////////////////////////////// // METHODS override method onCreate() this.supercall(); this.createElement('core.gml:Outplug', 'plugs', {'@g:symbol':#[SVG_DIAMOND_PIN|SVG_HOLLOW|SVG_NOTEXT]}); end /* // only an example for cloning of the BOInfoshapeUnit. override method onClone(elementsMap, parent, force) //first to the default cloning var copy = this.protocall('core.gml:TransObject'); // default cloning leaves the port points to an existing RefInfoshape. // now create a new, empty ref infoshape for the cloned port // later - when links link the port to other elements, they will be influences as well. copy.createInfoshape(null); //create an empty ref var newRef = copy.getInfoshape() var ref = this.getInfoshape(); if (!ref) return; var bo = ref.getBOInfoshape(); var bou = bo.unit; var ip = ref.unit; // Clone the BOInfoshapeUnit, including create a usage in infoshape pool. // also supply new ID for the BOInfoshapeUnit var newBou = ip.cloneBOInfoshapeUnit(bou , bo.bo_id + 'a'); if (!newBou) return null; var newBo = newBou.getBOInfoshapeElement(); if (newBo&& newRef) newRef.setBOInfoshape(newBo); else return null; return copy; end */