dvt.AfMarker=function(){this.Init()};dvt.Obj.createSubclass(dvt.AfMarker,dvt.AfComponent,"dvt.AfMarker");dvt.AfMarker.TAG_NAME="mk";dvt.AfComponentFactory.registerComponent(dvt.AfMarker.TAG_NAME,dvt.AfMarker);dvt.AfMarker.MARKER_LABEL_PADDING=2;dvt.AfMarker.ATTR_LABEL_DISPLAY="labelDisplay";dvt.AfMarker.ATTR_LABEL_POSITION="labelPosition";dvt.AfMarker.ATTR_LABEL_STYLE="labelStyle";dvt.AfMarker.ATTR_VALUE="value";dvt.AfMarker.ATTR_SCALE_X="scaleX";dvt.AfMarker.ATTR_SCALE_Y="scaleY";
dvt.AfMarker.ATTR_SHAPE="shape";dvt.AfMarker.ATTR_SHAPE_PATH="shapePath";dvt.AfMarker.ATTR_FILL_COLOR="fillColor";dvt.AfMarker.ATTR_FILL_PATTERN="fillPattern";dvt.AfMarker.ATTR_GRADIENT_EFFECT="gradientEffect";dvt.AfMarker.ATTR_OPACITY="opacity";dvt.AfMarker.ATTR_WIDTH="width";dvt.AfMarker.ATTR_HEIGHT="height";dvt.AfMarker.ATTR_X="x";dvt.AfMarker.ATTR_Y="y";dvt.AfMarker.ATTR_BORDER_STYLE="borderStyle";dvt.AfMarker.ATTR_BORDER_WIDTH="borderWidth";dvt.AfMarker.ATTR_BORDER_COLOR="borderColor";
dvt.AfMarker.ATTR_BORDER_RADIUS="borderRadius";dvt.AfMarker.ATTR_SOURCE="source";dvt.AfMarker.ATTR_SOURCE_HOVER="sourceHover";dvt.AfMarker.ATTR_SOURCE_SELECTED="sourceSelected";dvt.AfMarker.ATTR_SOURCE_HOVER_SELECTED="sourceHoverSelected";dvt.AfMarker.ATTR_HAS_ACTION_LISTENER="hasActionListener";dvt.AfMarker._BI_DEFAULT_MARKER_SIZE=9;dvt.AfMarker.CIRCLE="c";dvt.AfMarker.SQUARE="s";dvt.AfMarker.DIAMOND="d";dvt.AfMarker.TRIANGLE_UP="tu";dvt.AfMarker.TRIANGLE_DOWN="td";dvt.AfMarker.PLUS="p";
dvt.AfMarker.HUMAN="h";dvt.AfMarker.RECTANGLE="r";dvt.AfMarker.ROUNDED_RECT="rr";dvt.AfMarker._markerTypeMap={c:dvt.SimpleMarker.CIRCLE,s:dvt.SimpleMarker.SQUARE,d:dvt.SimpleMarker.DIAMOND,tu:dvt.SimpleMarker.TRIANGLE_UP,td:dvt.SimpleMarker.TRIANGLE_DOWN,p:dvt.SimpleMarker.PLUS,h:dvt.SimpleMarker.HUMAN,r:dvt.SimpleMarker.RECTANGLE,rr:dvt.SimpleMarker.RECTANGLE};
dvt.AfMarker._markerFillPatternMap={smallDiagonalLeft:dvt.PatternFill.SM_DIAG_UP_LT,largeDiagonalLeft:dvt.PatternFill.LG_DIAG_UP_LT,smallDiagonalRight:dvt.PatternFill.SM_DIAG_UP_RT,largeDiagonalRight:dvt.PatternFill.LG_DIAG_UP_RT,smallCrosshatch:dvt.PatternFill.SM_CROSSHATCH,largeCrosshatch:dvt.PatternFill.LG_CROSSHATCH,smallChecker:dvt.PatternFill.SM_CHECK,largeChecker:dvt.PatternFill.LG_CHECK,smallTriangle:dvt.PatternFill.SM_TRIANGLE_CHECK,largeTriangle:dvt.PatternFill.LG_TRIANGLE_CHECK,smallDiamond:dvt.PatternFill.SM_DIAMOND_CHECK,
largeDiamond:dvt.PatternFill.LG_DIAMOND_CHECK};dvt.AfMarker.prototype.getShape=function(){return this.getProperty(dvt.AfMarker.ATTR_SHAPE)};dvt.AfMarker.prototype.setShape=function(a){this.setProperty(dvt.AfMarker.ATTR_SHAPE,a)};dvt.AfMarker.prototype.getShapePath=function(){return this.getProperty(dvt.AfMarker.ATTR_SHAPE_PATH)};dvt.AfMarker.prototype.setShapePath=function(a){this.setProperty(dvt.AfMarker.ATTR_SHAPE_PATH,a)};dvt.AfMarker.prototype.getValue=function(){return this.getProperty(dvt.AfMarker.ATTR_VALUE)};
dvt.AfMarker.prototype.setValue=function(a){this.setProperty(dvt.AfMarker.ATTR_VALUE,a)};dvt.AfMarker.prototype.getFillColor=function(){return this.getProperty(dvt.AfMarker.ATTR_FILL_COLOR)};dvt.AfMarker.prototype.setFillColor=function(a){this.setProperty(dvt.AfMarker.ATTR_FILL_COLOR,a)};dvt.AfMarker.prototype.getFillPattern=function(){return this.getProperty(dvt.AfMarker.ATTR_FILL_PATTERN)};dvt.AfMarker.prototype.setFillPattern=function(a){this.setProperty(dvt.AfMarker.ATTR_FILL_PATTERN,a)};
dvt.AfMarker.prototype.getScaleX=function(){return this.getProperty(dvt.AfMarker.ATTR_SCALE_X)};dvt.AfMarker.prototype.setScaleX=function(a){this.setProperty(dvt.AfMarker.ATTR_SCALE_X,a)};dvt.AfMarker.prototype.getScaleY=function(){return this.getProperty(dvt.AfMarker.ATTR_SCALE_Y)};dvt.AfMarker.prototype.setScaleY=function(a){this.setProperty(dvt.AfMarker.ATTR_SCALE_Y,a)};dvt.AfMarker.prototype.getLabelStyle=function(){return this.getProperty(dvt.AfMarker.ATTR_LABEL_STYLE)};
dvt.AfMarker.prototype.setLabelStyle=function(a){this.setProperty(dvt.AfMarker.ATTR_LABEL_STYLE,a)};dvt.AfMarker.prototype.getLabelPosition=function(){return this.getProperty(dvt.AfMarker.ATTR_LABEL_POSITION)};dvt.AfMarker.prototype.setLabelPosition=function(a){this.setProperty(dvt.AfMarker.ATTR_LABEL_POSITION,a)};dvt.AfMarker.prototype.getLabelDisplay=function(){return this.getProperty(dvt.AfMarker.ATTR_LABEL_DISPLAY)};
dvt.AfMarker.prototype.setLabelDisplay=function(a){this.setProperty(dvt.AfMarker.ATTR_LABEL_DISPLAY,a)};dvt.AfMarker.prototype.getGradientEffect=function(){return this.getProperty(dvt.AfMarker.ATTR_GRADIENT_EFFECT)};dvt.AfMarker.prototype.setGradientEffect=function(a){this.setProperty(dvt.AfMarker.ATTR_GRADIENT_EFFECT,a)};dvt.AfMarker.prototype.getOpacity=function(){return this.getProperty(dvt.AfMarker.ATTR_OPACITY)};
dvt.AfMarker.prototype.setOpacity=function(a){this.setProperty(dvt.AfMarker.ATTR_OPACITY,a)};dvt.AfMarker.prototype.getBorderStyle=function(){return this.getProperty(dvt.AfMarker.ATTR_BORDER_STYLE)};dvt.AfMarker.prototype.setBorderStyle=function(a){this.setProperty(dvt.AfMarker.ATTR_BORDER_STYLE,a)};dvt.AfMarker.prototype.getBorderWidth=function(){return this.getFloatProp(dvt.AfMarker.ATTR_BORDER_WIDTH)};
dvt.AfMarker.prototype.setBorderWidth=function(a){this.setProperty(dvt.AfMarker.ATTR_BORDER_WIDTH,a)};dvt.AfMarker.prototype.getBorderColor=function(){return this.getProperty(dvt.AfMarker.ATTR_BORDER_COLOR)};dvt.AfMarker.prototype.setBorderColor=function(a){this.setProperty(dvt.AfMarker.ATTR_BORDER_COLOR,a)};dvt.AfMarker.prototype.getBorderRadius=function(){return this.getProperty(dvt.AfMarker.ATTR_BORDER_RADIUS)};
dvt.AfMarker.prototype.setBorderRadius=function(a){this.setProperty(dvt.AfMarker.ATTR_BORDER_RADIUS,a)};dvt.AfMarker.prototype.getWidth=function(){return this.getFloatProp(dvt.AfMarker.ATTR_WIDTH)};dvt.AfMarker.prototype.setWidth=function(a){this.setProperty(dvt.AfMarker.ATTR_WIDTH,a)};dvt.AfMarker.prototype.getHeight=function(){return this.getFloatProp(dvt.AfMarker.ATTR_HEIGHT)};dvt.AfMarker.prototype.setHeight=function(a){this.setProperty(dvt.AfMarker.ATTR_HEIGHT,a)};
dvt.AfMarker.prototype.getSource=function(){return this.getProperty(dvt.AfMarker.ATTR_SOURCE)};dvt.AfMarker.prototype.setSource=function(a){this.setProperty(dvt.AfMarker.ATTR_SOURCE,a)};dvt.AfMarker.prototype.getSourceHover=function(){return this.getProperty(dvt.AfMarker.ATTR_SOURCE_HOVER)};dvt.AfMarker.prototype.setSourceHover=function(a){this.setProperty(dvt.AfMarker.ATTR_SOURCE_HOVER,a)};dvt.AfMarker.prototype.getSourceSelected=function(){return this.getProperty(dvt.AfMarker.ATTR_SOURCE_SELECTED)};
dvt.AfMarker.prototype.setSourceSelected=function(a){this.setProperty(dvt.AfMarker.ATTR_SOURCE_SELECTED,a)};dvt.AfMarker.prototype.getSourceHoverSelected=function(){return this.getProperty(dvt.AfMarker.ATTR_SOURCE_HOVER_SELECTED)};dvt.AfMarker.prototype.setSourceHoverSelected=function(a){this.setProperty(dvt.AfMarker.ATTR_SOURCE_HOVER_SELECTED,a)};dvt.AfMarker.prototype.getX=function(){return this.getFloatProp(dvt.AfMarker.ATTR_X,0)};
dvt.AfMarker.prototype.getY=function(){return this.getFloatProp(dvt.AfMarker.ATTR_Y,0)};
dvt.AfMarker.prototype.createDisplayObj=function(a){if(!this.renderMe())return null;this._parentNode=a.getParentNode();this.setAfContext(a);var b=this.getDvtContext();this.registerAsTabStop();this.SaveContextCallback();var c=this._getUniqueId(),d=this.getWidth(),e=this.getHeight(),f=0,g=0;d&&!e?e=d:!d&&e?d=e:d||e||(e=d=dvt.AfMarker._BI_DEFAULT_MARKER_SIZE);var h=this.getScaleX(),k=this.getScaleY(),d=h?h*d:d,e=k?k*e:e,l,h=this.getSource(),k=this.getShapePath();h?(k=[h,this.getSourceSelected(),this.getSourceHover(),
this.getSourceHoverSelected()],l=this.getBorderRadius()):k?(f=this.getX(),g=this.getY()):(h=this.getShape(),h||(h=dvt.AfMarker.CIRCLE),l=this.getBorderRadius(),l||h!=dvt.AfMarker.ROUNDED_RECT||(l=dvt.SimpleMarker.DEFAULT_BORDER_RADIUS),k=dvt.AfMarker._markerTypeMap[h]);var m=f+.5*d,n=g+.5*e,g=this.getBorderStyle(),h=!this.getShapePath()&&g&&"none"!=g,f=this.getBorderWidth();h&&(f=f?f:1,d-=f,e-=f);k instanceof Array?(d=new dvt.ImageMarker(b,m,n,d,e,l,k[0],k[1],k[2],k[3]),d.setPreserveAspectRatio("none")):
d=new dvt.SimpleMarker(b,k,a.getSkinName(),m,n,d,e,l,!1);e=this.getProperty(dvt.AfMarker.ATTR_HAS_ACTION_LISTENER);if(!e){k=this.getShowPopupBehaviors();if(dvt.ArrayUtils.isArray(k))for(l=0;l<k.length;l++)if(k[l]&&"click"==k[l].getTriggerType()){e=!0;break}if(!e&&(k=this.getClientBehaviors(),dvt.ArrayUtils.isArray(k)))for(l=0;l<k.length;l++)if(k[l]&&"click"==k[l].getTriggerType()){e=!0;break}}d.setCursor(e?dvt.SelectionEffectUtils.getSelectingCursor():null);d._prop=this._prop;e=this.getFillColor();
l=this.getOpacity();k=this.getGradientEffect();(m=this.getFillPattern())&&(m=dvt.AfMarker._markerFillPatternMap[m]);m?d.setFill(new dvt.PatternFill(m,e)):"auto"==k?d.setFill(dvt.MarkerGradient.createMarkerGradient(e?e:"#000000",d,l?l:1)):(e||l)&&d.setSolidFill(e,l);h&&(h=this.getBorderColor(),f=new dvt.SolidStroke(h?h:"#000000",1,f),f.setType(dvt.Stroke.convertTypeString(g)),d.setStroke(f));this._marker=d;g=this.getValue();f=this.getLabelDisplay()&&"off"===this.getLabelDisplay()?!1:!0;g&&f?(g=new dvt.OutputText(b,
g,0,0,c+"_lb"),f=this.getLabelStyle(),(a=dvt.AfComponentFactory.CACHE_STYLES?a.GetCSSStyle(this.getTagName(),"",f,!0):f?this.createTextStyles(new dvt.CSSStyle(f),dvt.AfStyleUtils.getDefaultTextStyle()):dvt.AfStyleUtils.getDefaultTextStyle())&&g.setCSSStyle(a),this._label=g,b=new dvt.Container(b,c),"top"===this.getLabelPosition()?(b.addChild(g),b.addChild(d)):(b.addChild(d),b.addChild(g)),this._bgShape=b):this._bgShape=d;this._bgShape._afComp=this;return this._bgShape};
dvt.AfMarker.prototype.getMarkerDisplayObj=function(){return this._marker};dvt.AfMarker.prototype.setTranslateX=function(a){this._bgShape.setTranslateX(a)};dvt.AfMarker.prototype.setTranslateY=function(a){this._bgShape.setTranslateY(a)};
dvt.AfMarker.prototype.render=function(a){if(this.renderMe()){var b=this.getDisplayObj();(this.getShortDesc()||this.getProperty(dvt.AfMarker.ATTR_HAS_ACTION_LISTENER)||this.getShowPopupBehaviors()||this.getClientBehaviors())&&this.associate(b,this);var c=this._marker,d=this._label,e=c.getDimensionsWithStroke(),b=this.getX(),f=this.getY(),g=e.w,e=e.h;if(d)if(0===g&&0===e)this._setBounds(a,b,f,0,0);else{var h=d.getDimensions();switch(this.getLabelPosition()){case "top":g>h.w?(d.setX(g/2),d.alignCenter()):
c.setCx(h.w/2);c.setCy(h.h+dvt.AfMarker.MARKER_LABEL_PADDING+e/2);c=Math.max(g,h.w);d=h.h+dvt.AfMarker.MARKER_LABEL_PADDING+e;break;case "bottom":g>h.w?(d.setX(g/2),d.alignCenter()):c.setCx(h.w/2);d.setY(e+dvt.AfMarker.MARKER_LABEL_PADDING);c=Math.max(g,h.w);d=e+dvt.AfMarker.MARKER_LABEL_PADDING+h.h;break;case "left":e>h.h?(d.setY(e/2),d.alignMiddle()):c.setCy(h.h/2);c.setCx(h.w+dvt.AfMarker.MARKER_LABEL_PADDING+g/2);c=h.w+dvt.AfMarker.MARKER_LABEL_PADDING+g;d=Math.max(e,h.h);break;case "right":e>
h.h?(d.setY(e/2),d.alignMiddle()):c.setCy(h.h/2);d.setX(g+dvt.AfMarker.MARKER_LABEL_PADDING);c=g+dvt.AfMarker.MARKER_LABEL_PADDING+h.w;d=Math.max(e,h.h);break;default:g>h.w?(d.setX(g/2),d.alignCenter()):c.setCx(h.w/2),e>h.h?(d.setY(e/2),d.alignMiddle()):c.setCy(h.h/2),c=Math.max(g,h.w),d=Math.max(e,h.h)}this._setBounds(a,b,f,c,d)}else this._setBounds(a,b,f,g,e)}};dvt.AfMarker.prototype.getTagName=function(){return dvt.AfMarker.TAG_NAME};dvt.AfMarker.prototype.GetDefaultStyles=function(){return dvt.AfMarker._afStyles};
dvt.AfMarker.prototype.SetDefaultStyles=function(a){dvt.AfMarker._afStyles=a};dvt.AfMarker.prototype._render=function(a,b){if(this.renderMe()){var c=this.getDisplayObj();(this.getShortDesc()||this.getProperty(dvt.AfMarker.ATTR_HAS_ACTION_LISTENER)||this.getShowPopupBehaviors()||this.getClientBehaviors())&&this.associate(c,this);dvt.AfComponent._renderComp(this.getAfContext(),this,a,b)}};dvt.AfMarker.prototype.renderSelfBeforeChildren=function(){};
dvt.AfMarker.prototype._setBounds=function(a,b,c,d,e){this._dim=new dvt.Rectangle(b,c,d,e);this._addClipPathIfNeeded(a,0,0,a.getAvailableWidth(),this._dim.w,a.getAvailableHeight(),this._dim.h)};dvt.AfMarker.prototype.isCommandComponent=function(){return!0};dvt.AfMarker.prototype.isClickEventPropagationStopped=function(){return this.getProperty(dvt.AfMarker.ATTR_HAS_ACTION_LISTENER)};dvt.AfMarker.prototype.registerAsTabStop=function(){this.getAfContext().registerTabStop(this)};
dvt.AfMarker.prototype.GetClipPathDimensions=function(){var a=this.getAfContext();return new dvt.Rectangle(0,0,Math.min(a.getAvailableWidth(),this._dim.w),Math.min(a.getAvailableHeight(),this._dim.h))};dvt.AfMarker.convertShapeString=function(a){return dvt.AfMarker._markerTypeMap[a]};