|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
public class BasicTreeUI
계층적인 데이터 구조의 기본 Look & Feel 에 의한 구현입니다.
상자의 클래스의 개요 | |
---|---|
class |
BasicTreeUI.CellEditorHandler
셀 편집 이벤트의 취득과 거기에 응해 트리의 갱신을 실시하는 청취자입니다. |
class |
BasicTreeUI.ComponentHandler
필요하면, 스크롤시에 적절한 사이즈를 갱신합니다. |
class |
BasicTreeUI.FocusHandler
포커스를 잃었을 때, 또는 취득했을 때에, 리드 선택행을 페인트 다시 합니다. |
class |
BasicTreeUI.KeyHandler
복수의 키가 밀리는 이벤트를 취득해, 적절히 이벤트를 생성하기 위해서 사용됩니다. |
class |
BasicTreeUI.MouseHandler
마우스 이벤트에 근거해 선택을 갱신하는 TreeMouseListener 입니다. |
class |
BasicTreeUI.MouseInputHandler
MouseInputHandler 는, 구축에 사용되는 송신지에서 마우스로부터 손가락이 풀릴 때까지, 모든 마우스 이벤트 (마우스 동작 이벤트를 포함한다)를 건네주는 처리를 합니다. |
class |
BasicTreeUI.NodeDimensionsHandler
노드의 사이즈를 취득하는 클래스이며, 메소드는 BasicTreeUI 메소드에 전송 됩니다. |
class |
BasicTreeUI.PropertyChangeHandler
트리의 PropertyChangeListener 입니다. |
class |
BasicTreeUI.SelectionModelPropertyChangeHandler
TreeSelectionModel 의 청취자이며, 모델의 프로퍼티이 변경되었을 경우에 행의 선택을 리셋 합니다. |
class |
BasicTreeUI.TreeCancelEditingAction
액션이 실행되었을 때에 cancelEditing 을 호출하는 ActionListener 입니다. |
class |
BasicTreeUI.TreeExpansionHandler
노드의 전개 또는 꺾어 접어에 응해 TreeState 를 갱신합니다. |
class |
BasicTreeUI.TreeHomeAction
TreeHomeAction 는, 종료 또는 홈 액션을 처리하기 위해서 사용됩니다. |
class |
BasicTreeUI.TreeIncrementAction
TreeIncrementAction 는, 상하의 액션을 처리하기 위해서 사용됩니다. |
class |
BasicTreeUI.TreeModelHandler
모든 TreeModel 이벤트를 TreeState 에 전송 합니다. |
class |
BasicTreeUI.TreePageAction
TreePageAction 는, 페이지 업과 페이지 다운의 이벤트를 처리합니다. |
class |
BasicTreeUI.TreeSelectionHandler
선택 모델의 변경을 대기해, 변경이 있었을 경우에 표시를 갱신합니다. |
class |
BasicTreeUI.TreeToggleAction
최초로 선택된 행으로, 전개 상태가 교체됩니다. |
class |
BasicTreeUI.TreeTraverseAction
TreeTraverseAction 는, 왼쪽 또는 오른쪽 키를 위해서(때문에) 사용되는 액션입니다. |
필드의 개요 | |
---|---|
protected TreeCellEditor |
cellEditor
트리의 에디터입니다. |
protected Icon |
collapsedIcon
|
protected boolean |
createdCellEditor
현재 트리에 있는 에디터가 이 인스턴스에 의해 작성되었을 경우에 true 로 설정됩니다. |
protected boolean |
createdRenderer
현재 트리에 있는 렌더링이 이 인스턴스에 의해 작성되었을 경우에 true 로 설정됩니다. |
protected TreeCellRenderer |
currentCellRenderer
실제의 셀의 draw를 실시하기 위해서(때문에) 사용되고 있는 렌더링입니다. |
protected int |
depthOffset
x 위치를 정확하게 계산하기 위한 깊이의 오프셋(offset)의 양입니다. |
protected Hashtable <TreePath ,Boolean > |
drawingCache
수직선의 draw를 최소화하기 위해서 사용됩니다. |
protected Component |
editingComponent
이것은 편집시에, 실제의 편집을 실시하는 Component 가 됩니다. |
protected TreePath |
editingPath
편집중의 패스입니다. |
protected int |
editingRow
편집중의 행입니다. |
protected boolean |
editorHasDifferentSize
에디터의 사이즈가 렌더링과 다른 경우에 true 로 설정됩니다. |
protected Icon |
expandedIcon
|
protected boolean |
largeModel
largeModel 의 최적화를 행하고 있는 경우는 true 입니다. |
protected int |
lastSelectedRow
마지막에 선택된 행의 인덱스입니다. |
protected int |
leftChildIndent
왼쪽 마진과 수직의 파선이 draw 되는 위치동안의 거리입니다. |
protected AbstractLayoutCache.NodeDimensions |
nodeDimensions
TreeState 에 대해 노드에 필요한 사이즈를 통지합니다. |
protected Dimension |
preferredMinSize
적절한 최소 사이즈입니다. |
protected Dimension |
preferredSize
모든 노드를 완전하게 표시하기 위해서 필요한 사이즈입니다. |
protected CellRendererPane |
rendererPane
TreeCellRenderer 를 페인트 하기 위해서 사용됩니다. |
protected int |
rightChildIndent
셀의 내용이 draw 되는 위치를 나타내기 위해서(때문에) leftChildIndent 에 가산되는 거리입니다. |
protected boolean |
stopEditingInCompleteEditing
편집시에, shouldSelectCell()가 true 를 돌려주었을 경우에 false 로 설정됩니다. |
protected int |
totalChildIndent
인덴트 되는 총거리입니다. |
protected JTree |
tree
draw처의 컴퍼넌트입니다. |
protected TreeModel |
treeModel
무엇을 표시하는지를 나타내기 위해서(때문에) 사용됩니다. |
protected TreeSelectionModel |
treeSelectionModel
선택을 유지하는 모델입니다. |
protected AbstractLayoutCache |
treeState
사이즈 변경 및 전개 상태를 처리하는 객체입니다. |
protected boolean |
validCachedPreferredSize
preferredSize 가 유효한가 어떤가를 나타냅니다. |
생성자 의 개요 | |
---|---|
BasicTreeUI ()
|
메소드의 개요 | |
---|---|
void |
cancelEditing (JTree tree)
현재의 편집 세션을 취소합니다. |
protected void |
checkForClickInExpandControl (TreePath path,
int mouseX,
int mouseY)
mouseX 및 mouseY 가 row 의 전개 또는 때보고의 영역에 있는 경우, 이 메소드는 행의 전개 상태를 바꿉니다. |
protected void |
completeEditing ()
편집 세션을 중지하기 위해서 메세지로서 보내집니다. |
protected void |
completeEditing (boolean messageStop,
boolean messageCancel,
boolean messageTree)
편집 세션을 중지합니다. |
protected void |
completeUIInstall ()
모든 디폴트 및 청취자가 인스톨 된 뒤에 installUI 로부터 불려 갑니다. |
protected void |
completeUIUninstall ()
|
protected void |
configureLayoutCache ()
Look & Feel 를 제공하고 있는 트리에 근거해 TreeState 의 인스턴스를 리셋 합니다. |
protected CellEditorListener |
createCellEditorListener ()
현재의 에디터로부터의 이벤트를 처리하는 청취자를 작성합니다. |
protected CellRendererPane |
createCellRendererPane ()
렌더링 컴퍼넌트가 배치되고 있는 렌더링 구획을 돌려줍니다. |
protected ComponentListener |
createComponentListener ()
새로운 ComponentHandler 를 작성해, 그것을 돌려줍니다. |
protected TreeCellEditor |
createDefaultCellEditor ()
디폴트의 셀 에디터를 작성합니다. |
protected TreeCellRenderer |
createDefaultCellRenderer ()
각 노드를 draw 하기 위해서 사용되는 디폴트의 셀 렌더링을 돌려줍니다. |
protected FocusListener |
createFocusListener ()
포커스를 잃었을 때, 및 취득했을 때에 표시를 갱신하는 청취자를 작성합니다. |
protected KeyListener |
createKeyListener ()
트리로부터 키 이벤트를 취득하는 청취자를 작성합니다. |
protected AbstractLayoutCache |
createLayoutCache ()
노드의 사이즈와 전개 상태를 관리하는 객체를 작성합니다. |
protected MouseListener |
createMouseListener ()
마우스 이벤트에 근거해 선택을 갱신하는 청취자를 작성합니다. |
protected AbstractLayoutCache.NodeDimensions |
createNodeDimensions ()
트리의 지정된 노드의 사이즈를 나타낼 수가 있는 NodeDimensions 의 인스턴스를 생성합니다. |
protected PropertyChangeListener |
createPropertyChangeListener ()
트리의 변경에 근거해 UI 를 갱신하는 청취자를 작성합니다. |
protected PropertyChangeListener |
createSelectionModelPropertyChangeListener ()
선택 모델로부터 프로퍼티 변경 이벤트를 취득하는 청취자를 작성합니다. |
protected TreeExpansionListener |
createTreeExpansionListener ()
노드의 전개 상태가 변경되었을 때에 트리 상태를 갱신하는 객체를 작성해, 그것을 돌려줍니다. |
protected TreeModelListener |
createTreeModelListener ()
모델이 변경되었을 때에 트리를 갱신할 수 있는 청취자를 돌려줍니다. |
protected TreeSelectionListener |
createTreeSelectionListener ()
선택 변경 메소드에 근거해 표시를 갱신하는 청취자를 작성합니다. |
static ComponentUI |
createUI (JComponent x)
|
protected void |
drawCentered (Component c,
Graphics graphics,
Icon icon,
int x,
int y)
|
protected void |
drawDashedHorizontalLine (Graphics g,
int y,
int x1,
int x2)
|
protected void |
drawDashedVerticalLine (Graphics g,
int x,
int y1,
int y2)
|
protected void |
ensureRowsAreVisible (int beginRow,
int endRow)
beginRow 와 endRow 에 의해 식별되는 모든 행이 가시가 됩니다. |
int |
getBaseline (JComponent c,
int width,
int height)
baseline를 돌려줍니다. |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior (JComponent c)
사이즈의 변화에 맞추어 컴퍼넌트의 baseline가 어떻게 변화하는지를 나타내는 열거를 돌려줍니다. |
protected TreeCellEditor |
getCellEditor ()
|
protected TreeCellRenderer |
getCellRenderer ()
트리 렌더링 또는 defaultCellRenderer (null 가 아닌 (분)편)가 되는, currentCellRenderer 를 돌려줍니다. |
TreePath |
getClosestPathForLocation (JTree tree,
int x,
int y)
x, y 에 가장 가까운 노드에의 패스를 돌려줍니다. |
Icon |
getCollapsedIcon ()
|
TreePath |
getEditingPath (JTree tree)
편집중의 요소에 대한 패스를 돌려줍니다. |
Icon |
getExpandedIcon ()
|
protected Color |
getHashColor ()
|
protected int |
getHorizontalLegBuffer ()
노드간의 다리의 수평 요소는, 디폴트에서는 자식(child) 노드의 좌측의 오른쪽에서 시작됩니다. |
protected TreePath |
getLastChildPath (TreePath parent)
parent 의 마지막 아이 패스를 돌려줍니다. |
int |
getLeftChildIndent ()
|
Dimension |
getMaximumSize (JComponent c)
이 컴퍼넌트의 최대 사이즈를 돌려줍니다. |
Dimension |
getMinimumSize (JComponent c)
이 컴퍼넌트의 최소 사이즈를 돌려줍니다. |
protected TreeModel |
getModel ()
|
Rectangle |
getPathBounds (JTree tree,
TreePath path)
패스의 마지막 항목이 draw 되는 라벨 부분을 둘러싸는 Rectangle 를 돌려줍니다. |
TreePath |
getPathForRow (JTree tree,
int row)
건네받은 row 의 패스를 돌려줍니다. |
Dimension |
getPreferredMinSize ()
적절한 최소 사이즈를 돌려줍니다. |
Dimension |
getPreferredSize (JComponent c)
트리를 올바르게 표시하기 위한 적절한 사이즈를 돌려줍니다. |
Dimension |
getPreferredSize (JComponent c,
boolean checkConsistancy)
c 로 트리를 나타내기 위한 적절한 사이즈를 돌려줍니다. |
int |
getRightChildIndent ()
|
int |
getRowCount (JTree tree)
표시되고 있는 행수를 돌려줍니다. |
int |
getRowForPath (JTree tree,
TreePath path)
path 로 식별되는 마지막 항목이 가시인 행을 돌려줍니다. |
protected int |
getRowHeight ()
|
protected int |
getRowX (int row,
int depth)
x 축으로 따라 특정의 행을 draw 하는 위치를 돌려줍니다. |
protected TreeSelectionModel |
getSelectionModel ()
|
protected boolean |
getShowsRootHandles ()
|
protected int |
getVerticalLegBuffer ()
노드간의 다리의 수직 요소는, 디폴트에서는 친노드의 하단으로부터 시작됩니다. |
protected void |
handleExpandControlClick (TreePath path,
int mouseX,
int mouseY)
사용자가 특정의 행을 클릭했을 때에 메세지로서 보내져 toggleExpandState 를 호출합니다. |
protected void |
installComponents ()
렌더링 구획인, 트리의 서브 컴퍼넌트를 인스톨 합니다. |
protected void |
installDefaults ()
|
protected void |
installKeyboardActions ()
|
protected void |
installListeners ()
|
void |
installUI (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트를 구성합니다. |
protected boolean |
isEditable ()
|
boolean |
isEditing (JTree tree)
트리가 편집되고 있는 경우에 true 를 돌려줍니다. |
protected boolean |
isLargeModel ()
|
protected boolean |
isLeaf (int row)
|
protected boolean |
isLocationInExpandControl (TreePath path,
int mouseX,
int mouseY)
mouseX 및 mouseY 가 노드의 전개 또는 꺾어 접어에 사용되는 행의 영역에 있어,row 에 있는 노드가 잎을 나타내지 않는 경우에 true 를 돌려줍니다. |
protected boolean |
isMultiSelectEvent (MouseEvent event)
true 가 돌려주어졌을 경우, 노드상의 마우스 이벤트가 엥커 포인트로부터 선택됩니다. |
protected boolean |
isRootVisible ()
|
protected boolean |
isToggleEvent (MouseEvent event)
true 가 돌려주어졌을 경우, 마우스아래의 행이 이벤트에 근거해 교체됩니다. |
protected boolean |
isToggleSelectionEvent (MouseEvent event)
true 가 돌려주어졌을 경우, 노드상의 마우스 이벤트에 근거해 마우스아래의 행의 선택만이 교체됩니다. |
void |
paint (Graphics g,
JComponent c)
Look &Feel 에 적절한, 지정된 컴퍼넌트를 그립니다. |
protected void |
paintExpandControl (Graphics g,
Rectangle clipBounds,
Insets insets,
Rectangle bounds,
TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
행의 전개 (바꾸고) 부분을 그립니다. |
protected void |
paintHorizontalLine (Graphics g,
JComponent c,
int y,
int left,
int right)
수평선을 그립니다. |
protected void |
paintHorizontalPartOfLeg (Graphics g,
Rectangle clipBounds,
Insets insets,
Rectangle bounds,
TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
다리의 수평 부분을 그립니다. |
protected void |
paintRow (Graphics g,
Rectangle clipBounds,
Insets insets,
Rectangle bounds,
TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
행의 렌더링 부분을 그립니다. |
protected void |
paintVerticalLine (Graphics g,
JComponent c,
int x,
int top,
int bottom)
수직선을 그립니다. |
protected void |
paintVerticalPartOfLeg (Graphics g,
Rectangle clipBounds,
Insets insets,
TreePath path)
다리의 수직 부분을 그립니다. |
protected void |
pathWasCollapsed (TreePath path)
VisibleTreeNode 가 꺾어 접어진 뒤에, VisibleTreeNode 로부터 메세지로서 보내집니다. |
protected void |
pathWasExpanded (TreePath path)
VisibleTreeNode 가 전개된 뒤에, VisibleTreeNode 로부터 메세지로서 보내집니다. |
protected void |
prepareForUIInstall ()
tree 인스턴스 변수의 설정 후, 디폴트 및 청취자가 인스톨 되기 전에 불려 갑니다. |
protected void |
prepareForUIUninstall ()
|
protected void |
selectPathForEvent (TreePath path,
MouseEvent event)
특정의 행에서의 MouseEvent 에 근거해 선택을 갱신하기 위해서 메세지로서 보내집니다. |
protected void |
setCellEditor (TreeCellEditor editor)
셀 에디터를 설정합니다. |
protected void |
setCellRenderer (TreeCellRenderer tcr)
TreeCellRenderer 를 tcr 로 설정합니다. |
void |
setCollapsedIcon (Icon newG)
|
protected void |
setEditable (boolean newValue)
리시버가 편집을 허가할지 어떨지를 설정합니다. |
void |
setExpandedIcon (Icon newG)
|
protected void |
setHashColor (Color color)
|
protected void |
setLargeModel (boolean largeModel)
필요한 경우에, componentListener 를 갱신합니다. |
void |
setLeftChildIndent (int newAmount)
|
protected void |
setModel (TreeModel model)
TreeModel 를 설정합니다. |
void |
setPreferredMinSize (Dimension newSize)
적절한 최소 사이즈를 설정합니다. |
void |
setRightChildIndent (int newAmount)
|
protected void |
setRootVisible (boolean newValue)
루트를 가시로 설정합니다. |
protected void |
setRowHeight (int rowHeight)
treeState 에 전송 되는, 행의 높이를 설정합니다. |
protected void |
setSelectionModel (TreeSelectionModel newLSM)
선택 모델을 리셋 합니다. |
protected void |
setShowsRootHandles (boolean newValue)
노드의 핸들이 표시될지 어떨지를 결정합니다. |
protected boolean |
shouldPaintExpandControl (TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
지정된 행으로 전개 (바꾸고) 컨트롤이 draw 되지 않으면 안 되는 경우에 true 를 돌려줍니다. |
protected boolean |
startEditing (TreePath path,
MouseEvent event)
cellEditor 가 있어, shouldSelectCell 가 true 를 돌려주었을 경우에, 노드의 편집을 개시합니다. |
void |
startEditingAtPath (JTree tree,
TreePath path)
path 의 마지막 항목을 선택해, 그 항목의 편집을 시도합니다. |
boolean |
stopEditing (JTree tree)
현재의 편집 세션을 중지합니다. |
protected void |
toggleExpandState (TreePath path)
패스가 전개되지 않은 경우는 전개해, 행이 전개되고 있는 경우는 꺾어 접습니다. |
protected void |
uninstallComponents ()
렌더링 구획을 언인스톨합니다. |
protected void |
uninstallDefaults ()
|
protected void |
uninstallKeyboardActions ()
|
protected void |
uninstallListeners ()
|
void |
uninstallUI (JComponent c)
installUI 시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. |
protected void |
updateCachedPreferredSize ()
getPreferredSize() 로부터 반환되는 preferredSize 인스턴스 변수를 갱신합니다. |
protected void |
updateCellEditor ()
JTree 를 편집할 수 있을지 어떨지에 응해 cellEditor 를 갱신합니다. |
protected void |
updateDepthOffset ()
각 깊이의 오프셋(offset)를 갱신합니다. |
protected void |
updateExpandedDescendants (TreePath path)
트리로부터 전개되고 있는 하위 노드를 취득해, 트리상태에 전송 하는 것으로, path 내의 모든 하위 노드의 전개 상태를 갱신합니다. |
protected void |
updateLayoutCacheExpandedNodes ()
JTree 로 전개 떠날 수 있어 모든 노드를 LayoutCache 로 전개합니다. |
protected void |
updateRenderer ()
렌더링이 변경되었을 때에 트리로부터 메세지로서 보내집니다. |
protected void |
updateSize ()
캐쉬에 포함되고 있는 사이즈를 무효와 마크 해, treeDidChange 를 사용해 트리에 메세지를 보냅니다. |
클래스 javax.swing.plaf. ComponentUI 로부터 상속된 메소드 |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , update |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
protected transient Icon collapsedIcon
protected transient Icon expandedIcon
protected int leftChildIndent
protected int rightChildIndent
protected int totalChildIndent
protected Dimension preferredMinSize
protected int lastSelectedRow
protected JTree tree
protected transient TreeCellRenderer currentCellRenderer
protected boolean createdRenderer
protected transient TreeCellEditor cellEditor
protected boolean createdCellEditor
protected boolean stopEditingInCompleteEditing
protected CellRendererPane rendererPane
protected Dimension preferredSize
protected boolean validCachedPreferredSize
protected AbstractLayoutCache treeState
protected Hashtable <TreePath ,Boolean > drawingCache
protected boolean largeModel
protected AbstractLayoutCache.NodeDimensions nodeDimensions
protected TreeModel treeModel
protected TreeSelectionModel treeSelectionModel
protected int depthOffset
protected Component editingComponent
protected TreePath editingPath
protected int editingRow
protected boolean editorHasDifferentSize
생성자 의 상세 |
---|
public BasicTreeUI()
메소드의 상세 |
---|
public static ComponentUI createUI(JComponent x)
protected Color getHashColor()
protected void setHashColor(Color color)
public void setLeftChildIndent(int newAmount)
public int getLeftChildIndent()
public void setRightChildIndent(int newAmount)
public int getRightChildIndent()
public void setExpandedIcon(Icon newG)
public Icon getExpandedIcon()
public void setCollapsedIcon(Icon newG)
public Icon getCollapsedIcon()
protected void setLargeModel(boolean largeModel)
protected boolean isLargeModel()
protected void setRowHeight(int rowHeight)
protected int getRowHeight()
protected void setCellRenderer(TreeCellRenderer tcr)
tcr
로 설정합니다. 이것에 의해,updateRenderer
가 불려 갑니다.
protected TreeCellRenderer getCellRenderer()
protected void setModel(TreeModel model)
protected TreeModel getModel()
protected void setRootVisible(boolean newValue)
protected boolean isRootVisible()
protected void setShowsRootHandles(boolean newValue)
protected boolean getShowsRootHandles()
protected void setCellEditor(TreeCellEditor editor)
protected TreeCellEditor getCellEditor()
protected void setEditable(boolean newValue)
protected boolean isEditable()
protected void setSelectionModel(TreeSelectionModel newLSM)
protected TreeSelectionModel getSelectionModel()
public Rectangle getPathBounds(JTree tree, TreePath path)
TreeUI
내의 getPathBounds
public TreePath getPathForRow(JTree tree, int row)
TreeUI
내의 getPathForRow
public int getRowForPath(JTree tree, TreePath path)
TreeUI
내의 getRowForPath
public int getRowCount(JTree tree)
TreeUI
내의 getRowCount
public TreePath getClosestPathForLocation(JTree tree, int x, int y)
TreeUI
내의 getClosestPathForLocation
public boolean isEditing(JTree tree)
TreeUI
내의 isEditing
public boolean stopEditing(JTree tree)
TreeUI
내의 stopEditing
public void cancelEditing(JTree tree)
TreeUI
내의 cancelEditing
public void startEditingAtPath(JTree tree, TreePath path)
TreeUI
내의 startEditingAtPath
public TreePath getEditingPath(JTree tree)
TreeUI
내의 getEditingPath
public void installUI(JComponent c)
ComponentUI
의 기술:ComponentUI
인스턴스가, 지정된 컴퍼넌트의 UI 위양으로서 인스톨 되고 있을 때 불려 갑니다. 이 메소드는, 이하를 포함한 Look & Feel 용의 컴퍼넌트를 완전하게 구성할 필요가 있습니다.
LayoutManager
를 인스톨 한다
PropertyChangeListener
를 컴퍼넌트에 작성 또는 인스톨 한다
ComponentUI
내의 installUI
c
- UI 위양이 인스톨 되고 있는 컴퍼넌트ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
protected void prepareForUIInstall()
tree
인스턴스 변수의 설정 후, 디폴트 및 청취자가 인스톨 되기 전에 불려 갑니다.
protected void completeUIInstall()
protected void installDefaults()
protected void installListeners()
protected void installKeyboardActions()
protected void installComponents()
protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
protected PropertyChangeListener createPropertyChangeListener()
protected MouseListener createMouseListener()
protected FocusListener createFocusListener()
protected KeyListener createKeyListener()
protected PropertyChangeListener createSelectionModelPropertyChangeListener()
protected TreeSelectionListener createTreeSelectionListener()
protected CellEditorListener createCellEditorListener()
protected ComponentListener createComponentListener()
protected TreeExpansionListener createTreeExpansionListener()
protected AbstractLayoutCache createLayoutCache()
protected CellRendererPane createCellRendererPane()
protected TreeCellEditor createDefaultCellEditor()
protected TreeCellRenderer createDefaultCellRenderer()
protected TreeModelListener createTreeModelListener()
public void uninstallUI(JComponent c)
ComponentUI
의 기술:installUI
시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. 이 메소드는, 지정된 컴퍼넌트의 UI 위양으로서의 UIComponent
인스턴스가 삭제되고 있을 때 불려 갑니다. 이 메소드는,installUI
에 의해 실행된 구성을 바탕으로 되돌릴 필요가 있습니다. 이 경우,JComponent
인스턴스를 깨끗한 상태 (여분의 청취자나, Look & Feel 고유의 프로퍼티 객체가 남지 않게)로 하도록(듯이) 충분히 주의해 주세요. 순서에는 다음의 것이 있습니다.
ComponentUI
내의 uninstallUI
c
- 이 UI 위양을 삭제하는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void prepareForUIUninstall()
protected void completeUIUninstall()
protected void uninstallDefaults()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
protected void uninstallComponents()
public int getBaseline(JComponent c, int width, int height)
ComponentUI
내의 getBaseline
c
- 요구되는 JComponent
baselinewidth
- baseline를 취득하는 폭height
- baseline을 취득하는 높이
NullPointerException
- c
가 null
의 경우
IllegalArgumentException
- 폭 또는 높이가 0 보다 작은 경우JComponent.getBaseline(int, int)
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
ComponentUI
내의 getBaselineResizeBehavior
c
- baseline의 사이즈 변경의 동작을 돌려주는 JComponent
NullPointerException
- c
가 null
의 경우JComponent.getBaseline(int, int)
public void paint(Graphics g, JComponent c)
ComponentUI
의 기술:ComponentUI.update
메소드로부터, 지정된 컴퍼넌트가 페인트 될 때 불려 갑니다. 서브 클래스는, 이 메소드를 오버라이드(override) 해, 지정된 Graphics
객체를 사용해 컴퍼넌트의 내용을 draw 할 필요가 있습니다.
ComponentUI
내의 paint
g
- 페인트 대상의 Graphics
문맥c
- 페인트 되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
clipBounds
나 insets
를 변경하는 것은 용서되지 않습니다.
주:루트가 가시가 아닌 경우,parentRow
는 -1 이 되는 일이 있습니다.
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
clipBounds
나 insets
를 변경하는 것은 용서되지 않습니다.
protected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
clipBounds
나 insets
를 변경하는 것은 용서되지 않습니다.
protected void paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
clipBounds
나 insets
를 변경하는 것은 용서되지 않습니다.
protected boolean shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
protected int getVerticalLegBuffer()
protected int getHorizontalLegBuffer()
protected void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
protected void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2)
protected void drawDashedVerticalLine(Graphics g, int x, int y1, int y2)
protected int getRowX(int row, int depth)
row
- x 위치를 돌려주는 행depth
- 행의 깊이
protected void updateLayoutCacheExpandedNodes()
protected void updateExpandedDescendants(TreePath path)
path
내의 모든 하위 노드의 전개 상태를 갱신합니다.
protected TreePath getLastChildPath(TreePath parent)
parent
의 마지막 아이 패스를 돌려줍니다.
protected void updateDepthOffset()
protected void updateCellEditor()
protected void updateRenderer()
protected void configureLayoutCache()
protected void updateSize()
treeDidChange
를 사용해 트리에 메세지를 보냅니다.
protected void updateCachedPreferredSize()
getPreferredSize()
로부터 반환되는 preferredSize
인스턴스 변수를 갱신합니다. 왼쪽에서 우측향의 경우, 사이즈는 현재의 AbstractLayoutCache 로부터 결정됩니다. 오른쪽으로부터 좌방향의 경우, 적절한 사이즈는 폭으로부터 최소의 x 위치를 당긴 값이 됩니다.
protected void pathWasExpanded(TreePath path)
protected void pathWasCollapsed(TreePath path)
protected void ensureRowsAreVisible(int beginRow, int endRow)
public void setPreferredMinSize(Dimension newSize)
public Dimension getPreferredMinSize()
public Dimension getPreferredSize(JComponent c)
ComponentUI
내의 getPreferredSize
c
- 적절한 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getPreferredSize(JComponent c, boolean checkConsistancy)
public Dimension getMinimumSize(JComponent c)
ComponentUI
내의 getMinimumSize
c
- 최소 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있다
Dimension
객체, 또는 null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
ComponentUI
내의 getMaximumSize
c
- 최대 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있다
Dimension
객체, 또는 null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void completeEditing()
getInvokesStopCellEditing
로부터 true 를 돌려주는 경우, stopCellEditing 가 현재의 에디터로 불려 갑니다. 다음에 completeEditing 가 false 또는 true 로 메세지로서 보내집니다. false 는, 중도의 편집을 모두 취소합니다.
protected void completeEditing(boolean messageStop, boolean messageCancel, boolean messageTree)
protected boolean startEditing(TreePath path, MouseEvent event)
이 메소드는, 패스가 유효하고, 가시이다고 봅니다.
protected void checkForClickInExpandControl(TreePath path, int mouseX, int mouseY)
mouseX
및 mouseY
가 row
의 전개 또는 때보고의 영역에 있는 경우, 이 메소드는 행의 전개 상태를 바꿉니다.
protected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY)
mouseX
및 mouseY
가 노드의 전개 또는 꺾어 접어에 사용되는 행의 영역에 있어,row
에 있는 노드가 잎을 나타내지 않는 경우에 true 를 돌려줍니다.
protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY)
protected void toggleExpandState(TreePath path)
protected boolean isToggleSelectionEvent(MouseEvent event)
protected boolean isMultiSelectEvent(MouseEvent event)
protected boolean isToggleEvent(MouseEvent event)
protected void selectPathForEvent(TreePath path, MouseEvent event)
protected boolean isLeaf(int row)
row
의 노드가 잎의 경우는 true
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.