design studio sdk - line with arrow _ scn

3
Getting Started Newsletters Store Products Services & Support About SCN Downloads Industries Training & Education Partnership Developer Center Lines of Business University Alliances Events & Webinars Innovation Log On Join Us Hi, Guest Search the Community Activity Communications Actions Browse SAP BusinessObjects Design Studio Tweet This is my first SDK component made (also my very first blog too), inspired from Design Studio 1.2 SDK Creating a custom line component by David Richardson. It's a very basic component, without any data binding. At first, I tried to make the code easier to read, but I end up almost recreating it from the scratch. First up, the line property Property Name Type Value/Description lineColor color Determines the color of the line. Can accept color name or in HTML RGB (#000000). lineSize int Determines the thickness of the line. Size of the arrow is fixed at 3 * lineSize. lineType String Determines the type of the line (total of 14 type). Can accept input (1 14) only. arrowPos String Determines the position of the arrow. Can accept input (None, Start, End, Both) only. Below is the example of the possible line types: Line Type Example (Arrow: None, Start, End, Both) 1 2 3 4 5 6 7 8 9 10 Design Studio SDK Line with Arrow Posted by Donnie Burhan in SAP BusinessObjects Design Studio on Jun 16, 2015 11:59:13 AM 1 Like

Upload: dong-hai-nguyen

Post on 06-Nov-2015

5 views

Category:

Documents


0 download

DESCRIPTION

Design Studio - Line with arrow

TRANSCRIPT

  • 17/6/2015 DesignStudioSDKLinewithArrow|SCN

    http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/16/designstudiosdklinewitharrow 1/3

    GettingStarted Newsletters Store

    Products Services&Support AboutSCN Downloads

    Industries Training&Education Partnership DeveloperCenter

    LinesofBusiness UniversityAlliances Events&Webinars Innovation

    LogOn JoinUsHi,Guest SearchtheCommunity

    Activity Communications Actions

    Browse

    SAPBusinessObjectsDesignStudio

    Tweet

    ThisismyfirstSDKcomponentmade(alsomyveryfirstblogtoo),inspiredfrom DesignStudio1.2SDKCreatingacustomlinecomponentby DavidRichardson.It'saverybasiccomponent,withoutanydatabinding.Atfirst,Itriedtomakethecodeeasiertoread,butIendupalmostrecreatingitfromthescratch.Firstup,thelineproperty

    PropertyName Type Value/Description

    lineColor color Determinesthecoloroftheline.CanacceptcolornameorinHTMLRGB(#000000).

    lineSize int Determinesthethicknessoftheline.Sizeofthearrowisfixedat3*lineSize.

    lineType String Determinesthetypeoftheline(totalof14type).Canacceptinput(114)only.

    arrowPos String Determinesthepositionofthearrow.Canacceptinput(None,Start,End,Both)only.

    Belowistheexampleofthepossiblelinetypes:

    LineType Example(Arrow:None,Start,End,Both)

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    DesignStudioSDKLinewithArrowPostedbyDonnieBurhaninSAPBusinessObjectsDesignStudioonJun16,201511:59:13AM

    1Like

  • 17/6/2015 DesignStudioSDKLinewithArrow|SCN

    http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/16/designstudiosdklinewitharrow 2/3

    AverageUserRating

    (1rating)

    Tweet

    11

    12

    13

    14

    Lastly,themethodswithincontribution.ztl

    Ithoughtofmakingdiagonallines,butitwouldbekindahardtodosinceIneedtomakesurethatthelineandthearrowswouldn'tgetoutfromthecanvas,whichwillmakeitnotdrawnproperly.MaybeIwillworkonitonthefuture.Youcangetthecomponentfromhere.PleasebearwithitsinceI'mnotfamiliarwithGithubatthemoment.Anyfeedbackisappreciated.

    282Views Categories:SDK Tags:business_objects_design_studio,design_studio,design_studio_sdk

    01. classorg.scn.community.basics.line.LineextendsComponent{02. /*Returnsthecurrentcoloroftheline.*/03. StringgetLineColor(){*04. returnthis.lineColor05. *}06. /*Setsthecurrentcoloroftheline.*/07. voidsetLineColor(/*NewLineColor*/StringnewLineColor){*08. this.lineColor=newLineColor09. *}10. /*Returnsthecurrenttypeoftheline.*/11. StringgetLineType(){*12. returnthis.lineType13. *}14. /*Setsthecurrenttypeoftheline.*/15. voidsetLineType(/*NewLineType*/StringnewLineType){*16. this.lineType=newLineType17. *}18. /*Returnsthecurrentsizeoftheline.*/19. StringgetLineSize(){*20. returnthis.lineSize21. *}22. /*Setsthecurrentsizeoftheline.*/23. voidsetLineSize(/*NewLineSize*/intnewLineSize){*24. this.lineSize=newLineSize25. *}26. /*Returnsthecurrentarrowpositionoftheline.*/27. StringgetArrowPos(){*28. returnthis.arrowPos29. *}30. /*Setsthecurrentarrowpositionoftheline.*/31. voidsetArrowPos(/*NewArrowPosition*/StringnewArrowPos){*32. this.arrowPos=newArrowPos33. *}34. }

    1Like

    2Comments

    Like(0)

    nithyanandamvenuJun16,20152:22PM

    Nicetry

    KarolKaliszJun16,20153:06PM

    HiDonnie,

  • 17/6/2015 DesignStudioSDKLinewithArrow|SCN

    http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/16/designstudiosdklinewitharrow 3/3

    FollowSCNSiteIndex ContactUs SAPHelpPortalPrivacy TermsofUse LegalDisclosure Copyright

    Like(0)

    doyouwanttojoinusintheSCNSDKRepository?Thiscomponentwouldbeaniceextensionintherepoandwillallowotherstouseitdirectly.Karol