|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.CellRendererPane
public class CellRendererPane
이 클래스는, 셀 렌더링과 그것을 사용하는 컴퍼넌트의 사이에 삽입됩니다. 이것은 repaint() 메소드와 invalidate() 메소드를 방해하기 위해(때문에)인 만큼 존재하고 있습니다. 이러한 메소드는 방해를 받지 않는 경우, 렌더링이 설정되었을 때에 트리를 보냅니다. 이 클래스는, JTable, JTree, 및 JList 의 구현으로 사용됩니다. JList 의 각 행을 페인트 하는 코드내에서의 CellRendererPane 의 사용예를 다음에 나타냅니다.
cellRendererPane = new CellRendererPane(); ... Component rendererComponent = renderer.getListCellRendererComponent(); renderer.configureListCellRenderer(dataModel.getElementAt(row), row); cellRendererPane.paintComponent(g, rendererComponent, this, x, y, w, h);
렌더링 컴퍼넌트는, 올바르게 기능하기 위해서, isShowing()를 오버라이드(override) 해 무조건 true 를 돌려줄 필요가 있습니다. 이것은, Swing 의 페인트는 isShowing 가 false 의 경우, 컴퍼넌트에 대해서 아무것도 하지 않기 때문입니다.
경고: 이 클래스의 직렬화 된 객체는, 향후의 Swing 릴리스와 호환은 아니게 될 예정입니다. 현재의 직렬화의 지원는, 단기간의 운용이나, 같은 버젼의 Swing 를 실행하는 어플리케이션간의 RMI 에 적절하고 있습니다. JDK Version 1.4 이후, 모든 JavaBeans™ 의 장기간의 운용 지원는,java.beans
패키지에 추가되고 있습니다. 자세한 것은,XMLEncoder
를 참조해 주세요.
상자의 클래스의 개요 | |
---|---|
protected class |
CellRendererPane.AccessibleCellRendererPane
이 클래스는 CellRendererPane 클래스용의 접근성? 지원를 구현하고 있습니다. |
클래스 java.awt. Container 로부터 상속된 상자의 클래스/인터페이스 |
---|
Container.AccessibleAWTContainer |
클래스 java.awt. Component 로부터 상속된 상자의 클래스/인터페이스 |
---|
Component.AccessibleAWTComponent , Component.BaselineResizeBehavior , Component.BltBufferStrategy , Component.FlipBufferStrategy |
필드의 개요 | |
---|---|
protected AccessibleContext |
accessibleContext
|
클래스 java.awt. Component 로부터 상속된 필드 |
---|
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT |
인터페이스 java.awt.image. ImageObserver 로부터 상속된 필드 |
---|
ABORT , ALLBITS , ERROR , FRAMEBITS , HEIGHT , PROPERTIES , SOMEBITS , WIDTH |
생성자 의 개요 | |
---|---|
CellRendererPane ()
CellRendererPane 객체를 구축합니다. |
메소드의 개요 | |
---|---|
protected void |
addImpl (Component x,
Object constraints,
int index)
지정한 컴퍼넌트가 벌써 이 아이로서 설정제의 경우, 처리는 불필요합니다. |
AccessibleContext |
getAccessibleContext ()
이 CellRendererPane 에 관련한 AccessibleContext 를 돌려줍니다. |
void |
invalidate ()
셀 렌더링의 아이가 설정될 때, 무효인 트리가 보내지는 것을 피하기 위해서(때문에) 오버라이드(override) 됩니다. |
void |
paint (Graphics g)
호출하지 않습니다. |
void |
paintComponent (Graphics g,
Component c,
Container p,
int x,
int y,
int w,
int h)
this.paintComponent(g, c, p, x, y, w, h, false)를 호출합니다. |
void |
paintComponent (Graphics g,
Component c,
Container p,
int x,
int y,
int w,
int h,
boolean shouldValidate)
셀 렌더링 컴퍼넌트 c 를 그래픽스 객체 g 에 그립니다. |
void |
paintComponent (Graphics g,
Component c,
Container p,
Rectangle r)
구형의 x, y, 폭, 높이의 각 필드를 사용해 this.paintComponent()를 호출합니다. |
void |
update (Graphics g)
호출하지 않습니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
필드의 상세 |
---|
protected AccessibleContext accessibleContext
생성자 의 상세 |
---|
public CellRendererPane()
메소드의 상세 |
---|
public void invalidate()
Container
내의 invalidate
Container.validate()
,
Container.layout()
,
LayoutManager
,
LayoutManager2.invalidateLayout(Container)
public void paint(Graphics g)
Container
내의 paint
g
- 지정된 Graphics 윈도우Component.update(Graphics)
public void update(Graphics g)
Container
내의 update
g
- 지정된 Graphics 윈도우Component.update(Graphics)
protected void addImpl(Component x, Object constraints, int index)
Container
내의 addImpl
x
- 추가되는 컴퍼넌트constraints
- 이 컴퍼넌트의 배치 조건을
표현하는 객체index
- 컴퍼넌트를 삽입하는 컨테이너의 리스트내에서의 위치.
-1
하
마지막에 추가하는 것을 의미하는Container.add(Component)
,
Container.add(Component, int)
,
Container.add(Component, java.lang.Object)
,
LayoutManager
,
LayoutManager2
public void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate)
public void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h)
public void paintComponent(Graphics g, Component c, Container p, Rectangle r)
public AccessibleContext getAccessibleContext()
Accessible
내의 getAccessibleContext
Component
내의 getAccessibleContext
|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.