Snippet007FullSelection
Demonstrates how you can use a use inline editing in tables with multiple columns which requires to use SWT.FULL_SELECTION but hiding the selection from the user.
Demonstrates how you can use a use inline editing in tables with multiple columns which requires to use SWT.FULL_SELECTION but hiding the selection from the user.
JFace TreeViewer에서 item을 더블클릭했을 때, 열고 닫기
public class NodeDoubleClickListener implements IDoubleClickListener {
@Override
public void doubleClick(DoubleClickEvent event)
{
TreeViewer viewer = (TreeViewer) event.getViewer();
Object obj = ((IStructuredSelection) event.getSelection()).getFirstElement();
if (viewer.getExpandedState(obj))
{
viewer.collapseToLevel(obj, 1);
}
else
{//하위 전체를 열기
viewer.expandToLevel(obj, AbstractTreeViewer.ALL_LEVELS);
}
}
}