MO类说明.docx

上传人:b****7 文档编号:11156577 上传时间:2023-02-25 格式:DOCX 页数:19 大小:294.31KB
下载 相关 举报
MO类说明.docx_第1页
第1页 / 共19页
MO类说明.docx_第2页
第2页 / 共19页
MO类说明.docx_第3页
第3页 / 共19页
MO类说明.docx_第4页
第4页 / 共19页
MO类说明.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

MO类说明.docx

《MO类说明.docx》由会员分享,可在线阅读,更多相关《MO类说明.docx(19页珍藏版)》请在冰豆网上搜索。

MO类说明.docx

MO类说明

第一部分MAPBEANS

Beans

Description

BeansaretheprimarycomponentsthatcanbeusedtoaddGISfunctionalitytoaJava2SDKapplication.AllMapObjectsvisualcomponentsworkwithintheJFCframework.Ifyou'rehand-codinganapplication,youcansimplyaddthesecomponentsintotheUI,asyouwouldanyotherJFCcomponent.Alternatively,youcoulduseaJava2SDKcompatibleGUIbuildingIntegratedDevelopmentEnvironment,and,afterloadingtheMapObjectsJARfileintotheIDE'scomponentbar,youcanthendragthecomponentsintotheformusedtobuildyourapplication.

Map

Description

TheMapcomponentprovidesawaytovisualizeyourspatialdata.EachtypeofdataisvisualizedinaseparateLayer.YouusuallyobtainaLayerfromaLayerSource.TheLayerisaddedtotheMapbyaddingittotheMap'sLayerset.TheMap'sDisplayManagerarrangestheLayerstoberenderedtoaDisplayinthecorrect"draworder".

TheprimarywaytodrawthemapisbyusingtheMap'ssetExtentmethod.AllLayersintheMap'sLayersetwillberequestedtodrawtheirspatialdatawithinthegivenEnvelope.AnotherwaytodrawthemapistheMap'sredrawmethod.ThismethodsimplydrawstheLayers;themapextentisnotchanged.UsetheredrawmethodifyourapplicationchangesapropertyofaLayersuchastheRendererorcurrentselection.

Diagram

TableofContents

Description

TheTableofContents(TreeToc)componentprovidesawaytovisualizetheLayersinaMap.EachLayerisrepresentedbyaLegendNodethatcontainsatitleandcheckboxthatcanbeusedtocontroltheLayervisibility.ALegendNodewillnormallyshowadditionalinformation,suchasthecolorsandclassificationschosenfortheLayer.

BeforeusingaTreeToc,youmustassociateitwithaMapbyusingthesetMapmethod.

Itispossibleto"select"oneormoreLegendsbyclickingonthem,inwhichcasetheselectedLegendNodeswillbehighlightedintheTreeToc.TheTreeTochasthreebehaviorstoshowitsLegendNode.ThebehaviorcansetbythesetLegendOutOfScaleBehaviourmethod.ThedefaultisOUT_OF_SCALE_LEGEND_HIDE.

OUT_OF_SCALE_LEGEND_HIDE

LegendNodesbecomeinvisiblewhentheirassociatedLayergoesoutofscale.

OUT_OF_SCALE_LEGEND_DISABLE

LegendNodesbecomedisabledwhentheirassociatedLayergoesoutofscale.

OUT_OF_SCALE_LEGEND_DO_NOTHING

LegendNodesremainvisibleandenabledwhentheirassociatedLayergoesoutofscale.

 

Diagram

AcetateLayers

Description

Asidefromaddinglayerstoamap'sLayerset,youcanalsovisualizeyourdatabyaddingalayertoanAcetateLayer,thenaddingtheAcetateLayertotheMap.

AnAcetateLayerisatransparentJFCcomponentthatisintendedforusewithanimationeffects,suchasatrackinglayeroreditinglayer.Atrackinglayercanbeusedtomoveobjectsacrossthemap,suchastrucksonahighwaysystem.Aneditinglayercanbeusedtoadd,remove,orchangeshapes,suchasagraphicseditor.

ThebasicdifferencebetweenlayersstoredinanAcetateLayerandinthemapisthatifanychangesaremadetothelayerintheAcetateLayerthenaredrawofthemapisnotrequired.Ifyoumakeachangetotheunderlyingdataofalayerthathasbeenaddedtothemap'sLayerset,youmustredrawthemapinordertoseethechange.

AcetateLayersarenotnormallydouble-buffered,whereasthemapisdouble-buffered.Thismeansthateverytimethemapisrefreshed,allAcetateLayerswithinthemaparere-rendered,eventhoughthemapwillusuallyrefreshfromtheoff-screenimage.

YoucanaddseveralAcetateLayerstoamap.YoucanorderthembyusingtheorderingschemeinherentinaJFCJLayeredPane.Becauseoftheadditionalrenderingoverhead,youshouldkeepthenumberofAcetateLayerstoaminimumforperformancereasons.

Diagram

Tools

Description

YoucanhandleMouseEventswithinthemapintwoways.Withinyourapplication,youcanaddaregularAWTMouseListenerorMouseMotionListenertothemaptoprocessMouseEvents.Alternatively,youcancreateaToolinstanceandaddittotheMap.

Youcanaddasmanytoolsasyouliketothemap,butonlyonetoolcanbeselectedandbeactiveatanyonetime-thisisthemaindifferencebetweenMouseListenersandTools.

TheadvantagesofcreatingaToolinstanceare:

-Yougeteasyaccesstothecontainermapanditsservices.

-YoumakeyourMouseEventhandlermoreself-contained.

-YoucanbeguaranteedthatonlyoneToolisactiveatatime.

