




已阅读5页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
英文原文about jdk apiabstractjava platform, standard edition 6 api specification ,this document is the api specification for version6 of the java platform, standard edition. the overview page is the front page of this api document and provides a list of all packages with a summary for each. this page can also contain an overall description of the set of packages. there is a class hierarchy page for all packages, plus a hierarchy for each package. each hierarchy page contains a list of classes and a list of interfaces. the classes are organized by inheritance structure starting with java.lang.object. the interfaces do not inherit from java.lang.object.introductionclass/interfaceeach class, interface, nested class and nested interface has its own separate page. each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions: class inheritance diagram,direct subclasses,all known subinterfaces,all known implementing classes,class/interface declaration,class/interface description ,nested class summary,field summary,constructor summary,method summary ,field detail,constructor detail,method detail.each summary entry contains the first sentence from the detailed description for that item. the summary entries are alphabetical, while the detailed .descriptions are in the order they appear in the source code. this preserves .the logical groupings established by the programmer.1 class abstractactionthis class provides default implementations for the jfc action interface. standard behaviors like the get and set methods for action object properties (icon, text, and enabled) are defined here. the developer need only subclass this abstract class and define the actionperformed method. warning: serialized objects of this class will not be compatible with future swing releases. the current serialization support is appropriate for short term storage or rmi between applications running the same version of swing. as of 1.4, support for long term storage of all javabeanstm has been added to the java.beans package. 2 class abstractbuttondefines common behaviors for buttons and menu items.buttons can be configured, and to some degree controlled, by actions. using an action with a button has many benefits beyond directly configuring a button. refer to swing components supporting action for more details, and you can find more information in how to use actions, a section in the java tutorial. for further information see how to use buttons, check boxes, and radio buttons, a section in the java tutorial. warning: serialized objects of this class will not be compatible with futureswing releases. the current serialization support is appropriate for shortterm storage or rmi between applications running the same version of swing. 3 class abstractdocumentan implementation of the document interface to serve as a basis for implementing various kinds of documents. at this level there is very little policy, so there is a corresponding increase in difficulty of use. this class implements a locking mechanism for the document. it allows multiple readers or one writer, and writers must wait until all observers of the document have been notified of a previous change before beginning another mutation to the document. the read lock is acquired and released using the render method. a write lock is aquired by the methods that mutate the document, and are held for the duration of the method call. notification is done on the thread that produced the mutation, and the thread has full read access to the document for the duration of the notification, but other readers are kept out until the notification has finished. the notification is a beans event notification which does not allow any further mutations until all listeners have been notified. any models subclassed from this class and used in conjunction with a text component that has a look and feel implementation that is derived from basictextui may be safely updated asynchronously, because all access to the view hierarchy is serialized by basictextui if the document is of type abstractdocument. the locking assumes that an independent thread will access the view hierarchy only from the documentlistener methods, and that there will be only one event thread active at a time. if concurrency support is desired, there are the following additional implications. the code path for any documentlistener implementation and any undolistener implementation must be threadsafe, and not access the component lock if trying to be safe from deadlocks. the repaint and revalidate methods on jcomponent are safe. abstractdocument models an implied break at the end of the document. among other things this allows you to position the caret after the last character. as a result of this, getlength returns one less than the length of the content. if you create your own content, be sure and initialize it to have an additional character. refer to stringcontent and gapcontent for examples of this. another implication of this is that elements that model the implied end character will have an endoffset = (getlength() + 1). for example, in defaultstyleddocument getparagraphelement(getlength().getendoffset() = getlength() + 1 . warning: serialized objects of this class will not be compatible with future swing releases. the current serialization support is appropriate for short term storage or rmi between applications running the same version of swing. as of 1.4, support for long term storage of all javabeanstm has been added to the java.beans package.4 class abstractlistthis class provides a skeletal implementation of the list interface to minimize the effort required to implement this interface backed by a random access data store (such as an array). for sequential access data (such as a linked list), abstractsequentiallist should be used in preference to this class. to implement an unmodifiable list, the programmer needs only to extend this class and provide implementations for the get(int) and size() methods. to implement a modifiable list, the programmer must additionally override the set(int, e) method (which otherwise throws an unsupportedoperationexception). if the list is variable-size the programmer must additionally override the add(int, e) and remove(int) methods. the programmer should generally provide a void (no argument) and collection constructor, as per the recommendation in the collection interface specification. unlike the other abstract collection implementations, the programmer does not have to provide an iterator implementation; the iterator and list iterator are implemented by this class, on top of the random access methods: get(int), set(int, e), add(int, e) and remove(int). the documentation for each non-abstract method in this class describes its implementation in detail. each of these methods may be overridden if the collection being implemented admits a more efficient implementation. 5 class basicattributethis class provides a basic implementation of the attribute interface. this implementation does not support the schema methods getattributedefinition() and getattributesyntaxdefinition(). they simply throw operationnotsupportedexception. subclasses of basicattribute should override these methods if they support them. the basicattribute class by default uses object.equals() to determine equality of attribute values when testing for equality or when searching for values, except when the value is an array. for an array, each element of the array is checked using object.equals(). subclasses of basicattribute can make use of schema information when doing similar equality checks by overriding methods in which such use of schema is meaningful. similarly, the basicattribute class by default returns the values passed to its constructor and/or manipulated using the add/remove methods. subclasses of basicattribute can override get() and getall() to get the values dynamically from the directory (or implement the attribute interface directly instead of subclassing basicattribute). note that updates to basicattribute (such as adding or removing a value) does not affect the corresponding representation of the attribute in the directory. updates to the directory can only be effected using operations in the dircontext interface. a basicattribute instance is not synchronized against concurrent multithreaded access. multiple threads trying to access and modify a basicattribute should lock the object. 6 class buttongroupthis class is used to create a multiple-exclusion scope for a set of buttons. creating a set of buttons with the same buttongroup object means that turning on one of those buttons turns off all other buttons in the group. a buttongroup can be used with any set of objects that inherit from abstractbutton. typically a button group contains instances of jradiobutton, jradiobuttonmenuitem, or jtogglebutton. it wouldnt make sense to put an instance of jbutton or jmenuitem in a button group because jbutton and jmenuitem dont implement the selected state. initially, all buttons in the group are unselected. for examples and further information on using button groups see how to use radio buttons, a section in the java tutorial. warning: serialized objects of this class will not be compatible with future swing releases. the current serialization support is appropriate for short term storage or rmi between applications running the same version of swing. as of 1.4, support for long term storage of all javabeanstm has been added to the java.beans package.9英文翻译关于jdk api摘要java platform standard edition 6 api 规范本文档是 javatmplatform standard edition 6 的 api 规范。概述 页面是此 api 文档的首页,提供了所有软件包的列表及其摘要。此页面也可能包含这些软件包的总体描述。对于所有软件包,有一个 类分层结构 页面,以及每个软件包的分层结构。每个分层结构页面都包含类的列表和接口的列表。从 java.lang.object 开始,按继承结构对类进行排列。接口不从 java.lang.object 继承。引言每个类、接口、嵌套类和嵌套接口都有各自的页面。其中每个页面都由三部分(类/接口描述、摘要表,以及详细的成员描述)组成:类继承图,直接子类,所有已知子接口,所有已知实现类,类/接口声明,类/接口描述 ,嵌套类摘要,字段摘要,构造方法摘要,方法摘要 ,字段详细信息,构造方法详细信息,方法详细信息,每个摘要条目都包含该项目的详细描述的第一句。摘要条目按字母顺序排列,而详细描述则按其在源代码中出现的顺序排列。这样保持了程序员所建立的逻辑分组。1 类 abstractaction此类提供 jfc action 接口的默认实现。它定义了一些标准行为,比如 action 对象属性(icon、text 和 enabled)的 get 和 set 方法。开发人员只需为此抽象类创建子类并定义 actionperformed 方法即可。 警告:此类的已序列化对象与以后的 swing 版本不兼容。当前序列化支持适用于短期存储,或适用于在运行相同 swing 版本的应用程序之间进行 rmi(remote method invocation,远程方法调用)。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 javabeanstm 长期存储的功能。2 类 abstractbutton定义按钮和菜单项的一般行为按钮可以进行配置,以及通过 action 进行某种程度的控制。使用带有按钮的 action具有除直接配置按钮之外的许多优点。有关更多信息,请参阅支持 action 的 swing组件,在 the java tutorial 中的 how to use actions 一节中可以找到更多信息。有关更多信息,请参阅 the java tutorial 中的 how to use buttons, check boxes, and radio buttons 一节。警告:此类的已序列化对象与以后的 swing 版本不兼容。当前序列化支持适用于短期存储,或适用于在运行相同 swing 版本的应用程序之间进行 rmi(remote method invocation,远程方法调用)。3 类 abstractdocument文档接口的实现,可作为实现各种文档的基础。在此级别上几乎没有策略,所以相应地增加了使用难度。 此类实现了文档的锁定机制。它允许多个 reader 或一个 writer,并且在 writer 开始对文档的另一次改变前,必须等到将以前的更改已通知该文档的所有观察者。使用 render 方法获取和释放读取锁定。通过改变文档的那些方法来获取写入锁定,并且在该方法调用期间保持锁定。在生成改变的线程上完成通知,并且在通知期间该线程对文件具有完全的读取访问权限,不过在通知结束前其他 reader 无法读取。该通知是一个 bean 事件通知,只有通知所有侦听器之后才允许进一步的改变。 所有根据此类创建子类且与文本组件(该组件具有派生自 basictextui 的外观实现)一起使用的模型都可安全地进行异步更新,因为如果该文档的类型是 abstractdocument,则对 view 层次结构的所有访问都是由 basictextui 序列化的。锁定机制假定独立的线程仅从 documentlistener 方法访问 view 层次结构,并且同一时间只有一个事件线程处于活动状态。如果需要并发支持,则有下列额外的含义。所有 documentlistener 实现和所有 undolistener 实现的代码路径必须是线程安全的,并且如果要避免死锁,则不能访问组件锁定。在 jcomponent 上执行 repaint 和 revalidate 方法是安全的。 abstractdocument 在文档的结尾模拟了一个隐含的分隔。除了其他作用,这一功能允许您在最后一个字符的后面定位插入符。因此,getlength 返回一个比 content 的长度小的值。如果创建自己的 content,一定要有一个额外的字符并且初始化它。有关此内容的示例,请参见 stringcontent 和 gapcontent。另一个含义是模拟该隐含结束字符的 element 具有 endoffset = (getlength() + 1)。例如,在 defaultstyleddocument 中,getparagraphelement(getlength().getendoffset() = getlength() + 1。 警告:此类的已序列化对象与以后的 swing 版本不兼容。当前的序列化支持适用于短期存储或运行相同 swing 版本的应用程序之间的 rmi。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 javabeanstm 长期存储的功能。4 类 abstractlist此类提供 list 接口的骨干实现,以最大限度地减少实现“随机访问”数据存储(如数组)支持的该接口所需的工作。对于连续的访问数据(如链表),应优先使用 abstractsequentiallist,而不是此类。 要实现不可修改的列表,编程人员只需扩展此类,并提供 get(int) 和 size() 方法的实现。 要实现可修改的列表,编程人员必须另外重写 set(int, e) 方法(否则将抛出 unsupportedoperationexception)。如果列表为可变大小,则编程人员必须另外重写 add(int, e) 和 remove(int) 方法。按照 collection 接口规范中的建议,编程人员通常应该提供一个 void(无参数)和 collecti
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 考点解析-冀教版8年级下册期末试题附参考答案详解【基础题】
- 考点解析冀教版8年级下册期末测试卷附答案详解(突破训练)
- 智能药物平台创新创业项目商业计划书
- 绿色出行路线创新创业项目商业计划书
- 基础强化人教版8年级数学上册《整式的乘法与因式分解》定向测试试卷(含答案详解版)
- 合成氨二氧化碳回收工专项考核试卷及答案
- 解析卷浙江省嵊州市中考数学真题分类(二元一次方程组)汇编定向训练试卷(含答案详解版)
- 浴池服务员安全规范考核试卷及答案
- 球团焙烧工理论知识考核试卷及答案
- 焙烧压煮工三级安全教育(车间级)考核试卷及答案
- 秀米推文培训课件
- 阜外体外循环手册
- 天津市红桥区2024-2025学年七年级上学期10月期中考试语文试题
- DB11T 856-2012 门牌、楼牌 设置规范
- 40m预制箱梁汽车吊双机台吊专项方案(经典)
- 2024年公开招聘事业单位工作人员报名登记表
- 全国人力资源和社会保障法律法规知识网络竞赛题及答案
- GB/T 44335-2024精细陶瓷涂层试验方法基于Stoney公式的陶瓷涂层内应力测定
- 水电站进水口启闭机排架结构及配筋计算书
- 《大学英语四级强化教程》全套教学课件
- 《国有企业管理人员处分条例》学习解读课件
评论
0/150
提交评论