public abstract class SynthStyleFactory extends Object
SynthStyle
s厂。每个合成器
ComponentUI
s称到目前
SynthStyleFactory
获取每个具有鲜明的地区
SynthStyle
。
下面的示例创建一个自定义的SynthStyleFactory
返回一个基于Region
不同风格:
类mystylefactory延伸synthstylefactory {公共synthstyle getstyle(JComponent C区ID){如果(身份=区域按钮)返回按钮;}否则如果(标识=区域。)返回treestyle;}返回默认的风格;}}synthlookandfeel LAF =新synthlookandfeel();缺省情况(LAF)”;synthlookandfeel setstylefactory(新mystylefactory());
SynthStyleFactory
,
SynthStyle
Constructor and Description |
---|
SynthStyleFactory()
创建一个
SynthStyleFactory 。
|
public abstract SynthStyle getStyle(JComponent c, Region id)
c
组件的要求
id
域标识符
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.