InadditiontohandlingMouseEvents,ToolsarealsoJFCcomponents.Whenatoolisselected(usingthemap'ssetSelectedToolmethod)thetoolcanvasbecomesvisibleandisenabledtoreceiveMouseEvents.ThetoolcodecanrenderonthecanvasandisrenderedcompletelyseparatefromLayerswithintheMap'sLayerset.Inthisway,youcanperformanydesiredanimationeffectssuchasrubberbandingashape.

Diagram

RubberBands

Description

RubberBandscanbeassociatedwithaRubberBandTooltoprovide"resizablegeometry".AstheRubberBandToolrespondstomouseclicksinthemap,itpassestheMouseEventstotheRubberBandobject.TheRubberBandrespondstotheseeventsandchangesitsshapeaccordingly.

Forexample,theBaseRubberEnvelopeconstructsarectanglehavingonecornerlocatedattheinitialMouseDownevent,andtheoppositecornerlocatedatthecurrentMousepositionasthemouseisdraggedacrossthemap.

ARubberBandisresponsibleforrenderingthegeometryandusesaRenderertoperformthisfunction.YoucanaddarenderertoeachRubberBandyoucreateorusethedefaultprovided.

Diagram

Toolbars

Description

Severaltoolbarsareprovidedtomakeiteasiertoaddmapfunctionalitytoyourapplication.Eachtoolbarencapsulatesselectedfunctionalitythatisdefinedbyappropriateactions.Belowisatablelistingthefunctionsforeachtoolbar.

ZoomPanToolBar

ZoomIn,ZoomOut,ZoomtoPreviousExtent,ZoomtoNextExtent,ZoomtoActiveLayer,ZoomtoFullExtent,Pan,andIdentify

LayerToolBar

AddLayer,RemoveLayer

ProjectToolBar

OpenProject,SaveProject,SavaProjectAs,CloseProject,ExportMap,andPrintMap

SelectionToolBar

Find,Query,Select(withvariousgeometry),Buffer,ClearSelection,andShowAttributeTable

MeasureGeocodeToolBar

LocateAddress,MapTips,Measure(withvariousunits)

 

Ineachtoolbaryoucanremoveexistingactionsoraddnewactionstomakecustomizedtoolbars.Youhavetosupplyiconstoeachactionthatyouaddtothetoolbar.ToolbarscaneasilybeconstructedbyaddingsubclassestoBaseToolBar.

Diagram

QueryBuilder

Description

TheQueryBuilderclassesprovideaUIaswellaslower-levelcomponentsforhandlingattributequeries.

TheQueryBuilderLightprovidesapanelforassemblingaSQL"whereclause".WhenconnectedwithaFeatureLayerandMap,samplevaluescanbeobtainedtomakeiteasierforenduserstoconstructaquery.TheQueryBuilderpanelincludestheQueryBuilderLightandalsoprovidesatableforexecutinganddisplayingqueryresults,aswellasawaytodisplaysimplestatistics.SimpleQueryBuilderDialogprovidesacompleteDialogthatcontainsaQueryBuilder.

QueryEnvironmentprovidessimplemethodsforparsingandpreparingSQL"whereclauses"forlateruse.ItispossibletopreparseanexpressionusingthedefaultPreParserorbycreatingyourownPreParser;thedefaultprovidesawaytohandleODBC-likemacrocode.TheresultofparsingisatreestructurecontainingQTreeNodeobjects.YoucancompilethistreetoproduceaWhereClauseExaminer,whichcanbeusedtotestifafeaturepassesthe"whereclause"ornot.

Diagram

Otherquerydialogboxes

Description

ThesedialogboxescanbeusedforvariousfunctionsonceyouhaveassociatedthemwithaMapandaFeatureLayer.

GeocodingUIprovidesanenduserdialogboxforperformingageocodingoperation;theuserentersaddressinformationandreceivesbackalistofcandidateitems.

Identifycanbeusedtodisplaythepropertiesofoneormorefeatures,aswellas(optionally)toeditthepropertiesofafeature.

StoredQueryUIprovidesameansforenduserstoentertheparameterizedvaluesofaStoredQuery.

Findprovidesawayforend-userstoselectoneormoremaplayersandtypeastringtobesearchedforwithinthestringattributesofthoselayers.

BufferUIprovidesawaytoconstructageometricshapethatsurroundsthecurrentlyselectedFeatureswithinaFeatureLayer,and(optionally)toselecttheFeaturesfromanotherFeatureLayerthatintersectwiththatshape.

Diagram

Otherdialogboxes

Description

TheLayerPropertiesdialogboxprovidesawaytomodifythecurrentlyusedrenderersofaFeatureLayer.ItalsoprovidesawaytochangethetransparencyofanImageLayerandaLayer'sname.TheLayerPropertiesdialogboxalsodisplayssimplemetadataaboutthelayer.Forexample,itssource.

TheMapTipsUIprovidesasimpledialogboxforenduserstobeabletosettheMapTipfieldforoneormoreLayersfoundinamap.MapTipsaresmallpopupmenusthatdisplaythevalueofaselectedfieldasyouhoverthemouseoverafeatureonthemap.

TheThreadDialogisatoolthatallowsyoutoviewthecurrentthreadusageofeachthreadduringaJavaapplicationsession.Thisdialogboxdisplaysthreadcharacteristicsintheformofatableview,displayingtheName,ThreadGroup,Priority,Alivestatus,Daemonstatus,andinterruptionstatusofeachthread.

TheAboutBoxisagenericcomponentusedtodisplayinformationabouttheproductinwhichitisused.Itwilldisplayalogo,aproductname,aversionnumber,andabuildnumber.

TheRestrictedLogindialogboxisusedwhenaservicerequiresauthenticationandwillprompttheuserforausernameandpasswordforthespecifiedrealmandservice.

TheFontChooserUIdialogboxisatoolthatdeve

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 动物植物

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1