本文整理汇总了Java中org.eclipse.swt.custom.ScrolledComposite.getParent方法的典型用法代码示例。如果您正苦于以下问题:Java ScrolledComposite.getParent方法的具体用法?Java ScrolledComposite.getParent怎么用?Java ScrolledComposite.getParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.ScrolledComposite
的用法示例。
在下文中一共展示了ScrolledComposite.getParent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reattachWidget
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void reattachWidget(Position pos) {
SashForm sf = positionSashFormMap.get(pos);
ScrolledComposite w = widgets.get(pos);
if (w.getParent() == sf) // already attached to SashForm -> do nothing!
return;
w.setParent(sf); // set parent to SashForm again
// move to left or right side of SashForm depending on flag in position:
if (pos.isLeftSideOfSashForm)
w.moveAbove(null);
else
w.moveBelow(null);
sf.layout(true);
}
示例2: installMouseWheelScrollRecursively
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public static void installMouseWheelScrollRecursively( ScrolledComposite scrollable) {
MouseWheelListener scroller = createMouseWheelScroller(scrollable);
if (scrollable.getParent() != null)
{
scrollable.getParent().addMouseWheelListener(scroller);
}
installMouseWheelScrollRecursively(scroller, scrollable);
}
示例3: installMouseWheelScrollRecursively
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
* make wheel scrolling available by installing a wheel listener on this scrollable's parent and hierarchy of
* children
*
* @param scrollable
* the scrolledComposite to wheel-scroll
*/
private void installMouseWheelScrollRecursively(final ScrolledComposite scrollable) {
MouseWheelListener scroller = createMouseWheelScroller(scrollable);
if (scrollable.getParent() != null){
scrollable.getParent().addMouseWheelListener(scroller);
}
installMouseWheelScrollRecursively(scroller, scrollable);
}