public class SynthContext extends Object
Region
上下文信息。一个
SynthContext
只应考虑的方法是通过持续有效的。换句话说,你不应该缓存
SynthContext
,传递给你,希望它仍然有效。
Constructor and Description |
---|
SynthContext(JComponent component, Region region, SynthStyle style, int state)
创建一个具有指定值synthcontext。
|
Modifier and Type | Method and Description |
---|---|
JComponent |
getComponent()
返回包含该区域的托管组件。
|
int |
getComponentState()
返回控件的状态,这是一位在
SynthConstants 定义的值。
|
Region |
getRegion()
返回确定该状态的区域。
|
SynthStyle |
getStyle()
返回与此区域关联的样式。
|
public SynthContext(JComponent component, Region region, SynthStyle style, int state)
component
- JComponent
region
-识别JComponent的部分
style
风格与组件关联
state
-组件状态的定义。
NullPointerException
如果组件、地区风格是空的。
public JComponent getComponent()
public Region getRegion()
public SynthStyle getStyle()
public int getComponentState()
SynthConstants
定义的值。一个地区至少会在一个
ENABLED
,
MOUSE_OVER
,
PRESSED
或
DISABLED
。
SynthConstants
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.