版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
毕业设计(论文)说明书题目:基于Java/Swing技术的KTV包间管理系统的设计与实现系名计算机科学与技术系专业计算机科学与技术学号 学生姓名周诗阳 指导教师张晓诚年月曰摘要KTV包房管理系统的设计必须考虑众多因素及其相互之间的关联,因此如何选择有效的设计模式是非常重要的。在本系统中,基于Java/Swing技术设计并实现了客户端。它由模型-视图-控制器(MVC)模式设计而成。本项目基于JavaSwing的窗体布局技术进行软件的窗体布局。本KTV管理系统是一个功能强大的、可靠的、方便的平台处理KTV包房管理业务。该系统不仅能提高KTV包房管理的工作效率,另一方面也为客人在预订时提供一种较为方便的渠道。本系统主要功能:(1) 管理系统:用于打开会员管理、包房管理、预定包房、查看营业额、员工管理的功能(2) 包房管理:用于对各型包房的开包、续包管理(3) 会员管理:用于对会员的管理,具有会员注册、会员删除、修改会员个人信息的功能(4) 员工管理:用于对员工的管理,具有增加、删除、修改、查看功能。(5) 查看营业额:用于按照季度或月份进行统计查看营业额。(6) 预定包房:用于为顾客提前预定包房,做出统计,提前对包房进行安排。关键词:管理系统;swing;GUIABSTRACTKTVroomsmanagementsystemdesignmustconsidermanyfactorsandtheirmutualassociation,sohowtochooseeffectivedesignpatternsisveryimportant.Inthissystem,andJava/Swing-basedtechnologydesignedtoachievetheclient.ItconsistsoftheModel-View-Controller(MVC)patterndesigned.ThisprojectisbasedonJavaSwingformlayoutsoftware,formlayout.ThisKTVManagementSystemisapowerful,reliableandconvenientplatformtodealwithKTVroomsmanagementbusiness.ThesystemcannotonlyimprovetheefficiencyofthemanagementofKTVrooms,ontheotherhand,atthetimeofbookingtoprovideamoreconvenientchannelfortheguests.Thesystemmainfunctions:managementsystem:foropenmembershipmanagement,privaterooms,pre-rooms,toseetheturnover,staffmanagementfunctionsprivateroomsManagement:usedtopackagevarioustypesofprivaterooms,continuedthepackagemanagementmembershipmanagement:forthemanagementofmembers,withmemberregistration,memberdelete,modifythefunctionofmemberpersonalinformationstaffmanagement:themanagementofstaff,withanincrease,delete,modify,viewfunction.ViewSales:statisticsusedinaccordancewiththequarterormonthtoviewtheturnover.pre-privateroom:forcustomersbookedinadvancetheprivatediningroom,makethestatisticsinadvanceoftheVIParrangements.Keywords:managementsystem;swing;theGUI外文资料SwingistheprimaryJavaGUIwidgettoolkit.ItispartofOracle'sJavaFoundationClasses(JFC—anAPIforprovidingagraphicaluserinterface(GUI)forJavaprograms.SwingwasdevelopedtoprovideamoresophisticatedsetofGUIcomponentsthantheearlierAbstractWindowToolkit(AWT).Swingprovidesanativelookandfeelthatemulatesthelookandfeelofseveralplatforms,andalsosupportsapluggablelookandfeelthatallowsapplicationstohavealookandfeelunrelatedtotheunderlyingplatform.IthasmorepowerfulandflexiblecomponentsthanAWT.Inadditiontofamiliarcomponentssuchasbuttons,checkboxandlabels,Swingprovidesseveraladvaneedcomponentssuchastabbedpanel,scrollpanes,trees,tablesandlists.UnlikeAWTcomponents,Swingcomponentsarenotimplementedbyplatform-specificcode.InsteadtheyarewrittenentirelyinJavaandthereforeareplatform-independent.Theterm"lightweight"isusedtodescribesuchanelement.HistoryTheInternetFoundationClasses(IFC)wereagraphicslibraryforJavaoriginallydevelopedbyNetscapeCommunicationsCorporationandfirstreleasedonDecember16,1996.OnApril2,1997,SunMicrosystemsandNetscapeCommunicationsCorporationannouncedtheirintentiontoincorporateIFCwithothertechnologiestoformtheJavaFoundationClasses.[1]The"JavaFoundationClasses"werelaterrenamed"Swing".Swingintroducedamechanismthatallowedthelookandfeelofeverycomponentinanapplicationtobealteredwithoutmakingsubstantialchangestotheapplicationcode.TheintroductionofsupportforapluggablelookandfeelallowsSwingcomponentstoemulatetheappearaneeofnativecomponentswhilestillretainingthebenefitsofplatformindependence.Originallydistributedasaseparatelydownloadablelibrary,SwinghasbeenincludedaspartoftheJavaStandardEditionsincerelease1.2.[2]TheSwingclassesandcomponentsarecontainedinthejavax.swingpackagehierarchy.TheSwingArchitectureSwingisaplatform-independent,Model-View-ControllerGUIframeworkforJava,whichfollowsasingle-threadedprogrammingmodel.[3]Additionally,thisframeworkprovidesalayerofabstractionbetweenthecodestructureandgraphicpresentationofaSwing-basedGUI.FoundationsSwingisplatform-independentbecauseitiscompletelywritteninJava.CompletedocumentationforallSwingclassescanbefoundintheJavaAPIGuide.ExtensibleSwingisahighlymodular-basedarchitecture,whichallowsforthe"plugging"ofvariouscustomimplementationsofspecifiedframeworkinterfaces:Userscanprovidetheirowncustomimplementation(s)ofthesecomponentstooverridethedefaultimplementationsusingJava'sinheritaneemechanism.[4]Swingisacomponent-basedframework,whosecomponentsareallultimatelyderivedfromthejavax.swing.JComponentclass.Swingobjectsasynchronouslyfireevents,haveboundproperties,andrespondtoadocumentedsetofmethodsspecifictothecomponent.SwingcomponentsareJavaBeanscomponents,compliantwiththeJavaBeansComponentArchitecturespecifications.CustomizableGiventheprogrammaticrenderingmodeloftheSwingframework,finecontroloverthedetailsofrenderingofacomponentispossibleinSwing.Asageneralpattern,thevisualrepresentationofaSwingcomponentisacompositionofastandardsetofelements,suchasaborder,inset,decorations,andotherproperties.Typically,userswillprogrammaticallycustomizeastandardSwingcomponent(suchasaJTable)byassigningspecificborders,colors,backgrounds,opacities,etc.Thecorecomponentwillthenusethesepropertiestorenderitself.However,itisalsocompletelypossibletocreateuniqueGUIcontrolswithhighlycustomizedvisualrepresentation.ConfigurableSwing'sheavyrelianeeonruntimemechanismsandindirectcompositionpatternsallowsittorespondatruntimetofundamentalchangesinitssettings.Forexample,aSwing-basedapplicationiscapableofhotswappingit'suser-interfaceduringruntime.Furthermore,userscanprovidetheirownlookandfeelimplementation,whichallowsforuniformchangesinthelookandfeelofexistingSwingapplicationswithoutanyprogrammaticchangetotheapplicationcode.LightweightUISwing'shighlevelofflexibilityisreflectedinitsinherentabilitytooverridethenativehostoperatingsystem(OS)'sGUIcontrolsfordisplayingitself.Swing"paints"itscontrolsusingtheJava2DAPIs,ratherthancallinganativeuserinterfacetoolkit.Thus,aSwingcomponentdoesnothaveacorrespondingnativeOSGUIcomponent,andisfreetorenderitselfinanywaythatispossiblewiththeunderlyinggraphicsGUI's.However,atitscore,everySwingcomponentreliesonanAWTcontainer,since(Swing's)JComponentextends(AWT's)Container.ThisallowsSwingtoplugintothehostOS'sGUImanagementframework,includingthecrucialdevice/screenmappingsanduserinteractions,suchaskeypressesormousemovements.Swingsimply"transposes"itsown(OSagnostic)semanticsovertheunderlying(OSspecific)components.So,forexample,everySwingcomponentpaintsitsrenditiononthegraphicdeviceinresponsetoacalltocomponent.paint(),whichisdefinedin(AWT)Container.ButunlikeAWTcomponents,whichdelegatedthepaintingtotheirOS-native"heavyweight"widget,Swingcomponentsareresponsiblefortheirownrendering.Thistranspositionanddecouplingisnotmerelyvisual,andextendstoSwing'smanagementandapplicationofitsownOS-independentsemanticsforeventsfiredwithinitscomponentcontainmenthierarchies.Generallyspeaking,theSwingArchitecturedelegatesthetaskofmappingthevariousflavorsofOSGUIsemanticsontoasimple,butgeneralized,patterntotheAWTcontainer.Buildingonthatgeneralizedplatform,itestablishesitsownrichandcomplexGUIsemanticsintheformoftheJComponentmodel.Loosely-CoupledandMVCTheSwinglibrarymakesheavyuseoftheModel/View/Controllersoftwaredesignpattern,[5]whichconceptuallydecouplesthedatabeingviewedfromtheuserinterfacecontrolsthroughwhichitisviewed.Becauseofthis,mostSwingcomponentshaveassociatedmodels(whicharespecifiedintermsofJavainterfaces),andtheprogrammercanusevariousdefaultimplementationsorprovidetheirown.Theframeworkprovidesdefaultimplementationsofmodelinterfacesforallofitsconcretecomponents.ThetypicaluseoftheSwingframeworkdoesnotrequirethecreationofcustommodels,astheframeworkprovidesasetofdefaultimplementationsthataretransparently,bydefault,associatedwiththecorrespondingJComponentchildclassintheSwinglibrary.Ingeneral,onlycomplexcomponents,suchastables,treesandsometimeslists,mayrequirethecustommodelimplementationsaroundtheapplication-specificdatastructures.TogetagoodsenseofthepotentialthattheSwingarchitecturemakespossible,considerthehypotheticalsituationwherecustommodelsfortablesandlistsarewrappersoverDAOand/orEJBservices..Typically,Swingcomponentmodelobjectsareresponsibleforprovidingaconciseinterfacedefiningeventsfired,andaccessiblepropertiesforthe(conceptual)datamodelforusebytheassociatedJComponent.GiventhattheoverallMVCpatternisaloosely-coupledcollaborativeobjectrelationshippattern,themodelprovidestheprogrammaticmeansforattachingeventlistenerstothedatamodelobject.Typically,theseeventsaremodelcentric(ex:a"rowinserted"eventinatablemodel)andaremappedbytheJComponentspecializationintoameaningfuleventfortheGUIcomponent.Forexample,theJTablehasamodelcalledTableModelthatdescribesaninterfaceforhowatablewouldaccesstabulardata.Adefaultimplementationofthisoperatesonatwo-dimensionalarray.TheviewcomponentofaSwingJComponentistheobjectusedtographicallyrepresenttheconceptualGUIcontrol.AdistinctionofSwing,asaGUIframework,isinitsrelianeeonprogrammatically-renderedGUIcontrols(asopposedtotheuseofthenativehostOS'sGUIcontrols).PriortoJava6Update10,thisdistinctionwasasourceofcomplicationswhenmixingAWTcontrols,whichusenativecontrols,withSwingcontrolsinaGUI(seeMixingAWTandSwingcomponents).Finally,intermsofvisualcompositionandmanagement,Swingfavorsrelativelayouts(whichspecifythepositionalrelationshipsbetweencomponents)asopposedtoabsolutelayouts(whichspecifytheexactlocationandsizeofcomponents).Thisbiastowards"fluid"'visualorderingisduetoitsoriginsintheappletoperatingenvironmentthatframedthedesignanddevelopmentoftheoriginalJavaGUItoolkit.(Conceptually,thisviewofthelayoutmanagementisquitesimilartothatwhichinformstherenderingofHTMLcontentinbrowsers,andaddressesthesamesebfconcernsthatmotivatedtheformer.)RelationshiptoAWTAWTandSwingclasshierarchySinceearlyversionsofJava,aportionoftheAbstractWindowToolkit(AWT)hasprovidedplatform-independentAPIsforuserinterfacecomponents.InAWT,eachcomponentisrenderedandcontrolledbyanativepeercomponentspecifictotheunderlyingwindowingsystem.Bycontrast,Swingcomponentsareoftendescribedaslightweightbecausetheydonotrequireallocationofnativeresourcesintheoperatingsystem'swindowingtoolkit.TheAWTcomponentsarereferredtoasheavyweightcomponents.[accordingtowhom?]MuchoftheSwingAPIisgenerallyacomplementaryextensionoftheAWTratherthanadirectreplacement.Infact,everySwinglightweightinterfaceultimatelyexistswithinanAWTheavyweightcomponentbecauseallofthetop-levelcomponentsinSwing(JApplet,JDialog,JFrame,andJWindow)extendanAWTtop-levelcontainer.PriortoJava6Update10,theuseofbothlightweightandheavyweightcomponentswithinthesamewindowwasgenerallydiscouragedduetoZ-orderincompatibilities.However,laterversionsofJavahavefixedtheseissues,andbothSwingandAWTcomponentscannowbeusedinoneGUIwithoutZ-orderissues.ThecorerenderingfunctionalityusedbySwingtodrawitslightweightcomponentsisprovidedbyJava2D,anotherpartofJFC.RelationshiptoSWTTheStandardWidgetToolkit(SWT)isacompetingtoolkitoriginallydevelopedbyIBMandnowmaintainedbytheEclipsecommunity.SWT'simplementationhasmoreincommonwiththeheavyweightcomponentsofAWT.Thisconfersbenefitssuchasmoreaccuratefidelitywiththeunderlyingnativewindowingtoolkit,atthecostofanincreasedexposuretothenativeplatformintheprogrammingmodel.TheadventofSWThasgivenrisetoagreatdealofdivisionamongJavadesktopdevelopers,withmanystronglyfavoringeitherSWTorSwing.[accordingtowhom?]TherehasbeensignificantdebateandspeculationabouttheperformaneeofSWTversusSwing;somehintedthatSWT'sheavydependenceonJNIwouldmakeitslowerwhentheGUIcomponentandJavaneedtocommunicatedata,butfasteratrenderingwhenthedatamodelhasbeenloadedintotheGUI,butthishasnotbeenconfirmedeitherway.[6]Afairlythoroughsetofbenchmarksin2005concludedthatneitherSwingnorSWTclearlyoutperformedtheotherinthegeneralcase.[7]SWTisconsideredbysome[who?]tobelesseffectiveasatechnologyforcross-platformdevelopment.Byusingthehigh-levelfeaturesofeachnativewindowingtoolkit,theyclaimthatSWTreturnstotheissuesseeninthemid1990s(withtoolkitslikezApp,Zinc,XVTandIBM/Smalltalk)wheretoolkitsattemptedtomaskdifferencesinfocusbehaviour,eventtriggeringandgraphicallayout[citationneeded].Failuretomatchbehavioroneachplatformcancausesubtlebutdifficult-to-resolvebugsthatimpactuserinteractionandtheappearaneeoftheGUI.中文译文Swing是主要的JavaGUI小部件工具包。这是部分甲骨文的Java基础类(JFC)的-的API为Java程序提供了一个图形用户界面 (GUI)的。Swing的开发提供了一套更复杂的图形用户界面组件, 比早期的抽象窗口工具包(AWT) 。Swing提供了本机的外观和手感,模拟多个平台的外观和感觉,同时还支持一个可插拔的外观和手感,使应用程序有一个外观和感觉的基础平台无关。它具有比AWT更强大和灵活的组件。 除了熟悉的部件,如按钮,复选框和标签,Swing提供了一些先进的零部件,如卡式面板,滚动窗格,树,表,并列出。与AWT组件不同,Swing组件没有实现特定于平台的代码。 相反,他们都写在Java完全,因此是独立于平台。 “轻量级”一词用来形容这样的元素。历史互联网的基础类 (IFC)的一个图形库的Java最初是由网景通讯公司和第一,1996年12月16日发布的。4月2日,1997年,升阳和网景通信公司宣布,他们打算纳入国际金融公司与其他技术,形成 Java基础类。[1]“Java基础类”,后来改名为“SWING”。Swing介绍了一种机制,允许在没有作出实质性的变化,应用程序代码改变的应用程序的每个组件的外观和感觉。引进一个支持热插拔的外观和手感允许Swing组件来模拟本地组件的外观,同时仍保留平台独立性的好处。 秋千最初是作为一个单独的下载库分布,已被列入部分作为 Java标准版自1.2版。[2]Swing类和组件都包含在javax.swing包的层次结构。Swing架构Swing是一个平台独立的模型-视图-控制器GUI的Java框架,它遵循一个单线程的编程模型。[3]此外,这个框架提供了一个抽象层之间的代码结构和一个基于Swing的图形演示图形用户界面。基础Swing是独立于平台的,因为它是完全用Java编写的。所有的Swing类的完整的文档,可以发现在JavaAPI的指南。扩展秋千是1高度模块化的基础架构,它允许在“堵”指定的框架接口的各种自定义实现:。用户可以提供他们自己的自定义实现这些组件 (S)覆盖的默认实现使用Java的继承机制[4]Swing是一个基于组件的框架,其最终从javax.swing.JComponent类派生的组件。Swing对象的异步火灾事件,有绑定属性,并回应特定组件的方法的记录集。Swing组件的JavaBeans组件,与JavaBean的组件体系结构规范标准。定制鉴于Swing框架,很好地控制超过一个组件渲染的细节的纲领性渲染模型是在Swing。Swing组件的可视化表示,作为一个通用的模式,是一个组成的元素,如边界,插图,装饰,和其他性质的一套标准。 通常情况下,用户将通过指定特定的边界,颜色,背景,混浊等核心组件,然后使用这些属性来呈现自己的编程方式自定义一个标准的Swing组件(如表格)。然而,它也完全有可能创造独特的GUI控件的高度定制的可视化表示。配置Swing的运行时间的机制和间接的组成模式的严重依赖,使得它在运行时,应对其设置的根本性转变。例如,一个基于Swing的应用程序是能够热插拔的用户界面,在运行过程中。 此外,用户还可以提供自己的外观和感觉的实施,允许在统一的外观变化,并没有任何的纲领性改变应用程序代码感到现有的Swing应用程序。轻量级UISwing的高度的灵活性体现在其固有的覆盖本地主机操作系统 (操作系统)的GUI控件为显示自己的能力。 摆动“绘制”其使用Java2DAPI的控制,而不是调用一个原生的用户界面工具箱。 因此,Swing组件不具有相应的本地OS的GUI组件,可能是与底层图形界面的任何方式来呈现本身是免费的。然而,在其核心,依靠每一个Swing组件上AWT容器,因为Swing的JComponent扩展AWT的集装箱。这允许Swing来插入主机操作系统的GUI的管理框架,包括关键设备/屏幕映射和用户交互,如按键或鼠标动作。 摆动简单地“移植”自己的底层(特定作业系统)组件(操作系统无关)语义。 因此,举例来说,每一个Swing组件绘制其上的图形设备的移交响应呼叫到component.paint(),它定义(,AWT)容器。但不像AWT组件,委派画其操作系统本地的“重量级”的部件,Swing组件是对自己负责渲染。这换位和脱钩不只是视觉,延伸到Swing的管理和应用程序自身的独立于操作系统的语义在其组件遏制层次触发的事件。 一般来说,Swing的架构代表映射到一个简单的操作系统的图形用户界面语义的各种口味的任务, 但广义的,模式的AWT容器。上,广义的平台建设,建立自身的丰富和复杂的图形用户界面语义的形式JComponent模型。松耦合和MVCSwing库,使大量使用的模型/视图/控制器的软件设计模式,[5]概念中分离出来的数据从用户界面来看,控制,通过它查看。正因为如此,大多数Swing组件有关联模型(这是在指定的Java接口),程序员可以使用不同的默认实现,或提供自己
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 3D生物打印在血管化组织工程中的优化策略
- 高中物理实验中传感器在桥梁抗震研究中的应用课题报告教学研究课题报告
- 2025年四川机电职业技术学院公开招聘教师及助学助管员的备考题库(第三批)完整答案详解
- 2025年天津市西青经开区投资促进有限公司面向全国公开招聘招商管理人员备考题库带答案详解
- 2025年宝安中学(集团)海天学校初中实验员、小学语文教师招聘备考题库及参考答案详解一套
- 高中生运用声学知识设计校园雨水花园降噪系统课题报告教学研究课题报告
- 2025年雄安国创中心科技有限公司校园招聘备考题库及完整答案详解一套
- 现代实景家居室内设计方案模板
- 简约风笔记年度时事政治党政报告模板
- 2025年德惠市大学生乡村医生专项计划公开招聘工作人员备考题库(1号)参考答案详解
- 中国法律史-第一次平时作业-国开-参考资料
- 中外石油文化智慧树知到期末考试答案章节答案2024年中国石油大学(华东)
- 梅兰芳的【梅兰芳简介梅兰芳简历】
- 《旅游电子商务》试题及答案完整版
- 蜂胶全方位介绍教学课件
- 名校版高中数学基础知识全归纳(填空版+表格版+思维导图)
- 高中语文新课标必背古诗文72篇
- 医院收费员考试试题及答案
- 病理生理学案例复习题
- 大型船舶建造设施项目船坞及码头工程施工组织设计
- GB/T 20469-2006临床实验室设计总则
评论
0/150
提交评论