1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613 |
- /**
- * $Id: mxMockupiOS.js,v 1.5 2013/11/12 06:25:46 mate Exp $
- * Copyright (c) 2006-2010, JGraph Ltd
- */
- var mxMockupC =
- {
- BAR_HEIGHT : 'barHeight',
- BAR_POS : 'barPos',
- BG_STYLE : 'bgStyle',
- BG_FLAT_GREEN : 'bgGreen',
- BG_FLAT_WHITE : 'bgWhite',
- BG_FLAT_GRAY : 'bgGray',
- BG_FLAT_CUSTOM : 'bgFlat',
- BG_MAP : 'bgMap',
- BG_STRIPED : 'bgStriped',
- BUTTON_STYLE : 'buttonStyle',
- BUTTON_TEXT : 'buttonText',
- BUTTON_STATE : 'buttonState',
- CHEVRON : 'chevron',
- GRID_SIZE : 'gridSize',
- POINTER_BOTTOM : 'bottom',
- POINTER_POS : 'pointerPos',
- POINTER_TOP : 'top',
- ROUND : 'round',
- SELECTED : '+', //has to be one character long
- STATE_ON : 'on',
- STATE_OFF : 'off',
- SUB_TEXT : 'subText',
-
- SHAPE_IADD_ICON : 'mxgraph.ios.iAddIcon',
- SHAPE_IALERT_BOX : 'mxgraph.ios.iAlertBox',
- SHAPE_IALPHA_LIST : 'mxgraph.ios.iAlphaList',
- SHAPE_IAPP_BAR : 'mxgraph.ios.iAppBar',
- SHAPE_IARROW_ICON : 'mxgraph.ios.iArrowIcon',
- SHAPE_IBG_FLAT : 'mxgraph.ios.iBgFlat',
- SHAPE_IBG_MAP : 'mxgraph.ios.iBgMap',
- SHAPE_IBG_STRIPED : 'mxgraph.ios.iBgStriped',
- SHAPE_IBUTTON : 'mxgraph.ios.iButton',
- SHAPE_IBUTTON_BACK : 'mxgraph.ios.iButtonBack',
- SHAPE_IBUTTON_FORWARD : 'mxgraph.ios.iButtonFw',
- SHAPE_IBUTTON_BAR : 'mxgraph.ios.iButtonBar',
- SHAPE_ICALL_BUTTONS : 'mxgraph.ios.iCallButtons',
- SHAPE_ICALL_DIALOG : 'mxgraph.ios.iCallDialog',
- SHAPE_ICHECKBOX_GROUP : 'mxgraph.ios.iCheckboxGroup',
- SHAPE_ICHECK_ICON : 'mxgraph.ios.iCheckIcon',
- SHAPE_ICLOUD_PROGRESS_BAR : 'mxgraph.ios.iCloudProgressBar',
- SHAPE_ICOMBO_BOX : 'mxgraph.ios.iComboBox',
- SHAPE_ICOPY : 'mxgraph.ios.iCopy',
- SHAPE_ICOPY_AREA : 'mxgraph.ios.iCopyArea',
- SHAPE_IICON_GRID : 'mxgraph.ios.iIconGrid',
- SHAPE_IDELETE_APP : 'mxgraph.ios.iDeleteApp',
- SHAPE_IDELETE_ICON : 'mxgraph.ios.iDeleteIcon',
- SHAPE_IDOWNLOAD_BAR : 'mxgraph.ios.iDownloadBar',
- SHAPE_IDIALOG_BOX : 'mxgraph.ios.iDialogBox',
- SHAPE_IDIRECTION : 'mxgraph.ios.iDir',
- SHAPE_IHOME_PAGE_CONTROL : 'mxgraph.ios.iHomePageControl',
- SHAPE_IKEYB_LETTERS : 'mxgraph.ios.iKeybLett',
- SHAPE_IKEYB_NUMBERS : 'mxgraph.ios.iKeybNumb',
- SHAPE_IKEYB_SYMBOLS : 'mxgraph.ios.iKeybSymb',
- SHAPE_ILOCATION_BAR : 'mxgraph.ios.iLocBar',
- SHAPE_ILOCK_BUTTON : 'mxgraph.ios.iLockButton',
- SHAPE_IHOR_BUTTON_BAR : 'mxgraph.ios.iHorButtonBar',
- SHAPE_IINFO_ICON : 'mxgraph.ios.iInfoIcon',
- SHAPE_ION_OFF_BUTTON : 'mxgraph.ios.iOnOffButton',
- SHAPE_IOPTION : 'mxgraph.ios.iOption',
- SHAPE_IPAGE_CONTROL : 'mxgraph.ios.iPageControl',
- SHAPE_IPAD : 'mxgraph.ios.iPad',
- SHAPE_IPHONE : 'mxgraph.ios.iPhone',
- SHAPE_IPIN : 'mxgraph.ios.iPin',
- SHAPE_IPREV_NEXT : 'mxgraph.ios.iPrevNext',
- SHAPE_IPROGRESS_BAR : 'mxgraph.ios.iProgressBar',
- SHAPE_IRADIO_GROUP : 'mxgraph.ios.iRadioGroup',
- SHAPE_ISLIDER : 'mxgraph.ios.iSlider',
- SHAPE_ISORT_FIND_ICON : 'mxgraph.ios.iSortFindIcon',
- SHAPE_ITEXT_INPUT : 'mxgraph.ios.iTextInput',
- SHAPE_ITOP_BAR : 'mxgraph.ios.iTopBar',
- SHAPE_ITOP_BAR_LOCKED : 'mxgraph.ios.iTopBarLocked',
- SHAPE_IURL_BAR : 'mxgraph.ios.iURLBar',
- SHAPE_IVIDEO_CONTROLS : 'mxgraph.ios.iVideoControls',
- SHAPE_ISCREEN_NAME_BAR: 'mxgraph.ios.iScreenNameBar',
-
- STYLE_FILLCOLOR2 : 'fillColor2',
- STYLE_FILLCOLOR3 : 'fillColor3',
- STYLE_TEXTCOLOR : 'textColor',
- STYLE_TEXTCOLOR2 : 'textColor2',
- STYLE_STROKECOLOR2 : 'strokeColor2',
- STYLE_STROKECOLOR3 : 'strokeColor3'
- };
- //**********************************************************************************************************************************************************
- //iPhone Vertical
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiPhone(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiPhone, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiPhone.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var rSize = 25;
- this.background(c, x, y, w, h, rSize);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, rSize);
- };
- mxShapeMockupiPhone.prototype.background = function(c, x, y, w, h, rSize)
- {
- c.setFillColor('#000000');
- c.setStrokeColor('#000000');
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.fillAndStroke();
- };
- mxShapeMockupiPhone.prototype.foreground = function(c, x, y, w, h, rSize)
- {
- c.setStrokeWidth(1.5);
- c.begin();
- c.setGradient('#808080', '#000000', w * 0.325, 0, w * 0.675, h * 0.5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.moveTo(w * 0.325, 0);
- c.lineTo(w - rSize, 0);
- // c.quadTo(w, 0, w, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h * 0.5);
- c.lineTo(w * 0.7, h * 0.5);
- c.close();
- c.fill();
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '');
- var bgStyle = mxUtils.getValue(this.style, mxMockupC.BG_STYLE, mxMockupC.BG_FLAT_GREEN);
- c.setStrokeWidth(1);
- if (bgStyle === mxMockupC.BG_FLAT_WHITE)
- {
- c.setFillColor('#ffffff');
- c.rect(w * 0.0625, h * 0.15, w * 0.875, h * 0.7);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_FLAT_GREEN)
- {
- c.setFillColor('#1f2923');
- c.rect(w * 0.0625, h * 0.15, w * 0.875, h * 0.7);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_FLAT_GRAY)
- {
- c.setFillColor('#dddddd');
- c.rect(w * 0.0625, h * 0.15, w * 0.875, h * 0.7);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_FLAT_CUSTOM)
- {
- c.setFillColor(fillColor);
- c.rect(w * 0.0625, h * 0.15, w * 0.875, h * 0.7);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_STRIPED)
- {
- var xOld = x;
- var yOld = y;
- var wOld = w;
- var hOld = h;
- c.translate(w * 0.0625, h * 0.15);
- w = w * 0.875;
- h = h * 0.7;
- c.setFillColor('#5D7585');
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- var strokeColor = '#18211b';
- var strokeColor2 = '#657E8F';
- c.setStrokeColor(strokeColor2);
- var i = 5;
- c.begin();
- while (i < w)
- {
- c.moveTo(i, 0);
- c.lineTo(i, h);
- i = i + 5;
- }
- c.stroke();
- c.setStrokeColor(strokeColor);
- c.begin();
- c.rect(0, 0, w, h);
- c.stroke();
- w = wOld;
- h = hOld;
- c.translate( - w * 0.0625, - h * 0.15);
- }
- else if (bgStyle === mxMockupC.BG_MAP)
- {
- var xOld = x;
- var yOld = y;
- var wOld = w;
- var hOld = h;
- c.translate(w * 0.0625, h * 0.15);
- w = w * 0.875;
- h = h * 0.7;
- c.setFillColor('#ffffff');
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- var fillColor2 = '#96D1FF';
- var strokeColor = '#18211b';
- var strokeColor2 = '#008cff';
- c.setFillColor(fillColor2);
- c.setStrokeColor(strokeColor2);
- c.setStrokeWidth(1);
- c.begin();
- c.moveTo(0, 0);
- c.lineTo(w * 0.1171, 0);
- c.lineTo(w * 0.1136, h * 0.0438);
- c.lineTo(w * 0.0993, h * 0.054);
- c.lineTo(0, h * 0.0446);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1993, 0);
- c.lineTo(w * 0.1914, h * 0.03884);
- c.lineTo(w * 0.1536, h * 0.0362);
- c.lineTo(w * 0.1586, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.24, 0);
- c.lineTo(w * 0.2257, h * 0.054);
- c.lineTo(w * 0.2414, h * 0.0674);
- c.lineTo(w * 0.4707, h * 0.0835);
- c.lineTo(w * 0.5264, h * 0.0906);
- c.lineTo(w * 0.6429, h * 0.0929);
- c.arcTo(w * 0.0857, h * 0.0536, 0, 0, 0, w * 0.7193, h * 0.0621);
- c.arcTo(w * 0.48, h * 0.2143, 0, 0, 0, w * 0.7286, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8, 0);
- c.lineTo(w * 0.7886, h * 0.04554);
- c.arcTo(w * 0.0857, h * 0.0536, 0, 0, 0, w * 0.8164, h * 0.0875);
- c.arcTo(w * 0.1429, h * 0.0893, 0, 0, 0, w * 0.88, h * 0.1036);
- c.lineTo(w, h * 0.1112);
- c.lineTo(w, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.0933);
- c.lineTo(w * 0.08, h * 0.1036);
- c.lineTo(w * 0.1021, h * 0.1246);
- c.lineTo(w * 0.1007, h * 0.1768);
- c.lineTo(w * 0.0471, h * 0.2241);
- c.lineTo(0, h * 0.2527);
- c.close();
- c.fillAndStroke();
- c.ellipse(w * 0.1214, h * 0.0603, w * 0.0843, h * 0.0576);
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1293, h * 0.1924);
- c.lineTo(w * 0.1729, h * 0.142);
- c.lineTo(w * 0.1407, h * 0.1411);
- c.lineTo(w * 0.14, h * 0.1777);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4586, h * 0.1241);
- c.lineTo(w * 0.455, h * 0.1835);
- c.lineTo(w * 0.3893, h * 0.2246);
- c.lineTo(w * 0.2171, h * 0.1362);
- c.lineTo(w * 0.2171, h * 0.1308);
- c.lineTo(w * 0.2293, h * 0.1214);
- c.lineTo(w * 0.2857, h * 0.1174);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5079, h * 0.1134);
- c.lineTo(w * 0.7307, h * 0.1223);
- c.lineTo(w * 0.7279, h * 0.1625);
- c.lineTo(w * 0.715, h * 0.1772);
- c.lineTo(w * 0.6929, h * 0.1688);
- c.lineTo(w * 0.625, h * 0.1795);
- c.lineTo(w * 0.4779, h * 0.2835);
- c.lineTo(w * 0.395, h * 0.2299);
- c.lineTo(w * 0.4657, h * 0.1826);
- c.lineTo(w * 0.4707, h * 0.1223);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.1362);
- c.lineTo(w * 0.7643, h * 0.1237);
- c.lineTo(w * 0.7543, h * 0.1562);
- c.lineTo(w * 0.7643, h * 0.1585);
- c.lineTo(w * 0.9186, h * 0.2366);
- c.lineTo(w, h * 0.1732);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2079, h * 0.1545);
- c.lineTo(w * 0.3886, h * 0.2536);
- c.lineTo(w * 0.3414, h * 0.2933);
- c.lineTo(w * 0.1743, h * 0.1969);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1579, h * 0.2134);
- c.lineTo(w * 0.3221, h * 0.3067);
- c.lineTo(w * 0.2957, h * 0.3237);
- c.lineTo(w * 0.1157, h * 0.2424);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.405, h * 0.2656);
- c.lineTo(w * 0.31, h * 0.3353);
- c.lineTo(w * 0.3693, h * 0.3661);
- c.lineTo(w * 0.4571, h * 0.2982);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.7121, h * 0.1848);
- c.lineTo(w * 0.6879, h * 0.1754);
- c.lineTo(w * 0.6329, h * 0.1844);
- c.lineTo(w * 0.61, h * 0.2018);
- c.lineTo(w * 0.6207, h * 0.2085);
- c.lineTo(w * 0.4986, h * 0.2982);
- c.lineTo(w * 0.535, h * 0.3237);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5557, h * 0.3379);
- c.lineTo(w * 0.7464, h * 0.1826);
- c.lineTo(w * 0.8036, h * 0.2076);
- c.lineTo(w * 0.595, h * 0.3616);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8293, h * 0.2188);
- c.lineTo(w * 0.8979, h * 0.2509);
- c.lineTo(w * 0.6936, h * 0.4125);
- c.lineTo(w * 0.6171, h * 0.3737);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.2138);
- c.lineTo(w * 0.6821, h * 0.4603);
- c.lineTo(w * 0.815, h * 0.5277);
- c.lineTo(w, h * 0.4);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.317);
- c.lineTo(w * 0.0971, h * 0.2554);
- c.lineTo(w * 0.4121, h * 0.4143);
- c.lineTo(w * 0.3736, h * 0.4415);
- c.lineTo(w * 0.315, h * 0.4076);
- c.lineTo(w * 0.3093, h * 0.4116);
- c.lineTo(w * 0.3686, h * 0.4455);
- c.lineTo(w * 0.285, h * 0.5045);
- c.lineTo(w * 0.1114, h * 0.4134);
- c.lineTo(w * 0.025, h * 0.4603);
- c.lineTo(w * 0.0371, h * 0.4723);
- c.lineTo(w * 0.1114, h * 0.4371);
- c.lineTo(w * 0.2871, h * 0.5312);
- c.lineTo(w * 0.1929, h * 0.6058);
- c.lineTo(w * 0.2271, h * 0.6705);
- c.lineTo(w * 0.17, h * 0.7147);
- c.lineTo(w * 0.0314, h * 0.6321);
- c.lineTo(0, h * 0.6246);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.48, h * 0.3121);
- c.lineTo(w * 0.5157, h * 0.3375);
- c.lineTo(w * 0.4314, h * 0.3982);
- c.lineTo(w * 0.3929, h * 0.3786);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3086, h * 0.5179);
- c.lineTo(w * 0.53, h * 0.3518);
- c.lineTo(w * 0.5757, h * 0.3745);
- c.lineTo(w * 0.3479, h * 0.5411);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5964, h * 0.3884);
- c.lineTo(w * 0.6736, h * 0.4277);
- c.lineTo(w * 0.445, h * 0.5991);
- c.lineTo(w * 0.3664, h * 0.5531);
- c.lineTo(w * 0.5057, h * 0.4545);
- c.lineTo(w * 0.5507, h * 0.4754);
- c.lineTo(w * 0.5571, h * 0.4723);
- c.lineTo(w * 0.5114, h * 0.4504);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4793, h * 0.6161);
- c.lineTo(w * 0.6771, h * 0.4643);
- c.lineTo(w * 0.8086, h * 0.5326);
- c.lineTo(w * 0.7471, h * 0.5817);
- c.lineTo(w * 0.7214, h * 0.567);
- c.lineTo(w * 0.715, h * 0.571);
- c.lineTo(w * 0.7421, h * 0.5871);
- c.lineTo(w * 0.6014, h * 0.6933);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.4371);
- c.lineTo(w * 0.8443, h * 0.546);
- c.lineTo(w * 0.9071, h * 0.5701);
- c.lineTo(w, h * 0.5022);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8407, h * 0.5504);
- c.lineTo(w * 0.8993, h * 0.5759);
- c.lineTo(w * 0.6757, h * 0.7416);
- c.lineTo(w * 0.6286, h * 0.7139);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.5321);
- c.lineTo(w * 0.6979, h * 0.7549);
- c.lineTo(w * 0.7457, h * 0.7781);
- c.lineTo(w * 0.9814, h * 0.6094);
- c.lineTo(w, h * 0.6067);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.6254);
- c.lineTo(w * 0.7664, h * 0.792);
- c.lineTo(w * 0.9586, h * 0.9062);
- c.lineTo(w, h * 0.8786);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3093, h * 0.5464);
- c.lineTo(w * 0.4271, h * 0.6152);
- c.lineTo(w * 0.245, h * 0.7643);
- c.lineTo(w * 0.185, h * 0.7228);
- c.lineTo(w * 0.2493, h * 0.6728);
- c.lineTo(w * 0.2214, h * 0.6143);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.65);
- c.lineTo(w * 0.2179, h * 0.7826);
- c.lineTo(w * 0.1136, h * 0.8424);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.7272);
- c.lineTo(w * 0.0821, h * 0.859);
- c.lineTo(0, h * 0.9085);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4529, h * 0.6366);
- c.lineTo(w * 0.575, h * 0.7143);
- c.lineTo(w * 0.39, h * 0.8621);
- c.lineTo(w * 0.2657, h * 0.7902);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.9415);
- c.lineTo(w * 0.1036, h * 0.8821);
- c.lineTo(w * 0.2343, h * 0.959);
- c.lineTo(w * 0.1721, h);
- c.lineTo(0, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2586, h * 0.7951);
- c.lineTo(w * 0.3829, h * 0.8674);
- c.lineTo(w * 0.2543, h * 0.9451);
- c.lineTo(w * 0.1279, h * 0.8692);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2836, h * 0.9639);
- c.lineTo(w * 0.4207, h * 0.8772);
- c.lineTo(w * 0.605, h * 0.7321);
- c.lineTo(w * 0.6521, h * 0.7634);
- c.lineTo(w * 0.3486, h);
- c.lineTo(w * 0.3393, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3879, h);
- c.lineTo(w * 0.6721, h * 0.7759);
- c.lineTo(w * 0.7171, h * 0.7982);
- c.lineTo(w * 0.4564, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4986, h);
- c.lineTo(w * 0.7386, h * 0.8125);
- c.lineTo(w * 0.9307, h * 0.925);
- c.lineTo(w * 0.8264, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8671, h);
- c.lineTo(w * 0.9464, h * 0.9491);
- c.lineTo(w, h * 0.975);
- c.lineTo(w, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2295, h);
- c.lineTo(w * 0.2648, h * 0.9792);
- c.lineTo(w * 0.2981, h);
- c.close();
- c.fillAndStroke();
- w = wOld;
- h = hOld;
- c.translate( - w * 0.0625, - h * 0.15);
- }
- c.setStrokeWidth(1);
- c.setStrokeColor('#18211b');
- c.rect(w * 0.0625, h * 0.15, w * 0.875, h * 0.7);
- c.stroke();
- c.setStrokeWidth(1.5);
- c.setAlpha(0.8);
- c.setStrokeColor('#dddddd');
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.stroke();
- rSize = 22.5;
- c.begin();
- c.setStrokeColor('#666666');
- c.roundrect(5, 5, w - 10, h - 10, rSize, rSize);
- c.stroke();
- c.setAlpha(1);
- c.ellipse(w * 0.4875, h * 0.04125, w * 0.025, h * 0.0125);
- c.setStrokeWidth(2.5);
- c.setStrokeColor('#000000');
- c.setFillColor('#000099');
- c.fillAndStroke();
- c.begin();
- c.setStrokeWidth(1.5);
- c.setFillColor('#444444');
- c.setStrokeColor('#333333');
- rSize = 4;
- c.roundrect(w * 0.375, h * 0.075, w * 0.25, h * 0.01875, w * 0.02, h * 0.01);
- c.fillAndStroke();
- c.setGradient('#bbbbbb', '#000000', w * 0.4, h * 0.875, w * 0.2, h * 0.1, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(w * 0.4, h * 0.875, w * 0.2, h * 0.1);
- c.fill();
- c.setAlpha(0.5);
- c.ellipse(w * 0.404, h * 0.876, w * 0.19, h * 0.095);
- c.stroke();
- c.begin();
- c.setAlpha(0.85);
- c.setFillColor('#000000');
- c.moveTo(w * 0.4025, h * 0.925);
- c.arcTo(w * 0.0975, h * 0.04625, 0, 0, 1, w * 0.5975, h * 0.925);
- c.arcTo(w * 0.2, h * 0.1, 0, 0, 1, w * 0.4025, h * 0.925);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.setAlpha(0.7);
- c.setStrokeWidth(1.5);
- c.setStrokeColor('#dddddd');
- rSize = 4;
- c.roundrect(w * 0.4575, h * 0.905, w * 0.0875, h * 0.04375, h * 0.00625, h * 0.00625);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IPHONE] = mxShapeMockupiPhone;
- //**********************************************************************************************************************************************************
- //iPhone flat colored background
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiBgFlat(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiBgFlat, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiBgFlat.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- };
- mxShapeMockupiBgFlat.prototype.background = function(c, x, y, w, h)
- {
- c.begin();
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IBG_FLAT] = mxShapeMockupiBgFlat;
- //**********************************************************************************************************************************************************
- //iPhone striped background
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiBgStriped(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiBgStriped, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiBgStriped.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiBgStriped.prototype.background = function(c, x, y, w, h)
- {
- c.setStrokeWidth(1);
- c.begin();
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiBgStriped.prototype.foreground = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '');
- var strokeColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_STROKECOLOR2, '');
- c.setStrokeColor(strokeColor2);
- var i = 5;
- c.begin();
- while (i < w)
- {
- c.moveTo(i, 0);
- c.lineTo(i, h);
- i = i + 5;
- }
- c.stroke();
- c.setStrokeColor(strokeColor);
- c.begin();
- c.rect(0, 0, w, h);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IBG_STRIPED] = mxShapeMockupiBgStriped;
- //**********************************************************************************************************************************************************
- //iPhone map background
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiBgMap(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiBgMap, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiBgMap.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiBgMap.prototype.background = function(c, x, y, w, h)
- {
- c.begin();
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiBgMap.prototype.foreground = function(c, x, y, w, h)
- {
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '');
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '');
- var strokeColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_STROKECOLOR2, '');
- c.setFillColor(fillColor2);
- c.setStrokeColor(strokeColor2);
- c.setStrokeWidth(0.5);
- c.begin();
- c.moveTo(0, 0);
- c.lineTo(w * 0.1171, 0);
- c.lineTo(w * 0.1136, h * 0.0438);
- c.lineTo(w * 0.0993, h * 0.054);
- c.lineTo(0, h * 0.0446);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1993, 0);
- c.lineTo(w * 0.1914, h * 0.03884);
- c.lineTo(w * 0.1536, h * 0.0362);
- c.lineTo(w * 0.1586, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.24, 0);
- c.lineTo(w * 0.2257, h * 0.054);
- c.lineTo(w * 0.2414, h * 0.0674);
- c.lineTo(w * 0.4707, h * 0.0835);
- c.lineTo(w * 0.5264, h * 0.0906);
- c.lineTo(w * 0.6429, h * 0.0929);
- c.arcTo(w * 0.0857, h * 0.0536, 0, 0, 0, w * 0.7193, h * 0.0621);
- c.arcTo(w * 0.48, h * 0.2143, 0, 0, 0, w * 0.7286, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8, 0);
- c.lineTo(w * 0.7886, h * 0.04554);
- c.arcTo(w * 0.0857, h * 0.0536, 0, 0, 0, w * 0.8164, h * 0.0875);
- c.arcTo(w * 0.1429, h * 0.0893, 0, 0, 0, w * 0.88, h * 0.1036);
- c.lineTo(w, h * 0.1112);
- c.lineTo(w, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.0933);
- c.lineTo(w * 0.08, h * 0.1036);
- c.lineTo(w * 0.1021, h * 0.1246);
- c.lineTo(w * 0.1007, h * 0.1768);
- c.lineTo(w * 0.0471, h * 0.2241);
- c.lineTo(0, h * 0.2527);
- c.close();
- c.fillAndStroke();
- c.ellipse(w * 0.1214, h * 0.0603, w * 0.0843, h * 0.0576);
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1293, h * 0.1924);
- c.lineTo(w * 0.1729, h * 0.142);
- c.lineTo(w * 0.1407, h * 0.1411);
- c.lineTo(w * 0.14, h * 0.1777);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4586, h * 0.1241);
- c.lineTo(w * 0.455, h * 0.1835);
- c.lineTo(w * 0.3893, h * 0.2246);
- c.lineTo(w * 0.2171, h * 0.1362);
- c.lineTo(w * 0.2171, h * 0.1308);
- c.lineTo(w * 0.2293, h * 0.1214);
- c.lineTo(w * 0.2857, h * 0.1174);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5079, h * 0.1134);
- c.lineTo(w * 0.7307, h * 0.1223);
- c.lineTo(w * 0.7279, h * 0.1625);
- c.lineTo(w * 0.715, h * 0.1772);
- c.lineTo(w * 0.6929, h * 0.1688);
- c.lineTo(w * 0.625, h * 0.1795);
- c.lineTo(w * 0.4779, h * 0.2835);
- c.lineTo(w * 0.395, h * 0.2299);
- c.lineTo(w * 0.4657, h * 0.1826);
- c.lineTo(w * 0.4707, h * 0.1223);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.1362);
- c.lineTo(w * 0.7643, h * 0.1237);
- c.lineTo(w * 0.7543, h * 0.1562);
- c.lineTo(w * 0.7643, h * 0.1585);
- c.lineTo(w * 0.9186, h * 0.2366);
- c.lineTo(w, h * 0.1732);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2079, h * 0.1545);
- c.lineTo(w * 0.3886, h * 0.2536);
- c.lineTo(w * 0.3414, h * 0.2933);
- c.lineTo(w * 0.1743, h * 0.1969);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1579, h * 0.2134);
- c.lineTo(w * 0.3221, h * 0.3067);
- c.lineTo(w * 0.2957, h * 0.3237);
- c.lineTo(w * 0.1157, h * 0.2424);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.405, h * 0.2656);
- c.lineTo(w * 0.31, h * 0.3353);
- c.lineTo(w * 0.3693, h * 0.3661);
- c.lineTo(w * 0.4571, h * 0.2982);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.7121, h * 0.1848);
- c.lineTo(w * 0.6879, h * 0.1754);
- c.lineTo(w * 0.6329, h * 0.1844);
- c.lineTo(w * 0.61, h * 0.2018);
- c.lineTo(w * 0.6207, h * 0.2085);
- c.lineTo(w * 0.4986, h * 0.2982);
- c.lineTo(w * 0.535, h * 0.3237);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5557, h * 0.3379);
- c.lineTo(w * 0.7464, h * 0.1826);
- c.lineTo(w * 0.8036, h * 0.2076);
- c.lineTo(w * 0.595, h * 0.3616);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8293, h * 0.2188);
- c.lineTo(w * 0.8979, h * 0.2509);
- c.lineTo(w * 0.6936, h * 0.4125);
- c.lineTo(w * 0.6171, h * 0.3737);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.2138);
- c.lineTo(w * 0.6821, h * 0.4603);
- c.lineTo(w * 0.815, h * 0.5277);
- c.lineTo(w, h * 0.4);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.317);
- c.lineTo(w * 0.0971, h * 0.2554);
- c.lineTo(w * 0.4121, h * 0.4143);
- c.lineTo(w * 0.3736, h * 0.4415);
- c.lineTo(w * 0.315, h * 0.4076);
- c.lineTo(w * 0.3093, h * 0.4116);
- c.lineTo(w * 0.3686, h * 0.4455);
- c.lineTo(w * 0.285, h * 0.5045);
- c.lineTo(w * 0.1114, h * 0.4134);
- c.lineTo(w * 0.025, h * 0.4603);
- c.lineTo(w * 0.0371, h * 0.4723);
- c.lineTo(w * 0.1114, h * 0.4371);
- c.lineTo(w * 0.2871, h * 0.5312);
- c.lineTo(w * 0.1929, h * 0.6058);
- c.lineTo(w * 0.2271, h * 0.6705);
- c.lineTo(w * 0.17, h * 0.7147);
- c.lineTo(w * 0.0314, h * 0.6321);
- c.lineTo(0, h * 0.6246);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.48, h * 0.3121);
- c.lineTo(w * 0.5157, h * 0.3375);
- c.lineTo(w * 0.4314, h * 0.3982);
- c.lineTo(w * 0.3929, h * 0.3786);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3086, h * 0.5179);
- c.lineTo(w * 0.53, h * 0.3518);
- c.lineTo(w * 0.5757, h * 0.3745);
- c.lineTo(w * 0.3479, h * 0.5411);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5964, h * 0.3884);
- c.lineTo(w * 0.6736, h * 0.4277);
- c.lineTo(w * 0.445, h * 0.5991);
- c.lineTo(w * 0.3664, h * 0.5531);
- c.lineTo(w * 0.5057, h * 0.4545);
- c.lineTo(w * 0.5507, h * 0.4754);
- c.lineTo(w * 0.5571, h * 0.4723);
- c.lineTo(w * 0.5114, h * 0.4504);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4793, h * 0.6161);
- c.lineTo(w * 0.6771, h * 0.4643);
- c.lineTo(w * 0.8086, h * 0.5326);
- c.lineTo(w * 0.7471, h * 0.5817);
- c.lineTo(w * 0.7214, h * 0.567);
- c.lineTo(w * 0.715, h * 0.571);
- c.lineTo(w * 0.7421, h * 0.5871);
- c.lineTo(w * 0.6014, h * 0.6933);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.4371);
- c.lineTo(w * 0.8443, h * 0.546);
- c.lineTo(w * 0.9071, h * 0.5701);
- c.lineTo(w, h * 0.5022);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8407, h * 0.5504);
- c.lineTo(w * 0.8993, h * 0.5759);
- c.lineTo(w * 0.6757, h * 0.7416);
- c.lineTo(w * 0.6286, h * 0.7139);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.5321);
- c.lineTo(w * 0.6979, h * 0.7549);
- c.lineTo(w * 0.7457, h * 0.7781);
- c.lineTo(w * 0.9814, h * 0.6094);
- c.lineTo(w, h * 0.6067);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.6254);
- c.lineTo(w * 0.7664, h * 0.792);
- c.lineTo(w * 0.9586, h * 0.9062);
- c.lineTo(w, h * 0.8786);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3093, h * 0.5464);
- c.lineTo(w * 0.4271, h * 0.6152);
- c.lineTo(w * 0.245, h * 0.7643);
- c.lineTo(w * 0.185, h * 0.7228);
- c.lineTo(w * 0.2493, h * 0.6728);
- c.lineTo(w * 0.2214, h * 0.6143);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.65);
- c.lineTo(w * 0.2179, h * 0.7826);
- c.lineTo(w * 0.1136, h * 0.8424);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.7272);
- c.lineTo(w * 0.0821, h * 0.859);
- c.lineTo(0, h * 0.9085);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4529, h * 0.6366);
- c.lineTo(w * 0.575, h * 0.7143);
- c.lineTo(w * 0.39, h * 0.8621);
- c.lineTo(w * 0.2657, h * 0.7902);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.9415);
- c.lineTo(w * 0.1036, h * 0.8821);
- c.lineTo(w * 0.2343, h * 0.959);
- c.lineTo(w * 0.1721, h);
- c.lineTo(0, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2586, h * 0.7951);
- c.lineTo(w * 0.3829, h * 0.8674);
- c.lineTo(w * 0.2543, h * 0.9451);
- c.lineTo(w * 0.1279, h * 0.8692);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2836, h * 0.9639);
- c.lineTo(w * 0.4207, h * 0.8772);
- c.lineTo(w * 0.605, h * 0.7321);
- c.lineTo(w * 0.6521, h * 0.7634);
- c.lineTo(w * 0.3486, h);
- c.lineTo(w * 0.3393, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3879, h);
- c.lineTo(w * 0.6721, h * 0.7759);
- c.lineTo(w * 0.7171, h * 0.7982);
- c.lineTo(w * 0.4564, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4986, h);
- c.lineTo(w * 0.7386, h * 0.8125);
- c.lineTo(w * 0.9307, h * 0.925);
- c.lineTo(w * 0.8264, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8671, h);
- c.lineTo(w * 0.9464, h * 0.9491);
- c.lineTo(w, h * 0.975);
- c.lineTo(w, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2295, h);
- c.lineTo(w * 0.2648, h * 0.9792);
- c.lineTo(w * 0.2981, h);
- c.close();
- c.fillAndStroke();
- c.setStrokeWidth(1);
- c.setStrokeColor(strokeColor);
- c.begin();
- c.rect(0, 0, w, h);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IBG_MAP] = mxShapeMockupiBgMap;
- //**********************************************************************************************************************************************************
- //Vertical Button Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiButtonBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiButtonBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiButtonBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var textStrings = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, '+Button 1, Button 2, Button 3').toString().split(',');
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR, '#666666');
- var selectedFontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#ffffff');
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '17').toString();
- var frameColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#666666');
- var separatorColor = mxUtils.getValue(this.style, mxMockupC.STYLE_STROKECOLOR2, '#c4c4c4');
- var bgColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '#ffffff');
- var buttonNum = textStrings.length;
- var maxButtonWidth = 0;
- var selectedButton = -1;
- var rSize = 2.5; //rounding size
- var labelOffset = 2.5;
- for (var i = 0; i < buttonNum; i++)
- {
- var buttonText = textStrings[i];
- if(buttonText.charAt(0) === mxMockupC.SELECTED)
- {
- buttonText = textStrings[i].substring(1);
- selectedButton = i;
- }
- var currWidth = mxUtils.getSizeForString(buttonText, fontSize, mxConstants.DEFAULT_FONTFAMILY).width;
- if (currWidth > maxButtonWidth)
- {
- maxButtonWidth = currWidth;
- }
- }
- var minButtonHeight = fontSize * 1.5;
- var minH = buttonNum * minButtonHeight;
- var trueH = Math.max(h, minH);
- var minW = 2 * labelOffset + maxButtonWidth;
- var trueW = Math.max(w, minW);
- c.translate(x, y);
- this.background(c, trueW, trueH, rSize, buttonNum, labelOffset, buttonNum * minButtonHeight, frameColor, separatorColor, bgColor, selectedButton, minButtonHeight);
- c.setShadow(false);
- this.foreground(c, trueW, trueH, rSize, buttonNum, labelOffset, buttonNum * minButtonHeight, frameColor, separatorColor, bgColor, selectedButton, minButtonHeight);
- var currWidth = 0;
- for (var i = 0; i < buttonNum; i++)
- {
- if (i === selectedButton)
- {
- c.setFontColor(selectedFontColor);
- }
- else
- {
- c.setFontColor(fontColor);
- }
- currWidth = currWidth + labelOffset;
- var currHeight = (i * minButtonHeight + minButtonHeight * 0.5) * trueH / minH;
- this.buttonText(c, trueW, currHeight, textStrings[i], fontSize, separatorColor);
- }
- };
- mxShapeMockupiButtonBar.prototype.background = function(c, w, h, rSize, buttonNum, labelOffset, minH, frameColor, separatorColor, bgColor, selectedButton, minButtonHeight)
- {
- c.begin();
- c.setStrokeWidth(1);
- //draw the frame
- c.setStrokeColor(frameColor);
- c.setFillColor(bgColor);
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.fillAndStroke();
- };
- mxShapeMockupiButtonBar.prototype.foreground = function(c, w, h, rSize, buttonNum, labelOffset, minH, frameColor, separatorColor, bgColor, selectedButton, minButtonHeight)
- {
- //draw the button separators
- var strokeWidth = mxUtils.getValue(this.style, mxConstants.STYLE_STROKEWIDTH, '1');
- c.setStrokeWidth(strokeWidth);
- c.setStrokeColor(separatorColor);
- c.begin();
- for (var i = 1; i < buttonNum; i++)
- {
- if (i !== selectedButton && i !== (selectedButton + 1))
- {
- var currHeight = i * minButtonHeight * h / minH;
- c.moveTo(0, currHeight);
- c.lineTo(w, currHeight);
- }
- }
- c.stroke();
- //draw the selected button
- c.setStrokeColor(mxConstants.NONE);
- if (selectedButton === 0)
- {
- // we draw a path for the first button
- c.begin();
- var buttonBottom = minButtonHeight * h / minH;
- c.setGradient('#5D7585', '#008cff', 0, 0, w, buttonBottom, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, buttonBottom);
- c.lineTo(0, buttonBottom);
- c.close();
- c.fill();
- }
- else if (selectedButton === buttonNum - 1)
- {
- // we draw a path for the last button
- c.begin();
- var buttonTop = h - minButtonHeight * h / minH;
- c.setGradient('#5D7585', '#008cff', 0, buttonTop, w, h - buttonTop, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.moveTo(0, buttonTop);
- c.lineTo(w, buttonTop);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.fill();
- }
- else if (selectedButton !== -1)
- {
- // we draw a path rectangle for one of the buttons in the middle
- c.begin();
- var buttonTop = minButtonHeight * selectedButton * h / minH;
- var buttonBottom = minButtonHeight * (selectedButton + 1) * h / minH;
- c.setGradient('#5D7585', '#008cff', 0, buttonTop, w, buttonBottom - buttonTop, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.moveTo(0, buttonTop);
- c.lineTo(w, buttonTop);
- c.lineTo(w, buttonBottom);
- c.lineTo(0, buttonBottom);
- c.close();
- c.fill();
- }
- // //draw the frame again, to achieve a nicer effect
- c.begin();
- c.setStrokeColor(frameColor);
- c.setFillColor(bgColor);
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.stroke();
- };
- mxShapeMockupiButtonBar.prototype.buttonText = function(c, w, h, textString, fontSize, separatorColor)
- {
- if(textString.charAt(0) === mxMockupC.SELECTED)
- {
- textString = textString.substring(1);
- }
- c.setFontSize(fontSize);
- c.text(10, h, 0, 0, textString, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- var mSize = fontSize * 0.5;
- c.setStrokeWidth(fontSize * 0.3);
- c.setStrokeColor(separatorColor);
- c.begin();
- c.moveTo(w - 20 - mSize, h - mSize);
- c.lineTo(w - 20, h);
- c.lineTo(w - 20 - mSize, h + mSize);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IBUTTON_BAR] = mxShapeMockupiButtonBar;
- //**********************************************************************************************************************************************************
- //iPhone Application Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiAppBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiAppBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiAppBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiAppBar.prototype.background = function(c, x, y, w, h)
- {
- c.setGradient('#eeeeee', '#999999', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fill();
- };
- mxShapeMockupiAppBar.prototype.foreground = function(c, x, y, w, h)
- {
- c.setFillColor('#0099ff');
- c.rect(5, h * 0.5 + 1.75, 1.5, 2.5);
- c.fill();
- c.rect(7, h * 0.5 + 0.75, 1.5, 3.5);
- c.fill();
- c.rect(9, h * 0.5 - 0.25, 1.5, 4.5);
- c.fill();
- c.rect(11, h * 0.5 - 1.25, 1.5, 5.5);
- c.fill();
- c.rect(13, h * 0.5 - 2.25, 1.5, 6.5);
- c.fill();
- c.rect(15, h * 0.5 - 3.25, 1.5, 7.5);
- c.fill();
- c.setFillColor('#999999');
- c.ellipse(w - 56.5, h * 0.5 - 4, 8, 8);
- c.fill();
- c.setStrokeColor('#cccccc');
- c.begin();
- c.moveTo(w - 52.5, h * 0.5 - 3);
- c.lineTo(w - 52.5, h * 0.5);
- c.lineTo(w - 54.5, h * 0.5);
- c.stroke();
- c.setStrokeWidth(0.5);
- c.setStrokeColor('#333333');
- c.setFillColor('#990000');
- c.begin();
- c.moveTo(w - 45.5, h * 0.5);
- c.lineTo(w - 37.5, h * 0.5 - 5);
- c.lineTo(w - 41.5, h * 0.5 + 4);
- c.lineTo(w - 42, h * 0.5 + 0.5);
- c.close();
- c.fillAndStroke();
- c.setFillColor('#999999');
- c.setStrokeColor('#999999');
- c.begin();
- c.moveTo(w - 28.5, h * 0.5 + 3.5);
- c.arcTo(3.5, 3.5, 0, 1, 1, w - 26.5, h * 0.5 + 1);
- c.stroke();
- c.begin();
- c.moveTo(w - 27.25, h * 0.5 + 0.25);
- c.lineTo(w - 25.75, h * 0.5 + 0.25);
- c.lineTo(w - 26.5, h * 0.5 + 1.5);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w - 31, h * 0.5 - 0.5);
- c.arcTo(1, 1.5, 0, 0, 1, w - 29, h * 0.5 - 0.5);
- c.stroke();
- c.rect(w - 31.5, h * 0.5 - 0.5, 3, 2);
- c.fillAndStroke();
- c.setGradient('#eeeeee', '#444444', w - 20, h * 0.5 - 3, 16.5, 6, mxConstants.DIRECTION_NORTH, 1, 1);
- c.begin();
- c.moveTo(w - 20, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 3);
- c.lineTo(w - 20, h * 0.5 + 3);
- c.close();
- c.fill();
- c.setGradient('#E2FFEB', '#008215', w - 20, h * 0.5 - 3, 10, 6, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- c.moveTo(w - 20, h * 0.5 - 3);
- c.lineTo(w - 10, h * 0.5 - 3);
- c.lineTo(w - 10, h * 0.5 + 3);
- c.lineTo(w - 20, h * 0.5 + 3);
- c.close();
- c.fill();
- c.setStrokeColor('#666666');
- c.begin();
- c.moveTo(w - 20, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 3);
- c.lineTo(w - 20, h * 0.5 + 3);
- c.close();
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IAPP_BAR] = mxShapeMockupiAppBar;
- //**********************************************************************************************************************************************************
- //iPhone Top Bar (LEGACY)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiTopBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiTopBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiTopBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiTopBar.prototype.background = function(c, x, y, w, h)
- {
- c.setAlpha(0.5);
- c.setFillColor('#999999');
- c.rect(0, 0, w, h);
- c.fill();
- };
- mxShapeMockupiTopBar.prototype.foreground = function(c, x, y, w, h)
- {
- c.setFillColor('#cccccc');
- c.setStrokeColor('#cccccc');
- c.setFontColor('#cccccc');
- c.setFontSize(7.5);
- c.rect(5, h * 0.5 + 1.75, 1.5, 2.5);
- c.fill();
- c.rect(7, h * 0.5 + 0.75, 1.5, 3.5);
- c.fill();
- c.rect(9, h * 0.5 - 0.25, 1.5, 4.5);
- c.fill();
- c.rect(11, h * 0.5 - 1.25, 1.5, 5.5);
- c.fill();
- c.rect(13, h * 0.5 - 2.25, 1.5, 6.5);
- c.fill();
- c.rect(15, h * 0.5 - 3.25, 1.5, 7.5);
- c.fill();
- c.text(18, h * 0.5, 0, 0, 'CARRIER', mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.5, 0, 0, '11:15AM', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.begin();
- c.moveTo(w - 19, h * 0.5 - 2);
- c.lineTo(w - 10, h * 0.5 - 2);
- c.lineTo(w - 10, h * 0.5 + 2);
- c.lineTo(w - 19, h * 0.5 + 2);
- c.close();
- c.fill();
- c.begin();
- c.moveTo(w - 20, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 3);
- c.lineTo(w - 20, h * 0.5 + 3);
- c.close();
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ITOP_BAR] = mxShapeMockupiTopBar;
- //**********************************************************************************************************************************************************
- //iPhone Top Bar 2
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiTopBar2(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiTopBar2, mxShape);
- mxShapeMockupiTopBar2.prototype.cst = {
- SHAPE_ITOP_BAR2 : 'mxgraph.ios.iTopBar2'
- };
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiTopBar2.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- //zzz
- mxShapeMockupiTopBar2.prototype.background = function(c, x, y, w, h)
- {
- // c.setAlpha(0.5);
- // c.setFillColor('#999999');
- c.rect(0, 0, w, h);
- c.fill();
- };
- mxShapeMockupiTopBar2.prototype.foreground = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');
- c.setFillColor(strokeColor);
- c.setStrokeColor(strokeColor);
- c.rect(5, h * 0.5 + 1.75, 1.5, 2.5);
- c.fill();
- c.rect(7, h * 0.5 + 0.75, 1.5, 3.5);
- c.fill();
- c.rect(9, h * 0.5 - 0.25, 1.5, 4.5);
- c.fill();
- c.rect(11, h * 0.5 - 1.25, 1.5, 5.5);
- c.fill();
- c.rect(13, h * 0.5 - 2.25, 1.5, 6.5);
- c.fill();
- c.rect(15, h * 0.5 - 3.25, 1.5, 7.5);
- c.fill();
- c.begin();
- c.moveTo(w - 19, h * 0.5 - 2);
- c.lineTo(w - 10, h * 0.5 - 2);
- c.lineTo(w - 10, h * 0.5 + 2);
- c.lineTo(w - 19, h * 0.5 + 2);
- c.close();
- c.fill();
- c.begin();
- c.moveTo(w - 20, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 3);
- c.lineTo(w - 20, h * 0.5 + 3);
- c.close();
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxShapeMockupiTopBar2.prototype.cst.SHAPE_ITOP_BAR2] = mxShapeMockupiTopBar2;
- //**********************************************************************************************************************************************************
- //iPhone Top Bar Locked
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiTopBarLocked(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiTopBarLocked, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiTopBarLocked.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiTopBarLocked.prototype.background = function(c, x, y, w, h)
- {
- c.setFillColor('#000000');
- c.rect(0, 0, w, h);
- c.fill();
- };
- mxShapeMockupiTopBarLocked.prototype.foreground = function(c, x, y, w, h)
- {
- c.setFillColor('#cccccc');
- c.setStrokeColor('#cccccc');
- // c.setFontColor('#cccccc');
- // c.setFontSize(7.5);
- c.rect(5, h * 0.5 + 1.75, 1.5, 2.5);
- c.fill();
- c.rect(7, h * 0.5 + 0.75, 1.5, 3.5);
- c.fill();
- c.rect(9, h * 0.5 - 0.25, 1.5, 4.5);
- c.fill();
- c.rect(11, h * 0.5 - 1.25, 1.5, 5.5);
- c.fill();
- c.rect(13, h * 0.5 - 2.25, 1.5, 6.5);
- c.fill();
- c.rect(15, h * 0.5 - 3.25, 1.5, 7.5);
- c.fill();
- // c.text(18, h * 0.5, 0, 0, 'CARRIER', mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.begin();
- c.moveTo(w * 0.5 - 2, h * 0.5 - 1);
- c.arcTo(2, 3, 0, 0, 1, w * 0.5 + 2, h * 0.5 - 1);
- c.stroke();
- c.rect(w * 0.5 - 3, h * 0.5 - 1, 6, 4);
- c.fillAndStroke();
- c.begin();
- c.moveTo(w - 19, h * 0.5 - 2);
- c.lineTo(w - 10, h * 0.5 - 2);
- c.lineTo(w - 10, h * 0.5 + 2);
- c.lineTo(w - 19, h * 0.5 + 2);
- c.close();
- c.fill();
- c.begin();
- c.moveTo(w - 20, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 3);
- c.lineTo(w - 5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 - 1);
- c.lineTo(w - 3.5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 1);
- c.lineTo(w - 5, h * 0.5 + 3);
- c.lineTo(w - 20, h * 0.5 + 3);
- c.close();
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ITOP_BAR_LOCKED] = mxShapeMockupiTopBarLocked;
- //**********************************************************************************************************************************************************
- //Button
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiButton(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiButton, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiButton.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var mainText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Main Text');
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#666666').toString();
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '8.5').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.mainText(c, x, y, w, h, mainText, fontSize, fontColor);
- };
- mxShapeMockupiButton.prototype.background = function(c, x, y, w, h)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(0, 0, w, h, 2.5, 2.5);
- c.fill();
- };
- mxShapeMockupiButton.prototype.mainText = function(c, x, y, w, h, text, fontSize, fontColor)
- {
- c.begin();
- c.setFontSize(fontSize);
- c.setFontColor(fontColor);
- c.text(w / 2, h / 2, 0, 0, text, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IBUTTON] = mxShapeMockupiButton;
- //**********************************************************************************************************************************************************
- //Button Back
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiButtonBack(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiButtonBack, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiButtonBack.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var mainText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Main Text');
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#666666').toString();
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '17').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.mainText(c, x, y, w, h, mainText, fontSize, fontColor);
- };
- mxShapeMockupiButtonBack.prototype.background = function(c, x, y, w, h)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- rSize = 2.5;
- c.begin();
- c.moveTo(w, rSize);
- c.arcTo(rSize, rSize, 0, 0, 0, w - rSize, 0);
- c.lineTo(10, 0);
- c.lineTo(0.87, h * 0.5 - 0.75);
- c.arcTo(rSize, rSize, 0, 0, 0, 0.87, h * 0.5 + 0.75);
- c.lineTo(10, h);
- c.lineTo(w - rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 0, w, h - rSize);
- c.close();
- c.fill();
- };
- mxShapeMockupiButtonBack.prototype.mainText = function(c, x, y, w, h, text, fontSize, fontColor)
- {
- c.begin();
- c.setFontSize(fontSize);
- c.setFontColor(fontColor);
- c.text(w * 0.5 + 2.5, h * 0.5, 0, 0, text, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IBUTTON_BACK] = mxShapeMockupiButtonBack;
- //**********************************************************************************************************************************************************
- //Button Forward
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiButtonForward(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiButtonForward, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiButtonForward.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var mainText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Main Text');
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#666666').toString();
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '17').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.mainText(c, x, y, w, h, mainText, fontSize, fontColor);
- };
- mxShapeMockupiButtonForward.prototype.background = function(c, x, y, w, h)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- rSize = 2.5;
- c.begin();
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - 10, 0);
- c.lineTo(w - 0.87, h * 0.5 - 0.75);
- c.arcTo(rSize, rSize, 0, 0, 1, w - 0.87, h * 0.5 + 0.75);
- c.lineTo(w - 10, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.fill();
- };
- mxShapeMockupiButtonForward.prototype.mainText = function(c, x, y, w, h, text, fontSize, fontColor)
- {
- c.begin();
- c.setFontSize(fontSize);
- c.setFontColor(fontColor);
- c.text(w * 0.5 - 2.5, h * 0.5, 0, 0, text, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IBUTTON_FORWARD] = mxShapeMockupiButtonForward;
- //**********************************************************************************************************************************************************
- //Prev/Next Button
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiPrevNextButton(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiPrevNextButton, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiPrevNextButton.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiPrevNextButton.prototype.background = function(c, x, y, w, h)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- var rSize = 5;
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.fill();
- c.begin();
- c.moveTo(w * 0.5, 0);
- c.lineTo(w * 0.5, h);
- c.stroke();
- };
- mxShapeMockupiPrevNextButton.prototype.foreground = function(c, x, y, w, h)
- {
- var fillColor3 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR3, '').toString();
- c.setFillColor(fillColor3);
- c.begin();
- c.moveTo(w * 0.25, h * 0.25);
- c.lineTo(w * 0.35, h * 0.75);
- c.lineTo(w * 0.15, h * 0.75);
- c.close();
- c.fill();
- c.begin();
- c.moveTo(w * 0.75, h * 0.75);
- c.lineTo(w * 0.85, h * 0.25);
- c.lineTo(w * 0.65, h * 0.25);
- c.close();
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IPREV_NEXT] = mxShapeMockupiPrevNextButton;
- //**********************************************************************************************************************************************************
- //Text Input
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiTextInput(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiTextInput, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiTextInput.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var mainText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Main Text');
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#000000').toString();
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '8').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.mainText(c, x, y, w, h, mainText, fontSize, fontColor);
- };
- mxShapeMockupiTextInput.prototype.background = function(c, x, y, w, h)
- {
- c.roundrect(0, 0, w, h, 2.5, 2.5);
- c.fillAndStroke();
- };
- mxShapeMockupiTextInput.prototype.mainText = function(c, x, y, w, h, text, fontSize, fontColor)
- {
- c.begin();
- c.setFontSize(fontSize);
- c.setFontColor(fontColor);
- c.text(2, h * 0.5, 0, 0, text, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ITEXT_INPUT] = mxShapeMockupiTextInput;
- //**********************************************************************************************************************************************************
- //Radio Button Group (LEGACY)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiRadioGroup(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiRadioGroup, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiRadioGroup.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#666666').toString();
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '8').toString();
- var optionText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Option 1').toString().split(',');
- var optionNum = optionText.length;
- var buttonSize = 5;
- var lineH = Math.max(fontSize * 1.5, buttonSize);
- var maxTextWidth = 0;
- var selected = -1;
- var labelOffset = 2.5;
- var minH = optionNum * lineH;
- var trueH = Math.max(h, minH);
- //get min width and selected option
- for (var i = 0; i < optionNum; i++)
- {
- var currText = optionText[i];
- if(currText.charAt(0) === mxMockupC.SELECTED)
- {
- currText = optionText[i].substring(1);
- selected = i;
- }
- var currWidth = mxUtils.getSizeForString(currText, fontSize, mxConstants.DEFAULT_FONTFAMILY).width;
- if (currWidth > maxTextWidth)
- {
- maxTextWidth = currWidth;
- }
- }
- var minW = 2 * labelOffset + maxTextWidth + 2 * buttonSize;
- var trueW = Math.max(w, minW);
- //draw the background
- c.roundrect(0, 0, trueW, trueH, 2.5, 2.5);
- c.fillAndStroke();
- c.setShadow(false);
- c.setFontSize(fontSize);
- c.setFontColor(fontColor);
- for (var i = 0; i < optionNum; i++)
- {
- var currHeight = (i * lineH + lineH * 0.5) * trueH / minH;
- var currText = optionText[i];
- if(currText.charAt(0) === mxMockupC.SELECTED)
- {
- currText = optionText[i].substring(1);
- selected = i;
- }
- c.text(buttonSize * 2 + labelOffset, currHeight, 0, 0, currText, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- var iconX = buttonSize * 0.5;
- var iconY = currHeight - buttonSize * 0.5;
- c.setFillColor('#dddddd');
- c.setStrokeColor('#000000');
- if (selected === i)
- {
- c.setGradient('#aaaaaa', '#666666', iconX, iconY, buttonSize, buttonSize, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(iconX, iconY, buttonSize, buttonSize);
- c.fillAndStroke();
- c.setFillColor('#333333');
- c.setStrokeColor('#333333');
- c.ellipse(iconX + buttonSize * 0.25, iconY + buttonSize * 0.25, buttonSize * 0.5, buttonSize * 0.5);
- c.fillAndStroke();
- }
- else
- {
- c.setGradient('#eeeeee', '#cccccc', iconX, iconY, buttonSize, buttonSize, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(iconX, iconY, buttonSize, buttonSize);
- c.fillAndStroke();
- }
- }
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IRADIO_GROUP] = mxShapeMockupiRadioGroup;
- //**********************************************************************************************************************************************************
- //Checkbox Group (LEGACY)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiCheckboxGroup(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiCheckboxGroup, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiCheckboxGroup.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#666666').toString();
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '8').toString();
- var optionText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Option 1').toString().split(',');
- var optionNum = optionText.length;
- var buttonSize = 5;
- var lineH = Math.max(fontSize * 1.5, buttonSize);
- var maxTextWidth = 0;
- var selected = -1;
- var labelOffset = 2.5;
- var minH = optionNum * lineH;
- var trueH = Math.max(h, minH);
- //get min width and selected option
- for (var i = 0; i < optionNum; i++)
- {
- var currText = optionText[i];
- if(currText.charAt(0) === mxMockupC.SELECTED)
- {
- currText = optionText[i].substring(1);
- selected = i;
- }
- var currWidth = mxUtils.getSizeForString(currText, fontSize, mxConstants.DEFAULT_FONTFAMILY).width;
- if (currWidth > maxTextWidth)
- {
- maxTextWidth = currWidth;
- }
- }
- var minW = 2 * labelOffset + maxTextWidth + 2 * buttonSize;
- var trueW = Math.max(w, minW);
- //draw the background
- c.roundrect(0, 0, trueW, trueH, 2.5, 2.5);
- c.fillAndStroke();
- c.setShadow(false);
- c.setFontSize(fontSize);
- c.setFontColor(fontColor);
- for (var i = 0; i < optionNum; i++)
- {
- var currHeight = (i * lineH + lineH * 0.5) * trueH / minH;
- var currText = optionText[i];
- if(currText.charAt(0) === mxMockupC.SELECTED)
- {
- currText = optionText[i].substring(1);
- selected = i;
- }
- c.text(buttonSize * 2 + labelOffset, currHeight, 0, 0, currText, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- var iconX = buttonSize * 0.5;
- var iconY = currHeight - buttonSize * 0.5;
- c.setFillColor('#dddddd');
- c.setStrokeColor('#000000');
- if (selected === i)
- {
- c.setGradient('#aaaaaa', '#666666', iconX, iconY, buttonSize, buttonSize, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(iconX, iconY, buttonSize, buttonSize);
- c.fillAndStroke();
- c.setStrokeColor('#333333');
- c.begin();
- c.moveTo(iconX + buttonSize * 0.25, iconY + buttonSize * 0.5);
- c.lineTo(iconX + buttonSize * 0.5, iconY + buttonSize * 0.75);
- c.lineTo(iconX + buttonSize * 0.75, iconY + buttonSize * 0.25);
- c.stroke();
- }
- else
- {
- c.setGradient('#eeeeee', '#cccccc', iconX, iconY, buttonSize, buttonSize, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(iconX, iconY, buttonSize, buttonSize);
- c.fillAndStroke();
- }
- selected = -1;
- }
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICHECKBOX_GROUP] = mxShapeMockupiCheckboxGroup;
- //**********************************************************************************************************************************************************
- //Combo box
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiComboBox(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiComboBox, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiComboBox.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var mainText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Main Text');
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#666666').toString();
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '8.5').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- this.mainText(c, x, y, w, h, mainText, fontSize, fontColor);
- };
- mxShapeMockupiComboBox.prototype.background = function(c, x, y, w, h)
- {
- c.setFillColor('#ffffff');
- c.roundrect(0, 0, w, h, 2.5, 2.5);
- c.fillAndStroke();
- };
- mxShapeMockupiComboBox.prototype.foreground = function(c, x, y, w, h)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, w - 30, 0, 30, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- c.moveTo(w - 15, 0);
- c.lineTo(w - 2.5, 0);
- c.arcTo(2.5, 2.5, 0, 0, 1, w, 2.5);
- c.lineTo(w, h - 2.5);
- c.arcTo(2.5, 2.5, 0, 0, 1, w - 2.5, h);
- c.lineTo(w - 15, h);
- c.close();
- c.fillAndStroke();
- c.setFillColor('#ffffff');
- c.begin();
- c.moveTo(w - 11, 5);
- c.lineTo(w - 7.5, 10);
- c.lineTo(w - 4, 5);
- c.fill();
- };
- mxShapeMockupiComboBox.prototype.mainText = function(c, x, y, w, h, text, fontSize, fontColor)
- {
- c.begin();
- c.setFontSize(fontSize);
- c.setFontColor(fontColor);
- c.text(2.5, h * 0.5, 0, 0, text, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICOMBO_BOX] = mxShapeMockupiComboBox;
- //**********************************************************************************************************************************************************
- //On-Off Button
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiOnOffButton(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiOnOffButton, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiOnOffButton.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- w = Math.max(w, 2 * h);
- var state = mxUtils.getValue(this.style, mxMockupC.BUTTON_STATE, mxMockupC.STATE_ON);
- this.background(c, x, y, w, h, state);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, state);
- this.mainText(c, x, y, w, h, state);
- };
- mxShapeMockupiOnOffButton.prototype.background = function(c, x, y, w, h, state)
- {
- if (state === mxMockupC.STATE_ON)
- {
- c.setGradient('#E2FFEB', '#008215', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(0, 0, w, h, h * 0.5, h * 0.5);
- c.fillAndStroke();
- }
- else if (state === mxMockupC.STATE_OFF)
- {
- c.setGradient('#cc9999', '#881100', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(0, 0, w, h, h * 0.5, h * 0.5);
- c.fillAndStroke();
- }
- };
- mxShapeMockupiOnOffButton.prototype.foreground = function(c, x, y, w, h, state)
- {
- if (state === mxMockupC.STATE_ON)
- {
- c.setGradient('#ffffff', '#888888', w - h, 0, h, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(w - h, 0, h, h);
- c.fillAndStroke();
- }
- else
- {
- c.setGradient('#ffffff', '#888888', 0, 0, h, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(0, 0, h, h);
- c.fillAndStroke();
- }
- };
- mxShapeMockupiOnOffButton.prototype.mainText = function(c, x, y, w, h, state)
- {
- var mainText = mxUtils.getValue(this.style, 'mainText', null);
- c.setFontColor('#ffffff');
- c.setFontSize(8.5);
-
- if (mainText != '')
- {
- if(state === mxMockupC.STATE_ON)
- {
- c.text(w * 0.5 - h * 0.4, h * 0.5, 0, 0, mainText || 'ON', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- }
- else if (state === mxMockupC.STATE_OFF)
- {
- c.text(w * 0.5 + h * 0.4, h * 0.5, 0, 0, mainText || 'OFF', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- }
- }
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ION_OFF_BUTTON] = mxShapeMockupiOnOffButton;
- //**********************************************************************************************************************************************************
- //Alert Box
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiAlertBox(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiAlertBox, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiAlertBox.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- w = Math.max(w, 15);
- h = Math.max(h, 15);
- c.translate(x, y);
- rSize = 7.5;
- this.background(c, x, y, w, h, rSize);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, rSize);
- };
- mxShapeMockupiAlertBox.prototype.background = function(c, x, y, w, h, rSize)
- {
- c.setGradient('#497198', '#193168', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setAlpha(0.8);
- c.setStrokeWidth(1);
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.fillAndStroke();
- };
- mxShapeMockupiAlertBox.prototype.foreground = function(c, x, y, w, h, rSize)
- {
- var mainText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Main Text').toString().split(',');
- c.setStrokeColor('#497198');
- c.setGradient('#497198', '#c5cee1', 0, 0, w, 22.5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setAlpha(0.5);
- c.begin();
- c.moveTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, 17.5);
- c.arcTo(w * 1.67, h * 2.5, 0, 0, 1, 0, 17.5);
- c.lineTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.close();
- c.fillAndStroke();
- c.setAlpha(0.8);
- c.setStrokeColor('#ffffff');
- c.setStrokeWidth(1);
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.stroke();
- c.setGradient('#497198', '#c5cee1', 5, h - 50, w - 20, 20, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(5, h - 25, w - 10, 20, 2.5, 2.5);
- c.fillAndStroke();
- c.setAlpha(0.9);
- c.setFontSize(9.5);
- c.setFontColor('#ffffff');
- c.text(w * 0.5, h * 0.15, 0, 0, mainText[0], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontSize(8);
- c.text(w * 0.5, h * 0.4, 0, 0, mainText[2], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.55, 0, 0, mainText[3], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontSize(8.5);
- c.text(w * 0.5, h - 15, 0, 0, mainText[1], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IALERT_BOX] = mxShapeMockupiAlertBox;
- //**********************************************************************************************************************************************************
- //Dialog Box
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiDialogBox(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiDialogBox, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiDialogBox.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- w = Math.max(w, 15);
- h = Math.max(h, 15);
- c.translate(x, y);
- rSize = 7.5;
- this.background(c, x, y, w, h, rSize);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, rSize);
- };
- mxShapeMockupiDialogBox.prototype.background = function(c, x, y, w, h, rSize)
- {
- c.setGradient('#497198', '#193168', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setAlpha(0.8);
- c.setStrokeWidth(1);
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.fillAndStroke();
- };
- mxShapeMockupiDialogBox.prototype.foreground = function(c, x, y, w, h, rSize)
- {
- var mainText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Main Text').toString().split(',');
- c.setStrokeColor('#497198');
- c.setGradient('#497198', '#c5cee1', 0, 0, w, 22.5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setAlpha(0.5);
- c.begin();
- c.moveTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, 17.5);
- c.arcTo(w * 1.67, h * 2.5, 0, 0, 1, 0, 17.5);
- c.lineTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.close();
- c.fillAndStroke();
- c.setAlpha(0.8);
- c.setStrokeColor('#ffffff');
- c.setStrokeWidth(1);
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.stroke();
- c.setGradient('#497198', '#c5cee1', 5, h - 25, w * 0.5 - 10, 20, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(5, h - 25, w * 0.5 - 10, 20, 2.5, 2.5);
- c.fillAndStroke();
- c.roundrect(w * 0.5 + 2.5, h - 25, w * 0.5 - 10, 20, 2.5, 2.5);
- c.fillAndStroke();
- c.setAlpha(0.9);
- c.setFontSize(9.5);
- c.setFontColor('#ffffff');
- c.text(w * 0.5, h * 0.15, 0, 0, mainText[0], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontSize(8);
- c.text(w * 0.5, h * 0.4, 0, 0, mainText[3], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.55, 0, 0, mainText[4], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontSize(8.5);
- c.text(w * 0.25, h - 15, 0, 0, mainText[1], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.75, h - 15, 0, 0, mainText[2], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IDIALOG_BOX] = mxShapeMockupiDialogBox;
- //**********************************************************************************************************************************************************
- //Lock Button
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiLockButton(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiLockButton, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiLockButton.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.setShadow(false);
- c.setAlpha(0.7);
- c.setGradient('#4A4F56', '#70757B', 0, 0, w, h, mxConstants.DIRECTION_NORTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fill();
- c.setAlpha(0.8);
- c.setGradient('#18232D', '#1F2933', 10, 10, 154, 30, mxConstants.DIRECTION_NORTH, 1, 1);
- c.roundrect(10, h * 0.5 - 15, w - 20, 30, 7.5, 7.5);
- c.fill();
- c.setAlpha(1);
- c.setGradient('#E9F3FD', '#ADB7C1', 12.5, 12.5, 40, 25, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(12.5, h * 0.5 - 12.5, 40, 25, 5, 5);
- c.fill();
- c.setAlpha(0.8);
- c.setStrokeWidth(0.5);
- c.setStrokeColor('#aabbbb');
- c.setGradient('#AEB7C1', '#667079', 20, 17.5, 25, 15, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- c.moveTo(20, h * 0.5 - 3.5);
- c.lineTo(35, h * 0.5 - 3.5);
- c.lineTo(35, h * 0.5 - 7.5);
- c.lineTo(45, h * 0.5);
- c.lineTo(35, h * 0.5 + 7.5);
- c.lineTo(35, h * 0.5 + 3.5);
- c.lineTo(20, h * 0.5 + 3.5);
- c.close();
- c.fillAndStroke();
-
- var mainText = mxUtils.getValue(this.style, 'mainText', null);
-
- if (mainText != '')
- {
- c.setFontSize(12.5);
- c.setFontColor('#cccccc');
- c.text(w / 2 + 20.5, h / 2, 0, 0, 'slide to unlock', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- }
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ILOCK_BUTTON] = mxShapeMockupiLockButton;
- //**********************************************************************************************************************************************************
- //Arrow Icon
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiArrowIcon(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiArrowIcon, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiArrowIcon.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h, strokeColor);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, strokeColor);
- };
- mxShapeMockupiArrowIcon.prototype.background = function(c, x, y, w, h, strokeColor)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeWidth(1.5);
- c.setStrokeColor(strokeColor);
- c.ellipse(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiArrowIcon.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setStrokeWidth(2.5);
- c.begin();
- c.moveTo(w * 0.4, h * 0.22);
- c.lineTo(w * 0.65, h * 0.5);
- c.lineTo(w * 0.4, h * 0.78);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IARROW_ICON] = mxShapeMockupiArrowIcon;
- //**********************************************************************************************************************************************************
- //Delete Icon
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiDeleteIcon(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiDeleteIcon, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiDeleteIcon.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h, strokeColor);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, strokeColor);
- };
- mxShapeMockupiDeleteIcon.prototype.background = function(c, x, y, w, h, strokeColor)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeWidth(1.5);
- c.setStrokeColor(strokeColor);
- c.ellipse(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiDeleteIcon.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setStrokeWidth(2.5);
- c.begin();
- c.moveTo(w * 0.25, h * 0.5);
- c.lineTo(w * 0.75, h * 0.5);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IDELETE_ICON] = mxShapeMockupiDeleteIcon;
- //**********************************************************************************************************************************************************
- //Add Icon
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiAddIcon(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiAddIcon, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiAddIcon.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '').toString();
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeColor(strokeColor);
- c.translate(x, y);
- this.background(c, x, y, w, h, strokeColor);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, strokeColor);
- };
- mxShapeMockupiAddIcon.prototype.background = function(c, x, y, w, h, strokeColor)
- {
- c.setStrokeWidth(1.5);
- c.ellipse(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiAddIcon.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setStrokeWidth(2.5);
- c.begin();
- c.moveTo(w * 0.25, h * 0.5);
- c.lineTo(w * 0.75, h * 0.5);
- c.moveTo(w * 0.5, h * 0.25);
- c.lineTo(w * 0.5, h * 0.75);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IADD_ICON] = mxShapeMockupiAddIcon;
- //**********************************************************************************************************************************************************
- //Info Icon
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiInfoIcon(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiInfoIcon, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiInfoIcon.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h, strokeColor);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, strokeColor);
- };
- mxShapeMockupiInfoIcon.prototype.background = function(c, x, y, w, h, strokeColor)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeWidth(1.5);
- c.setStrokeColor(strokeColor);
- c.ellipse(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiInfoIcon.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setStrokeWidth(2.5);
- c.begin();
- c.setFillColor('#ffffff');
- c.moveTo(w * 0.47, h * 0.334);
- c.arcTo(w * 0.1, h * 0.15, 60, 0, 1, w * 0.61, h * 0.42);
- c.lineTo(w * 0.51, h * 0.7);
- c.arcTo(w * 0.026, h * 0.03, 30, 0, 0, w * 0.54, h * 0.74);
- c.lineTo(w * 0.608, h * 0.684);
- c.arcTo(w * 0.02, h * 0.015, 0, 0, 1, w * 0.638, h * 0.706);
- c.arcTo(w * 0.45, h * 0.45, 0, 0, 1, w * 0.42, h * 0.865);
- c.arcTo(w * 0.1, h * 0.08, -15, 0, 1, w * 0.325, h * 0.77);
- c.lineTo(w * 0.358, h * 0.66);
- c.lineTo(w * 0.435, h * 0.46);
- c.arcTo(w * 0.023, h * 0.03, 0, 0, 0, w * 0.4, h * 0.43);
- c.lineTo(w * 0.338, h * 0.484);
- c.arcTo(w * 0.01, h * 0.015, 45, 0, 1, w * 0.31, h * 0.47);
- c.arcTo(w * 0.3, h * 0.3, 0, 0, 1, w * 0.47, h * 0.334);
- c.fill();
- c.begin();
- c.moveTo(w * 0.5438, h * 0.141);
- c.arcTo(w * 0.0776, h * 0.0898, 40, 0, 1, w * 0.6671, h * 0.2308);
- c.arcTo(w * 0.0776, h * 0.0898, 40, 0, 1, w * 0.5438, h * 0.141);
- c.close();
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IINFO_ICON] = mxShapeMockupiInfoIcon;
- //**********************************************************************************************************************************************************
- //Sort/Find Icon
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiSortFindIcon(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiSortFindIcon, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiSortFindIcon.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h, strokeColor);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, strokeColor);
- };
- mxShapeMockupiSortFindIcon.prototype.background = function(c, x, y, w, h, strokeColor)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeWidth(1.5);
- c.setStrokeColor(strokeColor);
- c.roundrect(0, 0, w, h, w * 0.1, h * 0.1);
- c.fillAndStroke();
- };
- mxShapeMockupiSortFindIcon.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setStrokeWidth((Math.min(h, w)) / 20);
- c.begin();
- c.setFillColor('#ffffff');
- c.moveTo(w * 0.1, h * 0.25);
- c.lineTo(w * 0.9, h * 0.25);
- c.moveTo(w * 0.1, h * 0.4);
- c.lineTo(w * 0.9, h * 0.4);
- c.moveTo(w * 0.1, h * 0.55);
- c.lineTo(w * 0.6, h * 0.55);
- c.moveTo(w * 0.1, h * 0.7);
- c.lineTo(w * 0.5, h * 0.7);
- c.stroke();
- c.begin();
- c.ellipse(w * 0.6, h * 0.6, w * 0.2, h * 0.2);
- c.stroke();
- c.begin();
- c.moveTo(w * 0.77, h * 0.77);
- c.lineTo(w * 0.85, h * 0.85);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ISORT_FIND_ICON] = mxShapeMockupiSortFindIcon;
- //**********************************************************************************************************************************************************
- //Arrow Icon
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiCheckIcon(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiCheckIcon, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiCheckIcon.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h, strokeColor);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, strokeColor);
- };
- mxShapeMockupiCheckIcon.prototype.background = function(c, x, y, w, h, strokeColor)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeWidth(1.5);
- c.setStrokeColor(strokeColor);
- c.ellipse(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiCheckIcon.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setStrokeWidth(2.5);
- c.begin();
- c.moveTo(w * 0.25, h * 0.5);
- c.lineTo(w * 0.5, h * 0.65);
- c.lineTo(w * 0.75, h * 0.25);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICHECK_ICON] = mxShapeMockupiCheckIcon;
- //**********************************************************************************************************************************************************
- //Keyboard (letters)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiKeybLetters(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiKeybLetters, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiKeybLetters.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(true);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiKeybLetters.prototype.background = function(c, x, y, w, h)
- {
- c.setGradient('#8A97A7', '#425163', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fill();
- };
- mxShapeMockupiKeybLetters.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setGradient('#EEF3F9', '#DBE2E9', w * 0.0086, h * 0.03, w * 0.0776, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- rSizeX = w * 0.0144;
- rSizeY = h * 0.025;
- c.setFontSize(10.5);
- c.setFontColor('#000000');
- c.roundrect(w * 0.0086, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.0474, h * 0.125, 0, 0, 'Q', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1092, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.148, h * 0.125, 0, 0, 'W', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2098, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2486, h * 0.125, 0, 0, 'E', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3103, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3491, h * 0.125, 0, 0, 'R', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4109, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.4497, h * 0.125, 0, 0, 'T', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5115, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5503, h * 0.125, 0, 0, 'Y', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.6121, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6509, h * 0.125, 0, 0, 'U', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.7126, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7514, h * 0.125, 0, 0, 'I', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.8132, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.852, h * 0.125, 0, 0, 'O', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.9138, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.9526, h * 0.125, 0, 0, 'P', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.0632, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.102, h * 0.375, 0, 0, 'A', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1638, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2026, h * 0.375, 0, 0, 'S', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2644, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3032, h * 0.375, 0, 0, 'D', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3649, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.4037, h * 0.375, 0, 0, 'F', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4655, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5043, h * 0.375, 0, 0, 'G', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5661, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6049, h * 0.375, 0, 0, 'H', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.6667, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7055, h * 0.375, 0, 0, 'J', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.7672, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.806, h * 0.375, 0, 0, 'K', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.8678, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.9066, h * 0.375, 0, 0, 'L', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1638, h * 0.53, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2026, h * 0.625, 0, 0, 'Z', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2644, h * 0.53, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3032, h * 0.625, 0, 0, 'X', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3649, h * 0.53, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.4037, h * 0.625, 0, 0, 'C', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4655, h * 0.53, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5043, h * 0.625, 0, 0, 'V', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5661, h * 0.53, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6049, h * 0.625, 0, 0, 'B', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.6667, h * 0.53, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7055, h * 0.625, 0, 0, 'N', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.7672, h * 0.53, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.806, h * 0.625, 0, 0, 'M', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2644, h * 0.78, w * 0.4799, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.setFontColor('#666666');
- c.text(w * 0.5043, h * 0.875, 0, 0, 'space', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontColor('#ffffff');
- c.setGradient('#8B98A8', '#677488', w * 0.0115, h * 0.53, w * 0.1207, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(w * 0.0115, h * 0.53, w * 0.1207, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.setGradient('#8B98A8', '#677488', w * 0.8736, h * 0.53, w * 0.115, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(w * 0.8736, h * 0.53, w * 0.115, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.setGradient('#8B98A8', '#677488', w * 0.0115, h * 0.78, w * 0.2299, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(w * 0.0115, h * 0.78, w * 0.2299, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.setGradient('#8B98A8', '#677488', w * 0.7672, h * 0.78, w * 0.2213, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(w * 0.7672, h * 0.78, w * 0.2213, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.1264, h * 0.875, 0, 0, '.?123', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8779, h * 0.875, 0, 0, 'return', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setShadow(false);
- c.setLineJoin('round');
- c.setStrokeColor('#ffffff');
- c.setFillColor('#ffffff');
- c.setStrokeWidth(1.5);
- c.begin();
- c.moveTo(w * 0.0402, h * 0.635);
- c.lineTo(w * 0.0718, h * 0.58);
- c.lineTo(w * 0.1034, h * 0.635);
- c.lineTo(w * 0.0862, h * 0.635);
- c.lineTo(w * 0.0862, h * 0.67);
- c.lineTo(w * 0.0575, h * 0.67);
- c.lineTo(w * 0.0575, h * 0.635);
- c.close();
- c.stroke();
- c.begin();
- c.moveTo(w * 0.9109, h * 0.585);
- c.lineTo(w * 0.9655, h * 0.585);
- c.lineTo(w * 0.9655, h * 0.665);
- c.lineTo(w * 0.9109, h * 0.665);
- c.lineTo(w * 0.8879, h * 0.625);
- c.close();
- c.fillAndStroke();
- c.setStrokeColor('#677488');
- c.begin();
- c.moveTo(w * 0.9224, h * 0.605);
- c.lineTo(w * 0.9454, h * 0.645);
- c.moveTo(w * 0.9224, h * 0.645);
- c.lineTo(w * 0.9454, h * 0.605);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IKEYB_LETTERS] = mxShapeMockupiKeybLetters;
- //**********************************************************************************************************************************************************
- //Keyboard (numbers)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiKeybNumbers(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiKeybNumbers, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiKeybNumbers.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(true);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiKeybNumbers.prototype.background = function(c, x, y, w, h)
- {
- c.setGradient('#8A97A7', '#425163', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fill();
- };
- mxShapeMockupiKeybNumbers.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setGradient('#EEF3F9', '#DBE2E9', w * 0.0086, h * 0.03, w * 0.0776, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- rSizeX = w * 0.0144;
- rSizeY = h * 0.025;
- c.setFontSize(10.5);
- c.setFontColor('#000000');
- c.roundrect(w * 0.0086, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.0474, h * 0.125, 0, 0, '1', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1092, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.148, h * 0.125, 0, 0, '2', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2098, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2486, h * 0.125, 0, 0, '3', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3103, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3491, h * 0.125, 0, 0, '4', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4109, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.4497, h * 0.125, 0, 0, '5', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5115, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5503, h * 0.125, 0, 0, '6', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.6121, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6509, h * 0.125, 0, 0, '7', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.7126, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7514, h * 0.125, 0, 0, '8', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.8132, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.852, h * 0.125, 0, 0, '9', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.9138, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.9526, h * 0.125, 0, 0, '0', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.0086, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.0474, h * 0.375, 0, 0, '-', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1092, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.148, h * 0.375, 0, 0, '/', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2098, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2486, h * 0.375, 0, 0, ':', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3103, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3491, h * 0.375, 0, 0, ';', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4109, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.4497, h * 0.375, 0, 0, '(', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5115, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5503, h * 0.375, 0, 0, ')', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.6121, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6509, h * 0.375, 0, 0, '$', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.7126, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7514, h * 0.375, 0, 0, '&', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.8132, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.852, h * 0.375, 0, 0, '@', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.9138, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.9526, h * 0.375, 0, 0, '\"', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1638, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2227, h * 0.625, 0, 0, '.', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3046, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3635, h * 0.625, 0, 0, ',', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4454, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5043, h * 0.625, 0, 0, '?', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5862, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6451, h * 0.625, 0, 0, '!', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.727, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7859, h * 0.625, 0, 0, '\'', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2644, h * 0.78, w * 0.4799, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.setFontColor('#666666');
- c.text(w * 0.5043, h * 0.875, 0, 0, 'space', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setGradient('#8B98A8', '#677488', w * 0.0115, h * 0.53, w * 0.1207, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setFontColor('#ffffff');
- c.roundrect(w * 0.0115, h * 0.53, w * 0.1207, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.roundrect(w * 0.8736, h * 0.53, w * 0.115, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.roundrect(w * 0.0115, h * 0.78, w * 0.2299, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.roundrect(w * 0.7672, h * 0.78, w * 0.2213, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.0718, h * 0.625, 0, 0, '#+=', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1264, h * 0.875, 0, 0, 'ABC', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8779, h * 0.875, 0, 0, 'return', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setShadow(false);
- c.setLineJoin('round');
- c.setStrokeColor('#ffffff');
- c.setFillColor('#ffffff');
- c.setStrokeWidth(1.5);
- c.begin();
- c.moveTo(w * 0.9109, h * 0.585);
- c.lineTo(w * 0.9655, h * 0.585);
- c.lineTo(w * 0.9655, h * 0.665);
- c.lineTo(w * 0.9109, h * 0.665);
- c.lineTo(w * 0.8879, h * 0.625);
- c.close();
- c.fillAndStroke();
- c.setStrokeColor('#677488');
- c.begin();
- c.moveTo(w * 0.9224, h * 0.605);
- c.lineTo(w * 0.9454, h * 0.645);
- c.moveTo(w * 0.9224, h * 0.645);
- c.lineTo(w * 0.9454, h * 0.605);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IKEYB_NUMBERS] = mxShapeMockupiKeybNumbers;
- //**********************************************************************************************************************************************************
- //Keyboard (symbols)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiKeybSymbols(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiKeybSymbols, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiKeybSymbols.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(true);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiKeybSymbols.prototype.background = function(c, x, y, w, h)
- {
- c.setGradient('#8A97A7', '#425163', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fill();
- };
- mxShapeMockupiKeybSymbols.prototype.foreground = function(c, x, y, w, h, strokeColor)
- {
- c.setGradient('#EEF3F9', '#DBE2E9', w * 0.0086, h * 0.03, w * 0.0776, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- rSizeX = w * 0.0144;
- rSizeY = h * 0.025;
- c.setFontSize(10.5);
- c.setFontColor('#000000');
- c.roundrect(w * 0.0086, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.0474, h * 0.125, 0, 0, '[', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1092, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.148, h * 0.125, 0, 0, ']', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2098, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2486, h * 0.125, 0, 0, '{', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3103, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3491, h * 0.125, 0, 0, '}', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4109, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.4497, h * 0.125, 0, 0, '#', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5115, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5503, h * 0.125, 0, 0, '%', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.6121, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6509, h * 0.125, 0, 0, '^', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.7126, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7514, h * 0.125, 0, 0, '*', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.8132, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.852, h * 0.125, 0, 0, '+', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.9138, h * 0.03, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.9526, h * 0.125, 0, 0, '=', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.0086, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.0474, h * 0.375, 0, 0, '_', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1092, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.148, h * 0.375, 0, 0, '\\', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2098, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2486, h * 0.375, 0, 0, '|', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3103, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3491, h * 0.375, 0, 0, '~', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4109, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.4497, h * 0.375, 0, 0, '<', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5115, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5503, h * 0.375, 0, 0, '>', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.6121, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6509, h * 0.375, 0, 0, String.fromCharCode(128), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.7126, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7514, h * 0.375, 0, 0, String.fromCharCode(parseInt('00A3', 16)), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.8132, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.852, h * 0.375, 0, 0, String.fromCharCode(parseInt('00A5', 16)), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.9138, h * 0.28, w * 0.0776, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.9526, h * 0.375, 0, 0, String.fromCharCode(parseInt('0095', 16)), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.1638, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.2227, h * 0.625, 0, 0, '.', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.3046, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.3635, h * 0.625, 0, 0, ',', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.4454, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.5043, h * 0.625, 0, 0, '?', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.5862, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.6451, h * 0.625, 0, 0, '!', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.727, h * 0.53, w * 0.1178, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.7859, h * 0.625, 0, 0, '\'', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.roundrect(w * 0.2644, h * 0.78, w * 0.4799, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.setFontColor('#666666');
- c.text(w * 0.5043, h * 0.875, 0, 0, 'space', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setGradient('#8B98A8', '#677488', w * 0.0115, h * 0.53, w * 0.1207, h * 0.19, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setFontColor('#ffffff');
- c.roundrect(w * 0.0115, h * 0.53, w * 0.1207, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.roundrect(w * 0.8736, h * 0.53, w * 0.115, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.roundrect(w * 0.0115, h * 0.78, w * 0.2299, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.roundrect(w * 0.7672, h * 0.78, w * 0.2213, h * 0.19, rSizeX, rSizeY);
- c.fill();
- c.text(w * 0.0718, h * 0.625, 0, 0, '123', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1264, h * 0.875, 0, 0, 'ABC', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8779, h * 0.875, 0, 0, 'return', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setShadow(false);
- c.setLineJoin('round');
- c.setStrokeColor('#ffffff');
- c.setFillColor('#ffffff');
- c.setStrokeWidth(1.5);
- c.begin();
- c.moveTo(w * 0.9109, h * 0.585);
- c.lineTo(w * 0.9655, h * 0.585);
- c.lineTo(w * 0.9655, h * 0.665);
- c.lineTo(w * 0.9109, h * 0.665);
- c.lineTo(w * 0.8879, h * 0.625);
- c.close();
- c.fillAndStroke();
- c.setStrokeColor('#677488');
- c.begin();
- c.moveTo(w * 0.9224, h * 0.605);
- c.lineTo(w * 0.9454, h * 0.645);
- c.moveTo(w * 0.9224, h * 0.645);
- c.lineTo(w * 0.9454, h * 0.605);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IKEYB_SYMBOLS] = mxShapeMockupiKeybSymbols;
- //**********************************************************************************************************************************************************
- //Delete App
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiDeleteApp(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiDeleteApp, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiDeleteApp.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '').toString();
- c.translate(x, y);
- this.background(c, x, y, w, h, strokeColor);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiDeleteApp.prototype.background = function(c, x, y, w, h, strokeColor)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '').toString();
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '').toString();
- c.setGradient(fillColor, fillColor2, 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeWidth(1.5);
- c.setStrokeColor(strokeColor);
- c.ellipse(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiDeleteApp.prototype.foreground = function(c, x, y, w, h)
- {
- c.setStrokeWidth(2.5);
- c.begin();
- c.moveTo(w * 0.3, h * 0.3);
- c.lineTo(w * 0.7, h * 0.7);
- c.moveTo(w * 0.3, h * 0.7);
- c.lineTo(w * 0.7, h * 0.3);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IDELETE_APP] = mxShapeMockupiDeleteApp;
- //**********************************************************************************************************************************************************
- //Direction
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiDirection(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiDirection, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiDirection.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiDirection.prototype.background = function(c, x, y, w, h)
- {
- c.setStrokeWidth(0.5);
- c.setStrokeColor('#008cff');
- c.ellipse(0, 0, w, h);
- c.stroke();
- };
- mxShapeMockupiDirection.prototype.foreground = function(c, x, y, w, h)
- {
- c.setAlpha(1);
- c.setGradient('#ffffff', '#ffffff', w * 0.29, h * 0.2, w * 0.42, h * 0.3, mxConstants.DIRECTION_NORTH, 1, 0);
- c.begin();
- c.moveTo(w * 0.29, h * 0.2);
- c.lineTo(w * 0.5, h * 0.5);
- c.lineTo(w * 0.71, h * 0.2);
- c.fillAndStroke();
- c.setStrokeColor('#006cdf');
- c.setGradient('#ffffff', '#007cef', w * 0.47, h * 0.47, w * 0.06, h * 0.06, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setAlpha(1);
- c.ellipse(w * 0.47, h * 0.47, w * 0.06, h * 0.06);
- c.fillAndStroke();
- c.setFillColor('#ffffff');
- c.setAlpha(0.8);
- c.ellipse(w * 0.4825, h * 0.4825, w * 0.015, h * 0.015);
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IDIRECTION] = mxShapeMockupiDirection;
- //**********************************************************************************************************************************************************
- //Location Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiLocationBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiLocationBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiLocationBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiLocationBar.prototype.background = function(c, x, y, w, h)
- {
- var barPos = mxUtils.getValue(this.style, mxMockupC.BAR_POS, '80');
- barPos = Math.min(barPos, 100);
- barPos = Math.max(barPos, 0);
- var pointerPos = mxUtils.getValue(this.style, mxMockupC.POINTER_POS, mxMockupC.POINTER_BOTTOM);
- var rSize = 2.5;
- var deadzone = rSize + 7.5; // rounding + pointer width / 2
- var virRange = w - 2 * deadzone;
- var truePos = deadzone + virRange * barPos / 100;
- c.setStrokeWidth(0.5);
- c.setStrokeColor('#000000');
- c.setAlpha(0.7);
- c.begin();
- if (pointerPos === mxMockupC.POINTER_BOTTOM)
- {
- c.setGradient('#000000', '#888888', 0, 0, w, h, mxConstants.DIRECTION_NORTH, 1, 1);
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize - 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h - 7.5);
- c.lineTo(truePos + 7.5, h - 7.5);
- c.lineTo(truePos, h);
- c.lineTo(truePos - 7.5, h - 7.5);
- c.lineTo(rSize, h - 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize - 7.5);
- }
- else if (pointerPos === mxMockupC.POINTER_TOP)
- {
- c.setGradient('#000000', '#888888', 0, 0, w, h, mxConstants.DIRECTION_NORTH, 1, 1);
- c.moveTo(0, rSize + 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 7.5);
- c.lineTo(truePos - 7.5, 7.5);
- c.lineTo(truePos, 0);
- c.lineTo(truePos + 7.5, 7.5);
- c.lineTo(w - rSize, 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize + 7.5);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- }
- c.close();
- c.fillAndStroke();
- };
- mxShapeMockupiLocationBar.prototype.foreground = function(c, x, y, w, h)
- {
- var pointerPos = mxUtils.getValue(this.style, mxMockupC.POINTER_POS, mxMockupC.POINTER_BOTTOM);
- var locText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Some Location');
- c.setAlpha(1);
- c.setFontColor('#ffffff');
- c.setFontSize(9.5);
- if (pointerPos === mxMockupC.POINTER_BOTTOM)
- {
- c.text(5, (h - 7.5) * 0.5, 0, 0, locText, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.translate(w - 20, (h - 7.5) * 0.5 - 7.5);
- }
- else
- {
- c.text(5, (h + 7.5) * 0.5, 0, 0, locText, mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.translate(w - 20, (h + 7.5) * 0.5 - 7.5);
- }
- w = 15;
- h = 15;
- c.setGradient('#8BbEff', '#135Ec8', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeWidth(1.5);
- c.setStrokeColor('#ffffff');
- c.ellipse(0, 0, w, h);
- c.fillAndStroke();
- c.setStrokeWidth(2.5);
- c.begin();
- c.moveTo(w * 0.4, h * 0.22);
- c.lineTo(w * 0.65, h * 0.5);
- c.lineTo(w * 0.4, h * 0.78);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ILOCATION_BAR] = mxShapeMockupiLocationBar;
- //**********************************************************************************************************************************************************
- //Call Dialog
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiCallDialog(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiCallDialog, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiCallDialog.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var rSize = 5;
- c.translate(x, y);
- this.background(c, x, y, w, h, rSize);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, rSize);
- };
- mxShapeMockupiCallDialog.prototype.background = function(c, x, y, w, h, rSize)
- {
- c.setAlpha(0.8);
- c.setStrokeColor('#888888');
- c.setStrokeWidth(1.5);
- c.setFillColor('#000000');
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.fillAndStroke();
- };
- mxShapeMockupiCallDialog.prototype.foreground = function(c, x, y, w, h, rSize)
- {
- c.begin();
- c.moveTo(w * 0.33, 0);
- c.lineTo(w * 0.33, h);
- c.moveTo(w * 0.67, 0);
- c.lineTo(w * 0.67, h);
- c.moveTo(0, h * 0.5);
- c.lineTo(w, h * 0.5);
- c.stroke();
- c.setStrokeColor('#000000');
- c.setFillColor('#ffffff');
- c.setStrokeWidth(0.5);
- c.roundrect(w * 0.1433, h * 0.104, w * 0.0417, h * 0.148, w * 0.02, h * 0.024);
- c.fill();
- c.begin();
- c.moveTo(w * 0.14, h * 0.188);
- c.lineTo(w * 0.14, h * 0.228);
- c.arcTo(w * 0.025, h * 0.03, 0, 0, 0, w * 0.19, h * 0.228);
- c.lineTo(w * 0.19, h * 0.188);
- c.lineTo(w * 0.2, h * 0.188);
- c.lineTo(w * 0.2, h * 0.228);
- c.arcTo(w * 0.0367, h * 0.044, 0, 0, 1, w * 0.17, h * 0.27);
- c.lineTo(w * 0.17, h * 0.296);
- c.lineTo(w * 0.195, h * 0.296);
- c.lineTo(w * 0.195, h * 0.308);
- c.lineTo(w * 0.1367, h * 0.308);
- c.lineTo(w * 0.1367, h * 0.296);
- c.lineTo(w * 0.16, h * 0.296);
- c.lineTo(w * 0.16, h * 0.27);
- c.arcTo(w * 0.0367, h * 0.044, 0, 0, 1, w * 0.13, h * 0.228);
- c.lineTo(w * 0.13, h * 0.188);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1033, h * 0.108);
- c.lineTo(w * 0.24, h * 0.286);
- c.lineTo(w * 0.2317, h * 0.298);
- c.lineTo(w * 0.095, h * 0.12);
- c.close();
- c.fillAndStroke();
- c.rect(w * 0.44, h * 0.128, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.485, h * 0.128, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.53, h * 0.128, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.44, h * 0.186, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.485, h * 0.186, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.53, h * 0.186, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.44, h * 0.244, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.485, h * 0.244, w * 0.033, h * 0.04);
- c.fill();
- c.rect(w * 0.53, h * 0.244, w * 0.033, h * 0.04);
- c.fill();
- c.begin();
- c.moveTo(w * 0.7567, h * 0.18);
- c.lineTo(w * 0.785, h * 0.18);
- c.lineTo(w * 0.825, h * 0.128);
- c.lineTo(w * 0.825, h * 0.28);
- c.lineTo(w * 0.79, h * 0.234);
- c.lineTo(w * 0.7567, h * 0.234);
- c.close();
- c.fill();
- c.setStrokeWidth(1.5);
- c.setStrokeColor('#ffffff');
- c.begin();
- c.moveTo(w * 0.8383, h * 0.16);
- c.arcTo(w * 0.0533, h * 0.064, 0, 0, 1, w * 0.8383, h * 0.252);
- c.moveTo(w * 0.8583, h * 0.134);
- c.arcTo(w * 0.0817, h * 0.098, 0, 0, 1, w * 0.8583, h * 0.276);
- c.moveTo(w * 0.8767, h * 0.11);
- c.arcTo(w * 0.1133, h * 0.136, 0, 0, 1, w * 0.8767, h * 0.304);
- c.stroke();
- c.begin();
- c.moveTo(w * 0.1467, h * 0.62);
- c.lineTo(w * 0.1833, h * 0.62);
- c.lineTo(w * 0.1833,h * 0.676);
- c.lineTo(w * 0.2267,h * 0.676);
- c.lineTo(w * 0.2267,h * 0.724);
- c.lineTo(w * 0.1833,h * 0.724);
- c.lineTo(w * 0.1833,h * 0.78);
- c.lineTo(w * 0.1467,h * 0.78);
- c.lineTo(w * 0.1467,h * 0.724);
- c.lineTo(w * 0.105,h * 0.724);
- c.lineTo(w * 0.105,h * 0.676);
- c.lineTo(w * 0.1467,h * 0.676);
- c.close();
- c.fill();
- c.rect(w * 0.4517, h * 0.624, w * 0.0333, h * 0.152);
- c.fill();
- c.rect(w * 0.5183, h * 0.624, w * 0.0333, h * 0.152);
- c.fill();
- c.begin();
- c.moveTo(w * 0.76, h * 0.752);
- c.arcTo(w * 0.1, h * 0.12, 0, 0, 1, w * 0.8033, h * 0.728);
- c.arcTo(w * 0.0167, h * 0.02, 0, 0, 0, w * 0.8167, h * 0.712);
- c.lineTo(w * 0.8175, h * 0.7);
- c.arcTo(w * 0.0267, h * 0.06, 0, 0, 1, w * 0.8067, h * 0.644);
- c.arcTo(w * 0.0287, h * 0.0344, 0, 0, 1, w * 0.8633, h * 0.644);
- c.arcTo(w * 0.0267, h * 0.06, 0, 0, 1, w * 0.855, h * 0.7);
- c.arcTo(w * 0.05, h * 0.724, 0, 0, 1, w * 0.8633, h * 0.724);
- c.arcTo(w * 0.1667, h * 0.75, 0, 0, 1, w * 0.9083, h * 0.75);
- c.lineTo(w * 0.9083, h * 0.78);
- c.lineTo(w * 0.76, h * 0.78);
- c.close();
- c.fill();
- c.setFontColor('#ffffff');
- c.setFontSize(8.5);
- c.text(w * 0.1667, h * 0.35, 0, 0, 'mute', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.35, 0, 0, 'keypad', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.35, 0, 0, 'speaker', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1667, h * 0.85, 0, 0, 'add', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.85, 0, 0, 'pause', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.85, 0, 0, 'contacts', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setGradient('#808080', '#ffffff', 0, 0, w, h * 0.308, mxConstants.DIRECTION_NORTH, 1, 1);
- c.setAlpha(0.4);
- c.begin();
- c.moveTo(0, h * 0.308);
- c.lineTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h * 0.308);
- c.arcTo(w * 1.5, h * 1.8, 0, 0, 1, 0, h * 0.308);
- c.close();
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICALL_DIALOG] = mxShapeMockupiCallDialog;
- //**********************************************************************************************************************************************************
- //Call Buttons
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiCallButtons(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiCallButtons, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiCallButtons.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiCallButtons.prototype.background = function(c, x, y, w, h)
- {
- c.setStrokeWidth(0.5);
- c.setStrokeColor('#008cff');
- c.setGradient('#0F1B2B', '#4F5B6B', 0, 0, w, h, mxConstants.DIRECTION_NORTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- };
- mxShapeMockupiCallButtons.prototype.foreground = function(c, x, y, w, h)
- {
- c.begin();
- c.moveTo(0, h * 0.1667);
- c.lineTo(w, h * 0.1667);
- c.moveTo(0, h * 0.3333);
- c.lineTo(w, h * 0.3333);
- c.moveTo(0, h * 0.5);
- c.lineTo(w, h * 0.5);
- c.moveTo(0, h * 0.6667);
- c.lineTo(w, h * 0.6667);
- c.moveTo(0, h * 0.8333);
- c.lineTo(w, h * 0.8333);
- c.moveTo(w * 0.3333, h * 0.1667);
- c.lineTo(w * 0.3333, h);
- c.moveTo(w * 0.6667, h * 0.1667);
- c.lineTo(w * 0.6667, h);
- c.stroke();
- c.setFontSize(15.5);
- c.setFontColor('#ffffff');
- c.setFontStyle(mxConstants.FONT_BOLD);
- c.text(w * 0.5, h * 0.0834, 0, 0, '(123) 456-7890', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1667, h * 0.22, 0, 0, '1', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.22, 0, 0, '2', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.22, 0, 0, '3', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1667, h * 0.3867, 0, 0, '3', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.3867, 0, 0, '4', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.3867, 0, 0, '5', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1667, h * 0.5534, 0, 0, '6', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.5534, 0, 0, '7', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.5534, 0, 0, '8', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontSize(27.5);
- c.text(w * 0.1667, h * 0.76, 0, 0, '*', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontSize(15.5);
- c.text(w * 0.5, h * 0.72, 0, 0, '0', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.75, 0, 0, '#', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setGradient('#E2FFEB', '#008215', w * 0.3333, h * 0.8333, w * 0.3333, h * 0.1667, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(w * 0.3333, h * 0.8333, w * 0.3333, h * 0.1667);
- c.fillAndStroke();
- c.text(w * 0.5, h * 0.9168, 0, 0, 'Call', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontStyle(0);
- c.setFontSize(8);
- c.setFontColor('#bbbbbb');
- c.text(w * 0.5, h * 0.28, 0, 0, 'ABC', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.28, 0, 0, 'DEF', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1667, h * 0.4467, 0, 0, 'GHI', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.4467, 0, 0, 'JKL', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.4467, 0, 0, 'MNO', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.1667, h * 0.6134, 0, 0, 'PQRS', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.6134, 0, 0, 'TUV', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.8333, h * 0.6134, 0, 0, 'WXYZ', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.78, 0, 0, '+', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFillColor('#ffffff');
- c.begin();
- c.moveTo(w * 0.1028, h * 0.9464);
- c.arcTo(w * 0.0862, h * 0.0652, 0, 0, 1, w * 0.1402, h * 0.9333);
- c.arcTo(w * 0.0144, h * 0.0109, 0, 0, 0, w * 0.1517, h * 0.9246);
- c.lineTo(w * 0.1524, h * 0.9181);
- c.arcTo(w * 0.023, h * 0.0326, 0, 0, 1, w * 0.143, h * 0.8877);
- c.arcTo(w * 0.0247, h * 0.0187, 0, 0, 1, w * 0.1919, h * 0.8877);
- c.arcTo(w * 0.023, h * 0.0326, 0, 0, 1, w * 0.1847, h * 0.9181);
- c.arcTo(w * 0.0431, h * 0.0174, 0, 0, 0, w * 0.1919, h * 0.9311);
- c.arcTo(w * 0.1437, h * 0.1087, 0, 0, 1, w * 0.2307, h * 0.9453);
- c.lineTo(w * 0.2307, h * 0.9616);
- c.lineTo(w * 0.1028, h * 0.9616);
- c.close();
- c.fill();
- c.setStrokeColor('#ffffff');
- c.setStrokeWidth(2.5);
- c.setLineJoin('round');
- c.begin();
- c.moveTo(w * 0.79, h * 0.89);
- c.lineTo(w * 0.9, h * 0.89);
- c.lineTo(w * 0.9, h * 0.95);
- c.lineTo(w * 0.79, h * 0.95);
- c.lineTo(w * 0.76, h * 0.92);
- c.close();
- c.fillAndStroke();
- c.setStrokeColor('#0F1B2B');
- c.begin();
- c.moveTo(w * 0.82, h * 0.907);
- c.lineTo(w * 0.85, h * 0.933);
- c.moveTo(w * 0.82, h * 0.933);
- c.lineTo(w * 0.85, h * 0.907);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICALL_BUTTONS] = mxShapeMockupiCallButtons;
- //**********************************************************************************************************************************************************
- //Option
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiOption(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiOption, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiOption.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- this.background(c, x, y, w, h);
- c.setShadow(false);
- this.foreground(c, x, y, w, h);
- };
- mxShapeMockupiOption.prototype.background = function(c, x, y, w, h)
- {
- var barPos = mxUtils.getValue(this.style, mxMockupC.BAR_POS, '80');
- barPos = Math.min(barPos, 100);
- barPos = Math.max(barPos, 0);
- var pointerPos = mxUtils.getValue(this.style, mxMockupC.POINTER_POS, mxMockupC.POINTER_BOTTOM);
- var rSize = 2.5;
- var deadzone = rSize + 7.5; // rounding + pointer width / 2
- var virRange = w - 2 * deadzone;
- var truePos = deadzone + virRange * barPos / 100;
- c.setStrokeWidth(0.5);
- c.setStrokeColor('#000000');
- c.setAlpha(0.9);
- c.begin();
- if (pointerPos === mxMockupC.POINTER_BOTTOM)
- {
- c.setGradient('#000000', '#888888', 0, 0, w, h, mxConstants.DIRECTION_NORTH, 1, 1);
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize - 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h - 7.5);
- c.lineTo(truePos + 7.5, h - 7.5);
- c.lineTo(truePos, h);
- c.lineTo(truePos - 7.5, h - 7.5);
- c.lineTo(rSize, h - 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize - 7.5);
- }
- else if (pointerPos === mxMockupC.POINTER_TOP)
- {
- c.setGradient('#000000', '#888888', 0, 0, w, h, mxConstants.DIRECTION_NORTH, 1, 1);
- c.moveTo(0, rSize + 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 7.5);
- c.lineTo(truePos - 7.5, 7.5);
- c.lineTo(truePos, 0);
- c.lineTo(truePos + 7.5, 7.5);
- c.lineTo(w - rSize, 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize + 7.5);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- }
- c.close();
- c.fillAndStroke();
- };
- mxShapeMockupiOption.prototype.foreground = function(c, x, y, w, h)
- {
- var locText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, 'Some Location');
- var pointerPos = mxUtils.getValue(this.style, mxMockupC.POINTER_POS, mxMockupC.POINTER_BOTTOM);
- c.setAlpha(1);
- c.setFontColor('#ffffff');
- c.setFontSize(9.5);
-
- if (pointerPos === mxMockupC.POINTER_BOTTOM)
- {
- c.text(w * 0.5, (h - 7.5) * 0.5, 0, 0, locText, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- }
- else
- {
- c.text(w * 0.5, (h + 7.5) * 0.5, 0, 0, locText, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- }
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IOPTION] = mxShapeMockupiOption;
- //**********************************************************************************************************************************************************
- //Alpha List
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiAlphaList(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiAlphaList, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiAlphaList.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.setShadow(false);
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '8');
- c.setFontColor('#999999');
- c.setFontSize(fontSize);
- c.text(w * 0.5, h * 0.069, 0, 0, 'A', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.1035, 0, 0, 'B', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.138, 0, 0, 'C', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.1725, 0, 0, 'D', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.207, 0, 0, 'E', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.2415, 0, 0, 'F', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.276, 0, 0, 'G', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.3105, 0, 0, 'H', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.345, 0, 0, 'I', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.3795, 0, 0, 'J', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.414, 0, 0, 'K', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.4485, 0, 0, 'L', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.483, 0, 0, 'M', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.5175, 0, 0, 'N', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.552, 0, 0, 'O', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.5865, 0, 0, 'P', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.621, 0, 0, 'Q', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.6555, 0, 0, 'R', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.69, 0, 0, 'S', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.7245, 0, 0, 'T', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.759, 0, 0, 'U', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.7935, 0, 0, 'V', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.828, 0, 0, 'W', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.8625, 0, 0, 'X', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.897, 0, 0, 'Y', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.9315, 0, 0, 'Z', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.text(w * 0.5, h * 0.966, 0, 0, '#', mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setStrokeColor('#999999');
- c.ellipse(w * 0.5 - 2.25, h * 0.0345 - 3.5, 4.5, 4.5);
- c.stroke();
- c.begin();
- c.moveTo(w * 0.5 - 4.25, h * 0.0345 + 3);
- c.lineTo(w * 0.5 - 1.75, h * 0.0345);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IALPHA_LIST] = mxShapeMockupiAlphaList;
- //**********************************************************************************************************************************************************
- //Horizontal Button Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiHorButtonBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiHorButtonBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiHorButtonBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var textStrings = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, '+Button 1, Button 2, Button 3').toString().split(',');
- var fontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR, '#666666');
- var selectedFontColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR2, '#ffffff');
- var fontSize = mxUtils.getValue(this.style, mxConstants.STYLE_FONTSIZE, '8.5').toString();
- var frameColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#666666');
- var separatorColor = mxUtils.getValue(this.style, mxMockupC.STYLE_STROKECOLOR2, '#c4c4c4');
- var bgColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '#ffffff');
- var selectedFillColor = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '#008cff');
- var buttonNum = textStrings.length;
- var buttonWidths = new Array(buttonNum);
- var buttonTotalWidth = 0;
- var selectedButton = -1;
- var rSize = 2.5; //rounding size
- var labelOffset = 2.5;
- for (var i = 0; i < buttonNum; i++)
- {
- var buttonText = textStrings[i];
- if(buttonText.charAt(0) === mxMockupC.SELECTED)
- {
- buttonText = textStrings[i].substring(1);
- selectedButton = i;
- }
- buttonWidths[i] = mxUtils.getSizeForString(buttonText, fontSize, mxConstants.DEFAULT_FONTFAMILY).width;
- buttonTotalWidth += buttonWidths[i];
- }
- var trueH = Math.max(h, fontSize * 1.5, 10);
- var minW = 2 * labelOffset * buttonNum + buttonTotalWidth;
- var trueW = Math.max(w, minW);
- c.translate(x, y);
- this.background(c, trueW, trueH, rSize, buttonNum, buttonWidths, labelOffset, minW, frameColor, separatorColor, bgColor, selectedFillColor, selectedButton);
- c.setShadow(false);
- var currWidth = 0;
- for (var i = 0; i < buttonNum; i++)
- {
- if (i === selectedButton)
- {
- c.setFontColor(selectedFontColor);
- }
- else
- {
- c.setFontColor(fontColor);
- }
- currWidth = currWidth + labelOffset;
- this.buttonText(c, currWidth, trueH, textStrings[i], buttonWidths[i], fontSize, minW, trueW);
- currWidth = currWidth + buttonWidths[i] + labelOffset;
- }
- };
- mxShapeMockupiHorButtonBar.prototype.background = function(c, w, h, rSize, buttonNum, buttonWidths, labelOffset, minW, frameColor, separatorColor, bgColor, selectedFillColor, selectedButton)
- {
- c.begin();
- //draw the frame
- c.setStrokeColor(frameColor);
- c.setFillColor(bgColor);
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.fillAndStroke();
- //draw the button separators
- c.setStrokeColor(separatorColor);
- c.begin();
- for (var i = 1; i < buttonNum; i++)
- {
- if (i !== selectedButton && i !== (selectedButton + 1))
- {
- var currWidth = 0;
- for (var j = 0; j < i; j++)
- {
- currWidth += buttonWidths[j] + 2 * labelOffset;
- }
- currWidth = currWidth * w / minW;
- c.moveTo(currWidth, 0);
- c.lineTo(currWidth, h);
- }
- }
- c.stroke();
- //draw the selected button
- var buttonLeft = 0;
- c.setStrokeColor(mxConstants.NONE);
- for (var i = 0; i < selectedButton; i++)
- {
- buttonLeft += buttonWidths[i] + 2 * labelOffset;
- }
- buttonLeft = buttonLeft * w / minW;
- var buttonRight = (buttonWidths[selectedButton] + 2 * labelOffset) * w / minW;
- buttonRight += buttonLeft;
- if (selectedButton === 0)
- {
- c.setGradient('#5D7585', '#008cff', 0, 0, buttonRight, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- // we draw a path for the first button
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(buttonRight, 0);
- c.lineTo(buttonRight, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.fill();
- }
- else if (selectedButton === buttonNum - 1)
- {
- c.setGradient('#5D7585', '#008cff', buttonLeft, 0, buttonRight - buttonLeft, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- // we draw a path for the last button
- c.moveTo(buttonLeft, 0);
- c.lineTo(buttonRight - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, buttonRight, rSize);
- c.lineTo(buttonRight, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, buttonRight - rSize, h);
- c.lineTo(buttonLeft, h);
- c.close();
- c.fill();
- }
- else if (selectedButton !== -1)
- {
- c.setGradient('#5D7585', '#008cff', buttonLeft, 0, buttonRight - buttonLeft, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- // we draw a path rectangle for one of the buttons in the middle
- c.moveTo(buttonLeft, 0);
- c.lineTo(buttonRight, 0);
- c.lineTo(buttonRight, h);
- c.lineTo(buttonLeft, h);
- c.close();
- c.fill();
- }
- //draw the frame again, to achieve a nicer effect
- c.setStrokeColor(frameColor);
- c.setFillColor(bgColor);
- c.begin();
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.stroke();
- };
- mxShapeMockupiHorButtonBar.prototype.buttonText = function(c, w, h, textString, buttonWidth, fontSize, minW, trueW)
- {
- if(textString.charAt(0) === mxMockupC.SELECTED)
- {
- textString = textString.substring(1);
- }
- c.begin();
- c.setFontSize(fontSize);
- c.text((w + buttonWidth * 0.5) * trueW / minW, h * 0.5, 0, 0, textString, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IHOR_BUTTON_BAR] = mxShapeMockupiHorButtonBar;
- //**********************************************************************************************************************************************************
- //Pin
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiPin(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiPin, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiPin.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '#000000');
- var fillColor3 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR3, '#000000');
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');
- c.setShadow(false);
- c.translate(x, y);
- c.setStrokeWidth(1.5);
- c.setStrokeColor('#666666');
- c.begin();
- c.moveTo(w * 0.5, h * 0.4);
- c.lineTo(w * 0.5, h);
- c.stroke();
- c.setStrokeWidth(1);
- c.setStrokeColor(strokeColor);
- c.setGradient(fillColor2, fillColor3, 0, 0, w, h * 0.4, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setAlpha(0.9);
- c.ellipse(0, 0, w, h * 0.4);
- c.fillAndStroke();
- c.setFillColor('#ffffff');
- c.setAlpha(0.5);
- c.ellipse(w * 0.2, h * 0.08, w * 0.3, h * 0.12);
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IPIN] = mxShapeMockupiPin;
- //**********************************************************************************************************************************************************
- //Video Controls
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiVideoControls(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiVideoControls, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiVideoControls.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var rSize = 5;
- c.setStrokeWidth(1);
- c.setFillColor('#000000');
- c.setStrokeColor('#bbbbbb');
- c.setAlpha(0.7);
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.fillAndStroke();
- c.setShadow(false);
- this.foreground(c, w, h, rSize);
- };
- mxShapeMockupiVideoControls.prototype.foreground = function(c, w, h, rSize)
- {
- c.setGradient('#ffffff', '#ffffff', 0, 0, w, h * 0.5, mxConstants.DIRECTION_SOUTH, 0.8, 0.1);
- c.begin();
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h * 0.5);
- c.lineTo(0, h * 0.5);
- c.close();
- c.fill();
- c.setAlpha(1);
- c.setFillColor('#ffffff');
- c.setStrokeColor('#ffffff');
- var iconX = w * 0.1;
- var iconY = h * 0.35;
- c.begin();
- c.moveTo(iconX - 7.5, iconY - 2.5);
- c.arcTo(6, 6, 0, 0, 1, iconX, iconY - 2.5);
- c.arcTo(6, 6, 0, 0, 1, iconX + 7.5, iconY - 2.5);
- c.lineTo(iconX + 7.5, iconY + 4);
- c.arcTo(6, 6, 0, 0, 0, iconX, iconY + 4);
- c.arcTo(6, 6, 0, 0, 0, iconX - 7.5, iconY + 4);
- c.close();
- c.stroke();
- c.begin();
- c.moveTo(iconX, iconY - 2.5);
- c.lineTo(iconX, iconY + 4);
- c.stroke();
- iconX = w * 0.3;
- c.rect(iconX - 7.5, iconY - 5, 1, 10);
- c.fill();
- c.begin();
- c.moveTo(iconX - 6.5, iconY);
- c.lineTo(iconX + 0.5, iconY - 5);
- c.lineTo(iconX + 0.5, iconY + 5);
- c.close();
- c.fill();
- c.begin();
- c.moveTo(iconX + 0.5, iconY);
- c.lineTo(iconX + 7.5, iconY - 5);
- c.lineTo(iconX + 7.5, iconY + 5);
- c.close();
- c.fill();
- iconX = w * 0.5;
- c.begin();
- c.moveTo(iconX - 6, iconY - 5);
- c.lineTo(iconX + 6, iconY);
- c.lineTo(iconX - 6, iconY + 5);
- c.close();
- c.fill();
- iconX = w * 0.7;
- c.begin();
- c.moveTo(iconX - 7.5, iconY - 5);
- c.lineTo(iconX - 0.5, iconY);
- c.lineTo(iconX - 7.5, iconY + 5);
- c.close();
- c.fill();
- c.begin();
- c.moveTo(iconX - 0.5, iconY - 5);
- c.lineTo(iconX + 6.5, iconY);
- c.lineTo(iconX - 0.5, iconY + 5);
- c.close();
- c.fill();
- c.rect(iconX + 6.5, iconY - 5, 1, 10);
- c.fill();
- iconX = w * 0.9;
- c.rect(iconX - 7.5, iconY - 4, 15, 8);
- c.stroke();
- c.setStrokeWidth(0.5);
- c.begin();
- c.moveTo(iconX - 7.5, iconY - 4);
- c.lineTo(iconX, iconY + 1.5);
- c.lineTo(iconX + 7.5, iconY - 4);
- c.stroke();
- c.begin();
- c.moveTo(iconX - 7.5, iconY + 4);
- c.lineTo(iconX - 2, iconY);
- c.stroke();
- c.begin();
- c.moveTo(iconX + 7.5, iconY + 4);
- c.lineTo(iconX + 2, iconY);
- c.stroke();
- c.setGradient('#444444', '#ffffff', w * 0.1, h * 0.75 - 2.5, w * 0.8, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(w * 0.1, h * 0.75 - 2.5, w * 0.8, 5, 2.5, 2.5);
- c.fill();
- var barPos = mxUtils.getValue(this.style, mxMockupC.BAR_POS, '80');
- barPos = Math.min(barPos, 100);
- barPos = Math.max(barPos, 0);
- var deadzone = w * 0.1;
- var virRange = w - 2 * deadzone;
- var truePos = deadzone + virRange * barPos / 100;
- c.setGradient('#96D1FF', '#003377', w * 0.1, h * 0.75 - 5, truePos - w * 0.1, 10, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- c.moveTo(truePos, h * 0.75 - 2.5);
- c.lineTo(truePos, h * 0.75 + 2.5);
- c.lineTo(w * 0.1 + 2.5, h * 0.75 + 2.5);
- c.arcTo(2.5, 2.5, 0, 0, 1, w * 0.1 + 2.5, h * 0.75 - 2.5);
- c.close();
- c.fill();
- c.setStrokeColor('#999999');
- c.setGradient('#444444', '#ffffff', truePos - 5, h * 0.75 - 5, 10, 10, mxConstants.DIRECTION_NORTH, 1, 1);
- c.ellipse(truePos - 5, h * 0.75 - 5, 10, 10);
- c.fillAndStroke();
- c.setStrokeColor('#dddddd');
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IVIDEO_CONTROLS] = mxShapeMockupiVideoControls;
- Graph.handleFactory[mxMockupC.SHAPE_IVIDEO_CONTROLS] = function(state)
- {
- var handles = [Graph.createHandle(state, ['barPos'], function(bounds)
- {
- var barPos = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'barPos', 40))));
- return new mxPoint(bounds.x + bounds.width * 0.1 + barPos * bounds.width * 0.8 / 100, bounds.y + bounds.height * 0.75);
- }, function(bounds, pt)
- {
- this.state.style['barPos'] = Math.round(100 * Math.max(0, Math.min(100, (pt.x - bounds.width * 0.1 - bounds.x) * 100 / (bounds.width * 0.8)))) / 100;
- })];
-
- return handles;
- };
- //**********************************************************************************************************************************************************
- //URL Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiURLBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiURLBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiURLBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.setGradient('#cccccc', '#003377', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fill();
- c.setShadow(false);
- this.foreground(c, w, h);
- };
- mxShapeMockupiURLBar.prototype.foreground = function(c, w, h)
- {
- c.setStrokeWidth(0.5);
- c.setFillColor('#ffffff');
- c.setStrokeColor('#008cff');
- c.roundrect(w * 0.0287, h * 0.625 - 6.25, w * 0.7184, 12.5, 6.25, 6.25);
- c.fillAndStroke();
- c.setGradient('#cccccc', '#001144', w * 0.7816, h * 0.625 - 6.25, w * 0.1868, 12.5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setStrokeColor('#000000');
- c.roundrect(w * 0.7816, h * 0.625 - 6.25, w * 0.1868, 12.5, 2.5, 2.5);
- c.fillAndStroke();
- c.setFillColor('#bbbbbb');
- c.ellipse(w * 0.7471 - 11.5, h * 0.625 - 5, 10, 10);
- c.fill();
- c.setStrokeColor('#ffffff');
- c.setStrokeWidth(1.5);
- c.begin();
- c.moveTo(w * 0.7471 - 8.5, h * 0.625 - 2.5);
- c.lineTo(w * 0.7471 - 3.5, h * 0.625 + 2.5);
- c.moveTo(w * 0.7471 - 8.5, h * 0.625 + 2.5);
- c.lineTo(w * 0.7471 - 3.5, h * 0.625 - 2.5);
- c.stroke();
- var fieldText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, '').toString().split(',');
- c.setFontColor('#425664');
- c.setFontStyle(mxConstants.FONT_BOLD);
- c.setFontSize(8);
- c.text(w * 0.5, h * 0.2, 0, 0, fieldText[0], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontColor('#000000');
- c.text(w * 0.06, h * 0.625, 0, 0, fieldText[1], mxConstants.ALIGN_LEFT, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- c.setFontColor('#ffffff');
- c.text(w * 0.875, h * 0.625, 0, 0, fieldText[2], mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IURL_BAR] = mxShapeMockupiURLBar;
- //**********************************************************************************************************************************************************
- //Slider
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiSlider(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiSlider, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiSlider.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.setShadow(false);
- this.foreground(c, w, h);
- };
- mxShapeMockupiSlider.prototype.foreground = function(c, w, h)
- {
- c.setStrokeWidth(0.5);
- c.setGradient('#444444', '#ffffff', 0, h * 0.5 - 2.5, w, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(0, h * 0.5 - 2.5, w, 5, 2.5, 2.5);
- c.fill();
- var barPos = mxUtils.getValue(this.style, mxMockupC.BAR_POS, '80');
- barPos = Math.min(barPos, 100);
- barPos = Math.max(barPos, 0);
- var deadzone = 0;
- var virRange = w - 2 * deadzone;
- var truePos = deadzone + virRange * barPos / 100;
- c.setGradient('#96D1FF', '#003377', 2.5, h * 0.5 - 2.5, truePos - 2.5, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- c.moveTo(truePos, h * 0.5 - 2.5);
- c.lineTo(truePos, h * 0.5 + 2.5);
- c.lineTo(2.5, h * 0.5 + 2.5);
- c.arcTo(2.5, 2.5, 0, 0, 1, 2.5, h * 0.5 - 2.5);
- c.close();
- c.fill();
- c.setStrokeColor('#999999');
- c.setGradient('#444444', '#ffffff', truePos - 5, h * 0.5 - 5, 10, 10, mxConstants.DIRECTION_NORTH, 1, 1);
- c.ellipse(truePos - 5, h * 0.5 - 5, 10, 10);
- c.fillAndStroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ISLIDER] = mxShapeMockupiSlider;
- Graph.handleFactory[mxMockupC.SHAPE_ISLIDER] = function(state)
- {
- var handles = [Graph.createHandle(state, ['barPos'], function(bounds)
- {
- var barPos = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'barPos', 0.4))));
- return new mxPoint(bounds.x + barPos * bounds.width / 100, bounds.y + bounds.height / 2);
- }, function(bounds, pt)
- {
- this.state.style['barPos'] = Math.round(100 * Math.max(0, Math.min(100, (pt.x - bounds.x) * 100 / bounds.width))) / 100;
- })];
-
- return handles;
- };
- //**********************************************************************************************************************************************************
- //Progress Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiProgressBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiProgressBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiProgressBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.setShadow(false);
- this.foreground(c, w, h);
- };
- mxShapeMockupiProgressBar.prototype.foreground = function(c, w, h)
- {
- c.setStrokeWidth(0.5);
- c.setGradient('#444444', '#ffffff', 0, h * 0.5 - 2.5, w, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.roundrect(0, h * 0.5 - 2.5, w, 5, 2.5, 2.5);
- c.fill();
- var barPos = mxUtils.getValue(this.style, mxMockupC.BAR_POS, '80');
- barPos = Math.min(barPos, 100);
- barPos = Math.max(barPos, 0);
- var deadzone = 0;
- var virRange = w - 2 * deadzone;
- var truePos = deadzone + virRange * barPos / 100;
- c.setGradient('#96D1FF', '#003377', 2.5, h * 0.5 - 2.5, truePos - 2.5, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.begin();
- c.moveTo(truePos, h * 0.5 - 2.5);
- c.arcTo(2.5, 2.5, 0, 0, 1, truePos, h * 0.5 + 2.5);
- c.lineTo(2.5, h * 0.5 + 2.5);
- c.arcTo(2.5, 2.5, 0, 0, 1, 2.5, h * 0.5 - 2.5);
- c.close();
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IPROGRESS_BAR] = mxShapeMockupiProgressBar;
- Graph.handleFactory[mxMockupC.SHAPE_IPROGRESS_BAR] = function(state)
- {
- var handles = [Graph.createHandle(state, ['barPos'], function(bounds)
- {
- var barPos = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'barPos', 0.4))));
- return new mxPoint(bounds.x + barPos * bounds.width / 100, bounds.y + bounds.height / 2);
- }, function(bounds, pt)
- {
- this.state.style['barPos'] = Math.round(100 * Math.max(0, Math.min(100, (pt.x - bounds.x) * 100 / bounds.width))) / 100;
- })];
-
- return handles;
- };
- //**********************************************************************************************************************************************************
- //iCloud Progress Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiCloudProgressBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiCloudProgressBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiCloudProgressBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.setShadow(false);
- this.foreground(c, w, h);
- };
- mxShapeMockupiCloudProgressBar.prototype.foreground = function(c, w, h)
- {
- c.setStrokeWidth(0.5);
- c.setFillColor('#5C6E86');
- c.rect(0, h * 0.5 - 2.5, w, 5);
- c.fill();
- var barPos = mxUtils.getValue(this.style, mxMockupC.BAR_POS, '80');
- barPos = Math.min(barPos, 100);
- barPos = Math.max(barPos, 0);
- var deadzone = 0;
- var virRange = w - 2 * deadzone;
- var truePos = deadzone + virRange * barPos / 100;
- c.setFillColor('#8AD155');
- c.rect(0, h * 0.5 - 2.5, truePos, 5);
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICLOUD_PROGRESS_BAR] = mxShapeMockupiCloudProgressBar;
- Graph.handleFactory[mxMockupC.SHAPE_ICLOUD_PROGRESS_BAR] = function(state)
- {
- var handles = [Graph.createHandle(state, ['barPos'], function(bounds)
- {
- var barPos = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'barPos', 0.4))));
- return new mxPoint(bounds.x + barPos * bounds.width / 100, bounds.y + bounds.height / 2);
- }, function(bounds, pt)
- {
- this.state.style['barPos'] = Math.round(100 * Math.max(0, Math.min(100, (pt.x - bounds.x) * 100 / bounds.width))) / 100;
- })];
-
- return handles;
- };
- //**********************************************************************************************************************************************************
- //Download Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiDownloadBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiDownloadBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiDownloadBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.setGradient('#00ccff', '#0066cc', 0, 0, w, h, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.rect(0, 0, w, h);
- c.fill();
- c.setShadow(false);
- this.foreground(c, w, h);
- };
- mxShapeMockupiDownloadBar.prototype.foreground = function(c, w, h)
- {
- var fieldText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, '');
- c.setFontColor('#ffffff');
- c.setFontStyle(mxConstants.FONT_BOLD);
- c.setFontSize(8);
- c.text(w * 0.5, h * 0.2, 0, 0, fieldText, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- var barPos = mxUtils.getValue(this.style, mxMockupC.BAR_POS, '80');
- barPos = Math.min(barPos, 100);
- barPos = Math.max(barPos, 0);
- var deadzone = w * 0.1;
- var virRange = w - 2 * deadzone;
- var truePos = deadzone + virRange * barPos / 100;
- c.setStrokeWidth(0.5);
- c.setGradient('#96D1FF', '#003377', deadzone, h * 0.65 - 2.5, w - 2 * deadzone, 5, mxConstants.DIRECTION_NORTH, 1, 1);
- c.roundrect(deadzone, h * 0.65 - 2.5, w - 2 * deadzone, 5, 2.5, 2.5);
- c.fill();
- c.setGradient('#aaaaaa', '#ffffff', deadzone + 2.5, h * 0.65 - 2.5, truePos - deadzone - 2.5, 5, mxConstants.DIRECTION_NORTH, 1, 1);
- c.begin();
- c.moveTo(truePos, h * 0.65 - 2.5);
- c.arcTo(2.5, 2.5, 0, 0, 1, truePos, h * 0.65 + 2.5);
- c.lineTo(deadzone + 2.5, h * 0.65 + 2.5);
- c.arcTo(2.5, 2.5, 0, 0, 1, deadzone + 2.5, h * 0.65 - 2.5);
- c.close();
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IDOWNLOAD_BAR] = mxShapeMockupiDownloadBar;
- Graph.handleFactory[mxMockupC.SHAPE_IDOWNLOAD_BAR] = function(state)
- {
- var handles = [Graph.createHandle(state, ['barPos'], function(bounds)
- {
- var barPos = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'barPos', 40))));
- return new mxPoint(bounds.x + bounds.width * 0.1 + barPos * bounds.width * 0.8 / 100, bounds.y + bounds.height * 0.65);
- }, function(bounds, pt)
- {
- this.state.style['barPos'] = Math.round(100 * Math.max(0, Math.min(100, (pt.x - bounds.width * 0.1 - bounds.x) * 100 / (bounds.width * 0.8)))) / 100;
- })];
-
- return handles;
- };
- //**********************************************************************************************************************************************************
- //Screen Name Bar
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiScreenNameBar(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiScreenNameBar, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiScreenNameBar.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var rSize = 5;
- c.setStrokeWidth(0.5);
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '#00ff00');
- c.setFillColor(fillColor2);
- c.rect(0, 0, w, h);
- c.fill();
- c.setShadow(false);
- this.foreground(c, w, h, rSize);
- };
- mxShapeMockupiScreenNameBar.prototype.foreground = function(c, w, h, rSize)
- {
- var fillColor3 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR3, '#00ff00');
- c.setGradient(fillColor3, fillColor3, 0, 0, w, h * 0.5, mxConstants.DIRECTION_SOUTH, 0.8, 0.1);
- c.rect(0, 0, w, h * 0.5);
- c.fill();
- var fieldText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, '');
- var textColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR, '#00ff00');
- c.setFontColor(textColor);
- c.setFontSize(9.5);
- c.text(w * 0.5, h * 0.45, 0, 0, fieldText, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ISCREEN_NAME_BAR] = mxShapeMockupiScreenNameBar;
- //**********************************************************************************************************************************************************
- //Icon Grid
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiIconGrid(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiIconGrid, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiIconGrid.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var gridSize = mxUtils.getValue(this.style, mxMockupC.GRID_SIZE, '3,3').toString().split(',');
- this.background(c, w, h, gridSize);
- c.setShadow(false);
- this.foreground(c, w, h, gridSize);
- };
- mxShapeMockupiIconGrid.prototype.background = function(c, w, h, gridSize)
- {
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '#00ff00');
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#00ff00');
- c.setStrokeColor(strokeColor);
- c.setFillColor(fillColor);
- var boxSizeX = w / (parseInt(gridSize[0],10) + (gridSize[0]-1) * 0.5);
- var boxSizeY = h / (parseInt(gridSize[1],10) + (gridSize[1]-1) * 0.5);
- for (var i = 0; i < gridSize[0]; i++)
- {
- for (var j = 0; j < gridSize[1]; j++)
- {
- c.rect(boxSizeX * 1.5 * i, boxSizeY * 1.5 * j, boxSizeX, boxSizeY);
- c.fillAndStroke();
- }
- }
- };
- mxShapeMockupiIconGrid.prototype.foreground = function(c, w, h, gridSize)
- {
- var boxSizeX = w / (parseInt(gridSize[0],10) + (gridSize[0]-1) * 0.5);
- var boxSizeY = h / (parseInt(gridSize[1],10) + (gridSize[1]-1) * 0.5);
- for (var i = 0; i < gridSize[0]; i++)
- {
- for (var j = 0; j < gridSize[1]; j++)
- {
- c.begin();
- c.moveTo(boxSizeX * 1.5 * i, boxSizeY * 1.5 * j);
- c.lineTo(boxSizeX * 1.5 * i + boxSizeX, boxSizeY * 1.5 * j + boxSizeY);
- c.moveTo(boxSizeX * 1.5 * i + boxSizeX, boxSizeY * 1.5 * j);
- c.lineTo(boxSizeX * 1.5 * i, boxSizeY * 1.5 * j + boxSizeY);
- c.stroke();
- }
- }
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IICON_GRID] = mxShapeMockupiIconGrid;
- //**********************************************************************************************************************************************************
- //Copy
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiCopy(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiCopy, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiCopy.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var rSize = 5;
- c.translate(x, y);
- this.background(c, w, h, rSize);
- c.setShadow(false);
- this.foreground(c, w, h, rSize);
- };
- mxShapeMockupiCopy.prototype.background = function(c, w, h, rSize)
- {
- c.begin();
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize - 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h - 7.5);
- c.lineTo(w * 0.5 + 7.5, h - 7.5);
- c.lineTo(w * 0.5, h);
- c.lineTo(w * 0.5 - 7.5, h - 7.5);
- c.lineTo(rSize, h - 7.5);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize - 7.5);
- c.close();
- c.fillAndStroke();
- };
- mxShapeMockupiCopy.prototype.foreground = function(c, w, h, rSize)
- {
- var fillColor3 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR3, '#00ff00');
- c.setGradient(fillColor3, fillColor3, 0, 0, w, h * 0.5, mxConstants.DIRECTION_SOUTH, 0.8, 0.1);
- c.begin();
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, (h - 7.5) * 0.5);
- c.lineTo(0, (h - 7.5) * 0.5);
- c.close();
- c.fill();
- var fieldText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, '');
- var textColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR, '#00ff00');
- c.setFontColor(textColor);
- c.setFontSize(8.5);
- c.text(w * 0.5, (h - 7.5)* 0.45, 0, 0, fieldText, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICOPY] = mxShapeMockupiCopy;
- //**********************************************************************************************************************************************************
- //Copy Area
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiCopyArea(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiCopyArea, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiCopyArea.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var rSize = 5;
- c.translate(x, y);
- this.background(c, w, h, rSize);
- c.setShadow(false);
- this.foreground(c, w, h, rSize);
- };
- mxShapeMockupiCopyArea.prototype.background = function(c, w, h, rSize)
- {
- c.begin();
- c.moveTo(w * 0.5 - 20, 0 + rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 - 20 + rSize, 0);
- c.lineTo(w * 0.5 + 20 - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 + 20, rSize);
- c.lineTo(w * 0.5 + 20, 20 - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 + 20 - rSize, 20);
- c.lineTo(w * 0.5 + 7.5, 20);
- c.lineTo(w * 0.5, 27.5);
- c.lineTo(w * 0.5 - 7.5, 20);
- c.lineTo(w * 0.5 - 20 + rSize, 20);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 - 20, 20 - rSize);
- c.close();
- c.fillAndStroke();
- };
- mxShapeMockupiCopyArea.prototype.foreground = function(c, w, h, rSize)
- {
- c.setAlpha(0.3);
- c.setFillColor('#2266ff');
- c.rect(2.5, 27.5, w - 5, h - 30);
- c.fill();
- c.setAlpha(1);
- if (h > 27.5)
- {
- c.setStrokeColor('#ffffff');
- c.setGradient('#88ddff', '#2266ff', w * 0.5 - 2.5, 25, 5, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(w * 0.5 - 2.5, 25, 5, 5);
- c.fillAndStroke();
- c.setGradient('#88ddff', '#2266ff', w * 0.5 - 2.5, h - 5, 5, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(w * 0.5 - 2.5, h - 5, 5, 5);
- c.fillAndStroke();
- c.setGradient('#88ddff', '#2266ff', 0, h * 0.5 + 10, 5, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(0, h * 0.5 + 10, 5, 5);
- c.fillAndStroke();
- c.setGradient('#88ddff', '#2266ff', w - 5, h * 0.5 + 10, 5, 5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(w - 5, h * 0.5 + 10, 5, 5);
- c.fillAndStroke();
- }
- var fillColor2 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR2, '#00ff00');
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#00ff00');
- c.setFillColor(fillColor2);
- c.setStrokeColor(strokeColor);
- c.begin();
- c.moveTo(w * 0.5 - 20, 0 + rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 - 20 + rSize, 0);
- c.lineTo(w * 0.5 + 20 - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 + 20, rSize);
- c.lineTo(w * 0.5 + 20, 20 - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 + 20 - rSize, 20);
- c.lineTo(w * 0.5 + 7.5, 20);
- c.lineTo(w * 0.5, 27.5);
- c.lineTo(w * 0.5 - 7.5, 20);
- c.lineTo(w * 0.5 - 20 + rSize, 20);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 - 20, 20 - rSize);
- c.close();
- c.fillAndStroke();
- var fillColor3 = mxUtils.getValue(this.style, mxMockupC.STYLE_FILLCOLOR3, '#00ff00');
- c.setGradient(fillColor3, fillColor3, w * 0.5 - 20, 0, 40, 10, mxConstants.DIRECTION_SOUTH, 0.8, 0.1);
- c.begin();
- c.moveTo(w * 0.5 - 20, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 - 20 + rSize, 0);
- c.lineTo(w * 0.5 + 20 - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w * 0.5 + 20, rSize);
- c.lineTo(w * 0.5 + 20, 10);
- c.lineTo(w * 0.5 - 20, 10);
- c.close();
- c.fill();
- var fieldText = mxUtils.getValue(this.style, mxMockupC.BUTTON_TEXT, '');
- var textColor = mxUtils.getValue(this.style, mxMockupC.STYLE_TEXTCOLOR, '#00ff00');
- c.setFontColor(textColor);
- c.setFontSize(8.5);
- c.text(w * 0.5, 8.75, 0, 0, fieldText, mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_ICOPY_AREA] = mxShapeMockupiCopyArea;
- //**********************************************************************************************************************************************************
- //Home Page Control
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiHomePageControl(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiHomePageControl, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiHomePageControl.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '#000000');
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');
- c.setStrokeColor(strokeColor);
- c.setFillColor(fillColor);
- var rSize = Math.min(h * 0.5, w * 0.05);
- c.ellipse(w * 0.35 - rSize, h * 0.5 - rSize, 2 * rSize, 2 * rSize);
- c.fill();
- c.ellipse(w * 0.65 - rSize, h * 0.5 - rSize, 2 * rSize, 2 * rSize);
- c.fill();
- c.ellipse(w - 2 * rSize, h * 0.5 - rSize, 2 * rSize, 2 * rSize);
- c.fill();
- c.ellipse(rSize * 0.2, h * 0.5 - rSize * 0.8, rSize * 1.2, rSize * 1.2);
- c.stroke();
- c.begin();
- c.moveTo(rSize * 1.15, h * 0.5 + rSize * 0.25);
- c.lineTo(rSize * 1.6, h * 0.5 + rSize * 0.8);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IHOME_PAGE_CONTROL] = mxShapeMockupiHomePageControl;
- //**********************************************************************************************************************************************************
- //Page Control
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiPageControl(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiPageControl, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiPageControl.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '#000000');
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');
- var rSize = Math.min(h * 0.5, w * 0.05);
- c.setFillColor(strokeColor);
- c.ellipse(0, h * 0.5 - rSize, 2 * rSize, 2 * rSize);
- c.fill();
- c.setFillColor(fillColor);
- c.ellipse(w * 0.35 - rSize, h * 0.5 - rSize, 2 * rSize, 2 * rSize);
- c.fill();
- c.ellipse(w * 0.65 - rSize, h * 0.5 - rSize, 2 * rSize, 2 * rSize);
- c.fill();
- c.ellipse(w - 2 * rSize, h * 0.5 - rSize, 2 * rSize, 2 * rSize);
- c.fill();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IPAGE_CONTROL] = mxShapeMockupiPageControl;
- //**********************************************************************************************************************************************************
- //iPad
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupiPad(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupiPad, mxShape);
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupiPad.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- var rSize = 25;
- c.translate(x, y);
- this.background(c, x, y, w, h, rSize);
- c.setShadow(false);
- this.foreground(c, x, y, w, h, rSize);
- };
- mxShapeMockupiPad.prototype.background = function(c, x, y, w, h, rSize)
- {
- c.setFillColor('#000000');
- c.setStrokeColor('#000000');
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.fillAndStroke();
- };
- mxShapeMockupiPad.prototype.foreground = function(c, x, y, w, h, rSize)
- {
- c.setStrokeWidth(1.5);
- c.setStrokeColor('#999999');
- c.begin();
- c.setStrokeColor('none');
- c.setFillColor('#808080');
- c.setGradient('#808080', '#000000', w * 0.325, 0, w * 0.675, h * 0.5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.moveTo(w * 0.325, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h * 0.5);
- c.lineTo(w * 0.7, h * 0.5);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.setFillColor('#1f2923');
- c.setStrokeColor('#18211b');
- c.setStrokeWidth(1);
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '');
- var bgStyle = mxUtils.getValue(this.style, mxMockupC.BG_STYLE, mxMockupC.BG_FLAT_GREEN);
- c.setStrokeWidth(1);
- if (bgStyle === mxMockupC.BG_FLAT_WHITE)
- {
- c.setFillColor('#ffffff');
- c.rect(w * 0.0928, h * 0.08, w * 0.8144, h * 0.816);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_FLAT_GREEN)
- {
- c.setFillColor('#1f2923');
- c.rect(w * 0.0928, h * 0.08, w * 0.8144, h * 0.816);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_FLAT_GRAY)
- {
- c.setFillColor('#dddddd');
- c.rect(w * 0.0928, h * 0.08, w * 0.8144, h * 0.816);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_FLAT_CUSTOM)
- {
- c.setFillColor(fillColor);
- c.rect(w * 0.0928, h * 0.08, w * 0.8144, h * 0.816);
- c.fill();
- }
- else if (bgStyle === mxMockupC.BG_STRIPED)
- {
- var xOld = x;
- var yOld = y;
- var wOld = w;
- var hOld = h;
- c.translate(w * 0.0928, h * 0.08);
- w = w * 0.8144;
- h = h * 0.816;
- c.setFillColor('#5D7585');
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- var strokeColor = '#18211b';
- var strokeColor2 = '#657E8F';
- c.setStrokeColor(strokeColor2);
- var i = 7;
- c.begin();
- while (i < w)
- {
- c.moveTo(i, 0);
- c.lineTo(i, h);
- i = i + 7;
- }
- c.stroke();
- c.setStrokeColor(strokeColor);
- c.begin();
- c.rect(0, 0, w, h);
- c.stroke();
- w = wOld;
- h = hOld;
- c.translate( - w * 0.0928, - h * 0.08);
- }
- else if (bgStyle === mxMockupC.BG_MAP)
- {
- var xOld = x;
- var yOld = y;
- var wOld = w;
- var hOld = h;
- c.translate(w * 0.0928, h * 0.08);
- w = w * 0.8144;
- h = h * 0.816;
- c.setFillColor('#ffffff');
- c.rect(0, 0, w, h);
- c.fillAndStroke();
- var fillColor2 = '#96D1FF';
- var strokeColor = '#18211b';
- var strokeColor2 = '#008cff';
- c.setFillColor(fillColor2);
- c.setStrokeColor(strokeColor2);
- c.setStrokeWidth(0.5);
- c.begin();
- c.moveTo(0, 0);
- c.lineTo(w * 0.1171, 0);
- c.lineTo(w * 0.1136, h * 0.0438);
- c.lineTo(w * 0.0993, h * 0.054);
- c.lineTo(0, h * 0.0446);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1993, 0);
- c.lineTo(w * 0.1914, h * 0.03884);
- c.lineTo(w * 0.1536, h * 0.0362);
- c.lineTo(w * 0.1586, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.24, 0);
- c.lineTo(w * 0.2257, h * 0.054);
- c.lineTo(w * 0.2414, h * 0.0674);
- c.lineTo(w * 0.4707, h * 0.0835);
- c.lineTo(w * 0.5264, h * 0.0906);
- c.lineTo(w * 0.6429, h * 0.0929);
- c.arcTo(w * 0.0857, h * 0.0536, 0, 0, 0, w * 0.7193, h * 0.0621);
- c.arcTo(w * 0.48, h * 0.2143, 0, 0, 0, w * 0.7286, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8, 0);
- c.lineTo(w * 0.7886, h * 0.04554);
- c.arcTo(w * 0.0857, h * 0.0536, 0, 0, 0, w * 0.8164, h * 0.0875);
- c.arcTo(w * 0.1429, h * 0.0893, 0, 0, 0, w * 0.88, h * 0.1036);
- c.lineTo(w, h * 0.1112);
- c.lineTo(w, 0);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.0933);
- c.lineTo(w * 0.08, h * 0.1036);
- c.lineTo(w * 0.1021, h * 0.1246);
- c.lineTo(w * 0.1007, h * 0.1768);
- c.lineTo(w * 0.0471, h * 0.2241);
- c.lineTo(0, h * 0.2527);
- c.close();
- c.fillAndStroke();
- c.ellipse(w * 0.1214, h * 0.0603, w * 0.0843, h * 0.0576);
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1293, h * 0.1924);
- c.lineTo(w * 0.1729, h * 0.142);
- c.lineTo(w * 0.1407, h * 0.1411);
- c.lineTo(w * 0.14, h * 0.1777);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4586, h * 0.1241);
- c.lineTo(w * 0.455, h * 0.1835);
- c.lineTo(w * 0.3893, h * 0.2246);
- c.lineTo(w * 0.2171, h * 0.1362);
- c.lineTo(w * 0.2171, h * 0.1308);
- c.lineTo(w * 0.2293, h * 0.1214);
- c.lineTo(w * 0.2857, h * 0.1174);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5079, h * 0.1134);
- c.lineTo(w * 0.7307, h * 0.1223);
- c.lineTo(w * 0.7279, h * 0.1625);
- c.lineTo(w * 0.715, h * 0.1772);
- c.lineTo(w * 0.6929, h * 0.1688);
- c.lineTo(w * 0.625, h * 0.1795);
- c.lineTo(w * 0.4779, h * 0.2835);
- c.lineTo(w * 0.395, h * 0.2299);
- c.lineTo(w * 0.4657, h * 0.1826);
- c.lineTo(w * 0.4707, h * 0.1223);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.1362);
- c.lineTo(w * 0.7643, h * 0.1237);
- c.lineTo(w * 0.7543, h * 0.1562);
- c.lineTo(w * 0.7643, h * 0.1585);
- c.lineTo(w * 0.9186, h * 0.2366);
- c.lineTo(w, h * 0.1732);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2079, h * 0.1545);
- c.lineTo(w * 0.3886, h * 0.2536);
- c.lineTo(w * 0.3414, h * 0.2933);
- c.lineTo(w * 0.1743, h * 0.1969);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.1579, h * 0.2134);
- c.lineTo(w * 0.3221, h * 0.3067);
- c.lineTo(w * 0.2957, h * 0.3237);
- c.lineTo(w * 0.1157, h * 0.2424);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.405, h * 0.2656);
- c.lineTo(w * 0.31, h * 0.3353);
- c.lineTo(w * 0.3693, h * 0.3661);
- c.lineTo(w * 0.4571, h * 0.2982);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.7121, h * 0.1848);
- c.lineTo(w * 0.6879, h * 0.1754);
- c.lineTo(w * 0.6329, h * 0.1844);
- c.lineTo(w * 0.61, h * 0.2018);
- c.lineTo(w * 0.6207, h * 0.2085);
- c.lineTo(w * 0.4986, h * 0.2982);
- c.lineTo(w * 0.535, h * 0.3237);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5557, h * 0.3379);
- c.lineTo(w * 0.7464, h * 0.1826);
- c.lineTo(w * 0.8036, h * 0.2076);
- c.lineTo(w * 0.595, h * 0.3616);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8293, h * 0.2188);
- c.lineTo(w * 0.8979, h * 0.2509);
- c.lineTo(w * 0.6936, h * 0.4125);
- c.lineTo(w * 0.6171, h * 0.3737);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.2138);
- c.lineTo(w * 0.6821, h * 0.4603);
- c.lineTo(w * 0.815, h * 0.5277);
- c.lineTo(w, h * 0.4);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.317);
- c.lineTo(w * 0.0971, h * 0.2554);
- c.lineTo(w * 0.4121, h * 0.4143);
- c.lineTo(w * 0.3736, h * 0.4415);
- c.lineTo(w * 0.315, h * 0.4076);
- c.lineTo(w * 0.3093, h * 0.4116);
- c.lineTo(w * 0.3686, h * 0.4455);
- c.lineTo(w * 0.285, h * 0.5045);
- c.lineTo(w * 0.1114, h * 0.4134);
- c.lineTo(w * 0.025, h * 0.4603);
- c.lineTo(w * 0.0371, h * 0.4723);
- c.lineTo(w * 0.1114, h * 0.4371);
- c.lineTo(w * 0.2871, h * 0.5312);
- c.lineTo(w * 0.1929, h * 0.6058);
- c.lineTo(w * 0.2271, h * 0.6705);
- c.lineTo(w * 0.17, h * 0.7147);
- c.lineTo(w * 0.0314, h * 0.6321);
- c.lineTo(0, h * 0.6246);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.48, h * 0.3121);
- c.lineTo(w * 0.5157, h * 0.3375);
- c.lineTo(w * 0.4314, h * 0.3982);
- c.lineTo(w * 0.3929, h * 0.3786);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3086, h * 0.5179);
- c.lineTo(w * 0.53, h * 0.3518);
- c.lineTo(w * 0.5757, h * 0.3745);
- c.lineTo(w * 0.3479, h * 0.5411);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.5964, h * 0.3884);
- c.lineTo(w * 0.6736, h * 0.4277);
- c.lineTo(w * 0.445, h * 0.5991);
- c.lineTo(w * 0.3664, h * 0.5531);
- c.lineTo(w * 0.5057, h * 0.4545);
- c.lineTo(w * 0.5507, h * 0.4754);
- c.lineTo(w * 0.5571, h * 0.4723);
- c.lineTo(w * 0.5114, h * 0.4504);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4793, h * 0.6161);
- c.lineTo(w * 0.6771, h * 0.4643);
- c.lineTo(w * 0.8086, h * 0.5326);
- c.lineTo(w * 0.7471, h * 0.5817);
- c.lineTo(w * 0.7214, h * 0.567);
- c.lineTo(w * 0.715, h * 0.571);
- c.lineTo(w * 0.7421, h * 0.5871);
- c.lineTo(w * 0.6014, h * 0.6933);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.4371);
- c.lineTo(w * 0.8443, h * 0.546);
- c.lineTo(w * 0.9071, h * 0.5701);
- c.lineTo(w, h * 0.5022);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8407, h * 0.5504);
- c.lineTo(w * 0.8993, h * 0.5759);
- c.lineTo(w * 0.6757, h * 0.7416);
- c.lineTo(w * 0.6286, h * 0.7139);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.5321);
- c.lineTo(w * 0.6979, h * 0.7549);
- c.lineTo(w * 0.7457, h * 0.7781);
- c.lineTo(w * 0.9814, h * 0.6094);
- c.lineTo(w, h * 0.6067);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w, h * 0.6254);
- c.lineTo(w * 0.7664, h * 0.792);
- c.lineTo(w * 0.9586, h * 0.9062);
- c.lineTo(w, h * 0.8786);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3093, h * 0.5464);
- c.lineTo(w * 0.4271, h * 0.6152);
- c.lineTo(w * 0.245, h * 0.7643);
- c.lineTo(w * 0.185, h * 0.7228);
- c.lineTo(w * 0.2493, h * 0.6728);
- c.lineTo(w * 0.2214, h * 0.6143);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.65);
- c.lineTo(w * 0.2179, h * 0.7826);
- c.lineTo(w * 0.1136, h * 0.8424);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.7272);
- c.lineTo(w * 0.0821, h * 0.859);
- c.lineTo(0, h * 0.9085);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4529, h * 0.6366);
- c.lineTo(w * 0.575, h * 0.7143);
- c.lineTo(w * 0.39, h * 0.8621);
- c.lineTo(w * 0.2657, h * 0.7902);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(0, h * 0.9415);
- c.lineTo(w * 0.1036, h * 0.8821);
- c.lineTo(w * 0.2343, h * 0.959);
- c.lineTo(w * 0.1721, h);
- c.lineTo(0, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2586, h * 0.7951);
- c.lineTo(w * 0.3829, h * 0.8674);
- c.lineTo(w * 0.2543, h * 0.9451);
- c.lineTo(w * 0.1279, h * 0.8692);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2836, h * 0.9639);
- c.lineTo(w * 0.4207, h * 0.8772);
- c.lineTo(w * 0.605, h * 0.7321);
- c.lineTo(w * 0.6521, h * 0.7634);
- c.lineTo(w * 0.3486, h);
- c.lineTo(w * 0.3393, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.3879, h);
- c.lineTo(w * 0.6721, h * 0.7759);
- c.lineTo(w * 0.7171, h * 0.7982);
- c.lineTo(w * 0.4564, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.4986, h);
- c.lineTo(w * 0.7386, h * 0.8125);
- c.lineTo(w * 0.9307, h * 0.925);
- c.lineTo(w * 0.8264, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.8671, h);
- c.lineTo(w * 0.9464, h * 0.9491);
- c.lineTo(w, h * 0.975);
- c.lineTo(w, h);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.moveTo(w * 0.2295, h);
- c.lineTo(w * 0.2648, h * 0.9792);
- c.lineTo(w * 0.2981, h);
- c.close();
- c.fillAndStroke();
- w = wOld;
- h = hOld;
- c.translate( - w * 0.0928, - h * 0.08);
- }
- c.setStrokeWidth(1);
- c.setStrokeColor('#18211b');
- c.rect(w * 0.0928, h * 0.08, w * 0.8144, h * 0.816);
- c.stroke();
- c.setStrokeWidth(1.5);
- c.setAlpha(0.8);
- c.setStrokeColor('#dddddd');
- c.begin();
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.stroke();
- rSize = 22.5;
- c.begin();
- c.setStrokeColor('#666666');
- c.begin();
- c.moveTo(2.5, 2.5 + rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, 2.5 + rSize, 2.5);
- c.lineTo(w - rSize - 5, 2.5);
- c.arcTo(rSize, rSize, 0, 0, 1, w - 2.5, rSize + 2.5);
- c.lineTo(w - 2.5, h - rSize - 2.5);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize - 2.5, h - 2.5);
- c.lineTo(rSize + 2.5, h - 2.5);
- c.arcTo(rSize, rSize, 0, 0, 1, 2.5, h - rSize - 2.5);
- c.close();
- c.stroke();
- c.setAlpha(1);
- c.ellipse(w * 0.4948, h * 0.0444, w * 0.0103, h * 0.008);
- c.setStrokeWidth(2.5);
- c.setStrokeColor('#000000');
- c.setFillColor('#000099');
- c.fillAndStroke();
- c.setGradient('#bbbbbb', '#000000', w * 0.4588, h * 0.912, w * 0.0825, h * 0.064, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.ellipse(w * 0.4588, h * 0.912, w * 0.0825, h * 0.064);
- c.fill();
- c.setAlpha(0.5);
- c.ellipse(w * 0.4588, h * 0.912, w * 0.0825, h * 0.064);
- c.stroke();
- c.begin();
- c.setAlpha(0.85);
- c.setFillColor('#000000');
- c.moveTo(w * 0.4598, h * 0.944);
- c.arcTo(w * 0.0402, h * 0.0296, 0, 0, 1, w * 0.5402, h * 0.944);
- c.arcTo(w * 0.0825, h * 0.064, 0, 0, 1, w * 0.4598, h * 0.944);
- c.close();
- c.fillAndStroke();
- c.begin();
- c.setAlpha(0.7);
- c.setStrokeWidth(1.5);
- c.setStrokeColor('#dddddd');
- rSize = 4;
- c.roundrect(w * 0.4814, h * 0.9296, w * 0.0371, h * 0.0288, h * 0.00515, h * 0.004);
- c.stroke();
- };
- mxCellRenderer.prototype.defaultShapes[mxMockupC.SHAPE_IPAD] = mxShapeMockupiPad;
- //**********************************************************************************************************************************************************
- //Rounded rectangle (adjustable rounding)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupRRect(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupRRect, mxShape);
- mxShapeMockupRRect.prototype.cst = {
- RRECT : 'mxgraph.ios.rrect',
- R_SIZE : 'rSize'
- };
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupRRect.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var rSize = parseInt(mxUtils.getValue(this.style, mxShapeMockupRRect.prototype.cst.R_SIZE, '10'));
- c.roundrect(0, 0, w, h, rSize);
- c.fillAndStroke();
- };
- mxCellRenderer.registerShape(mxShapeMockupRRect.prototype.cst.RRECT, mxShapeMockupRRect);
- //**********************************************************************************************************************************************************
- //Top Button
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeIosTopButton(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeIosTopButton, mxShape);
- mxShapeIosTopButton.prototype.cst = {
- TOP_BUTTON : 'mxgraph.ios.topButton',
- R_SIZE : 'rSize'
- };
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeIosTopButton.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var rSize = parseInt(mxUtils.getValue(this.style, mxShapeIosTopButton.prototype.cst.R_SIZE, '10'));
- c.begin();
- c.moveTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.lineTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, h);
- c.lineTo(0, h);
- c.close();
- c.fillAndStroke();
- };
- mxCellRenderer.registerShape(mxShapeIosTopButton.prototype.cst.TOP_BUTTON, mxShapeIosTopButton);
- //**********************************************************************************************************************************************************
- //Bottom Button
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeIosBottomButton(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeIosBottomButton, mxShape);
- mxShapeIosBottomButton.prototype.cst = {
- BOTTOM_BUTTON : 'mxgraph.ios.bottomButton',
- R_SIZE : 'rSize'
- };
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeIosBottomButton.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var rSize = parseInt(mxUtils.getValue(this.style, mxShapeIosBottomButton.prototype.cst.R_SIZE, '10'));
- c.begin();
- c.moveTo(0, 0);
- c.lineTo(w, 0);
- c.lineTo(w, h - rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, w - rSize, h);
- c.lineTo(rSize, h);
- c.arcTo(rSize, rSize, 0, 0, 1, 0, h - rSize);
- c.close();
- c.fillAndStroke();
- };
- mxCellRenderer.registerShape(mxShapeIosBottomButton.prototype.cst.BOTTOM_BUTTON, mxShapeIosBottomButton);
- //**********************************************************************************************************************************************************
- //Anchor (a dummy shape without visuals used for anchoring)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeIosAnchor(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeIosAnchor, mxShape);
- mxShapeIosAnchor.prototype.cst = {
- ANCHOR : 'mxgraph.ios.anchor'
- };
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeIosAnchor.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- };
- mxCellRenderer.registerShape(mxShapeIosAnchor.prototype.cst.ANCHOR, mxShapeIosAnchor);
- //**********************************************************************************************************************************************************
- //Checkbox
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeIosCheckbox(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeIosCheckbox, mxShape);
- mxShapeIosCheckbox.prototype.cst = {
- CHECKBOX : 'mxgraph.ios.checkbox'
- };
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeIosCheckbox.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- c.rect(0, 0, w, h);
- c.fillAndStroke();
-
- c.begin();
- c.moveTo(w * 0.8, h * 0.2);
- c.lineTo(w * 0.4, h * 0.8);
- c.lineTo(w * 0.25, h * 0.6);
- c.stroke();
- };
- mxCellRenderer.registerShape(mxShapeIosCheckbox.prototype.cst.CHECKBOX, mxShapeIosCheckbox);
- //**********************************************************************************************************************************************************
- //Fancy Rounded rectangle (adjustable rounding)
- //**********************************************************************************************************************************************************
- /**
- * Extends mxShape.
- */
- function mxShapeMockupFancyRRect(bounds, fill, stroke, strokewidth)
- {
- mxShape.call(this);
- this.bounds = bounds;
- this.fill = fill;
- this.stroke = stroke;
- this.strokewidth = (strokewidth != null) ? strokewidth : 1;
- };
- /**
- * Extends mxShape.
- */
- mxUtils.extend(mxShapeMockupFancyRRect, mxShape);
- mxShapeMockupFancyRRect.prototype.cst = {
- FANCY_RRECT : 'mxgraph.ios.fancyRRect',
- R_SIZE : 'rSize'
- };
- /**
- * Function: paintVertexShape
- *
- * Paints the vertex shape.
- */
- mxShapeMockupFancyRRect.prototype.paintVertexShape = function(c, x, y, w, h)
- {
- c.translate(x, y);
- var rSize = parseInt(mxUtils.getValue(this.style, mxShapeMockupFancyRRect.prototype.cst.R_SIZE, '10'));
- var fillColor = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '#ffffff');
- var strokeColor = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, '#000000');
- // c.setAlpha(0.8);
- c.roundrect(0, 0, w, h, rSize);
- c.fillAndStroke();
-
- c.setShadow(false);
-
- c.setStrokeColor(fillColor);
- c.setGradient(fillColor, '#ffffff', 0, 0, w, 22.5, mxConstants.DIRECTION_SOUTH, 1, 1);
- c.setAlpha(0.3);
- c.begin();
- c.moveTo(w - rSize, 0);
- c.arcTo(rSize, rSize, 0, 0, 1, w, rSize);
- c.lineTo(w, 17.5);
- c.arcTo(w * 1.67, h * 2.5, 0, 0, 1, 0, 17.5);
- c.lineTo(0, rSize);
- c.arcTo(rSize, rSize, 0, 0, 1, rSize, 0);
- c.close();
- c.fillAndStroke();
- c.setAlpha(0.8);
- c.setStrokeColor(strokeColor);
- c.setStrokeWidth(1);
- c.roundrect(0, 0, w, h, rSize, rSize);
- c.stroke();
- };
- mxCellRenderer.registerShape(mxShapeMockupFancyRRect.prototype.cst.FANCY_RRECT, mxShapeMockupFancyRRect);
|