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