It is ok if you subclass only a few controls but it's going to be a nightmare to subclass a dozen or so controls.
如果你子类化的控件仅有几个,那么这种方法仍可行。但是当你子类化一打(十二个)左右的控件时它将是一个恶梦。
Whenever you define a new class as an extension of an existing one, the new class is said to be a subclass of the original.
任何时候你定义一个新类继承自已有的类,这个新类就叫做已有那个类的子类。
The DelegatePaintPanel subclass allows any image to be the background of any other (partially transparent) component.
DelegatePaintPanel子类允许任何图像作为任何其他(部分透明)组件的背景。
Since an instance of a subclass is an instance of your superclass, you could find multiple instances of the singleton.
由于子类的实例也是单例类的实例,所以可能出现多个单例实例并存的情况。
When applied to a method, it means that the method cannot be overridden by a subclass.
应用于方法时,意味着该方法不能被子类覆盖。
Two other refactorings, Push Down and Pull Up, move class methods or fields from a class to its subclass or superclass, respectively.
还有两个重构工具,PushDown和PullUp,分别实现将类方法或者属性从一个类移动到其子类或父类中。
Any of numerous minute marine and freshwater crustaceans of the subclass Copepoda, having an elongated body and a forked tail.
桡足动物任一种桡足亚纲的大量海洋或淡水甲壳纲小动物,身体细长,尾部分叉
A Struts action is an instance of an Action class subclass that implements a portion of a Web application and returns a forward.
Struts操作是Action类子类的实例,用来实现一部分Web应用程序并返回一个转发。
To fulfill the Liskov principle, you need to adhere to a simple rule: The domain of a method can't be shrunk in a subclass.
要实现利斯科夫原则,您需要坚持简单规则:域的一种方法不能收缩在子类中。
The uniqueness of the class cannot be imposed as a compile-time constraint on the subclass unless you use a private constructor.
由于使用了私有的构造方法,单例类不能被强制转化为一个编译期的常量。
The sorting algorithm can be applied to any subclass of OrderedArray which implements these methods.
排序算法能被用于实现两个方法的任意的OrderedArray的类。
It is the JFrame object with which you share properties and methods -- I do not inherit or subclass the JFrame class.
您将与JFrame对象共享属性与方法——我并没有继承JFrame类。
However, the subclass leaves the concrete class as is and does not attempt to instantiate the superclass.
子类没有对具体的方法做改变,也没有试图实例化超类。
Similarly, a subclass destructor must call its superclass destructor after it has completed its own resource reclamation.
类似地,子类析构函数在它完成其资源释放之后,也要调用基类的析构函数。
If none of the prepackaged Style classes fit your needs, you can subclass the base Style class and define your own naming conventions.
如果没有预包装的Style类符合您的需要,那么您可以定义Style基类的子类,并定义自己的命名约定。
The first two characters of the SQL state are a class value, and the last three characters form a subclass value.
SQL状态的前两个字符是一个类值,后三个字符形成子类值。
Thread is a subclass of Object, so any reference produced by an expression of type Thread is a valid reference value of type Object.
Thread是Object的一个子类,因此任何产生Thread类型的表达式产生的引用都是Object类型的有效引用。
For a normal object (non-array): The object must be an instance of the target class or a subclass of the target class.
对于普通对象(非数组):对象必须是目标类的实例或目标类的子类的实例。
According to this principle, the ability to substitute a subclass object for a superclass object is characteristic of good design.
此原则表明,子类对象对超类对象的替代能力是优秀设计的重要标志。
If the target class is an interface, then it is considered a subclass if it implements that interface.
如果目标类是接口,那么会把它当作实现了该接口的一个子类。
以上图片仅供学习交流使用,版权归原作者所有,如有侵权,请与我方联系