|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
javax.swing.plaf.metal.MetalTreeUI
public class MetalTreeUI
TreeUI
의 Metal Look & Feel 에 의한 구현입니다.
MetalTreeUI
가 노드간의 간격과 윤곽을 가시적으로 draw 하는 방법을 구성할 수 있도록(듯이) 합니다. 다음의 힌트를 지원합니다.
사선 |
아이와 부모를 연결하는 선이 그려진다. 루트 노드의 처리에 대해서는,JTree.setRootVisible(boolean) 및 JTree.setShowsRootHandles(boolean) 를 참조
|
---|---|
수평선 |
루트 노드의 아이를 구분하는 수평선이 그려진다 |
선없음 |
노드간에 시각적인 지시를 주는 선을 그리지 않는다 |
일반적으로,JTree
로부터 TreeUI
를 취득해 MetalTreeUI
의 인스턴스에 캐스트 하는 것은 실제적인 방법은 아니기 때문에, 클라이언트 프로퍼티 JTree.lineStyle
를 사용해 이 프로퍼티을 유효하게 합니다. 예를 들어,Horizontal
스타일로 전환하려면 ,tree.putClientProperty("JTree.lineStyle", "Horizontal");
를 실행합니다.
디폴트는 Angled
입니다.
상자의 클래스의 개요 |
---|
필드의 개요 |
---|
클래스 javax.swing.plaf.basic. BasicTreeUI 로부터 상속된 필드 |
---|
cellEditor , collapsedIcon , createdCellEditor , createdRenderer , currentCellRenderer , depthOffset , drawingCache , editingComponent , editingPath , editingRow , editorHasDifferentSize , expandedIcon , largeModel , lastSelectedRow , leftChildIndent , nodeDimensions , preferredMinSize , preferredSize , rendererPane , rightChildIndent , stopEditingInCompleteEditing , totalChildIndent , tree , treeModel , treeSelectionModel , treeState , validCachedPreferredSize |
생성자 의 개요 | |
---|---|
MetalTreeUI ()
|
메소드의 개요 | |
---|---|
static ComponentUI |
createUI (JComponent x)
|
protected void |
decodeLineStyle (Object lineStyleFlag)
클라이언트 프로퍼티에게 건네진 캐릭터 라인과 내부 표현 (currently 및 int)과의 사이의 변환을 실시합니다. |
protected int |
getHorizontalLegBuffer ()
노드간의 다리의 수평 요소는, 디폴트에서는 자식(child) 노드의 좌측의 오른쪽에서 시작됩니다. |
void |
installUI (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트를 구성합니다. |
protected boolean |
isLocationInExpandControl (int row,
int rowLevel,
int mouseX,
int mouseY)
|
void |
paint (Graphics g,
JComponent c)
Look &Feel 에 적절한, 지정된 컴퍼넌트를 그립니다. |
protected void |
paintHorizontalPartOfLeg (Graphics g,
Rectangle clipBounds,
Insets insets,
Rectangle bounds,
TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
다리의 수평 부분을 그립니다. |
protected void |
paintHorizontalSeparators (Graphics g,
JComponent c)
|
protected void |
paintVerticalPartOfLeg (Graphics g,
Rectangle clipBounds,
Insets insets,
TreePath path)
다리의 수직 부분을 그립니다. |
void |
uninstallUI (JComponent c)
installUI 시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. |
클래스 javax.swing.plaf. ComponentUI 로부터 상속된 메소드 |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , update |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public MetalTreeUI()
메소드의 상세 |
---|
public static ComponentUI createUI(JComponent x)
protected int getHorizontalLegBuffer()
BasicTreeUI
의 기술:
BasicTreeUI
내의 getHorizontalLegBuffer
public void installUI(JComponent c)
ComponentUI
의 기술:ComponentUI
인스턴스가, 지정된 컴퍼넌트의 UI 위양으로서 인스톨 되고 있을 때 불려 갑니다. 이 메소드는, 이하를 포함한 Look & Feel 용의 컴퍼넌트를 완전하게 구성할 필요가 있습니다.
LayoutManager
를 인스톨 한다
PropertyChangeListener
를 컴퍼넌트에 작성 또는 인스톨 한다
BasicTreeUI
내의 installUI
c
- UI 위양이 인스톨 되고 있는 컴퍼넌트ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
의 기술:installUI
시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. 이 메소드는, 지정된 컴퍼넌트의 UI 위양으로서의 UIComponent
인스턴스가 삭제되고 있을 때 불려 갑니다. 이 메소드는,installUI
에 의해 실행된 구성을 바탕으로 되돌릴 필요가 있습니다. 이 경우,JComponent
인스턴스를 깨끗한 상태 (여분의 청취자나, Look & Feel 고유의 프로퍼티 객체가 남지 않게)로 하도록(듯이) 충분히 주의해 주세요. 순서에는 다음의 것이 있습니다.
BasicTreeUI
내의 uninstallUI
c
- 이 UI 위양을 삭제하는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void decodeLineStyle(Object lineStyleFlag)
protected boolean isLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)
public void paint(Graphics g, JComponent c)
ComponentUI
의 기술:ComponentUI.update
메소드로부터, 지정된 컴퍼넌트가 페인트 될 때 불려 갑니다. 서브 클래스는, 이 메소드를 오버라이드(override) 해, 지정된 Graphics
객체를 사용해 컴퍼넌트의 내용을 draw 할 필요가 있습니다.
BasicTreeUI
내의 paint
g
- 페인트 대상의 Graphics
문맥c
- 페인트 되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
protected void paintHorizontalSeparators(Graphics g, JComponent c)
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
BasicTreeUI
의 기술:clipBounds
나 insets
를 변경하는 것은 용서되지 않습니다.
BasicTreeUI
내의 paintVerticalPartOfLeg
protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
BasicTreeUI
의 기술:clipBounds
나 insets
를 변경하는 것은 용서되지 않습니다.
주:루트가 가시가 아닌 경우,parentRow
는 -1 이 되는 일이 있습니다.
BasicTreeUI
내의 paintHorizontalPartOfLeg
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.