コード例 #1
0
 private static void readScrollPosition(final Tree tree) {
   String left = WidgetLCAUtil.readPropertyValue(tree, "scrollLeft");
   String top = WidgetLCAUtil.readPropertyValue(tree, "scrollTop");
   if (left != null && top != null) {
     Object adapter = tree.getAdapter(ITreeAdapter.class);
     final ITreeAdapter treeAdapter = (ITreeAdapter) adapter;
     final int newScrollLeft = parsePosition(left);
     final int newScrollTop = parsePosition(top);
     final int oldScrollTop = treeAdapter.getScrollTop();
     treeAdapter.setScrollLeft(newScrollLeft);
     treeAdapter.setScrollTop(newScrollTop);
     if (oldScrollTop != newScrollTop) {
       ProcessActionRunner.add(
           new Runnable() {
             public void run() {
               treeAdapter.checkAllData(tree);
             }
           });
     }
   }
 }
コード例 #2
0
 private static Boolean hasVScrollBar(final Tree tree) {
   Object adapter = tree.getAdapter(ITreeAdapter.class);
   ITreeAdapter treeAdapter = (ITreeAdapter) adapter;
   return Boolean.valueOf(treeAdapter.hasVScrollBar());
 }
コード例 #3
0
 private static Integer getScrollLeft(final Tree tree) {
   Object adapter = tree.getAdapter(ITreeAdapter.class);
   ITreeAdapter treeAdapter = (ITreeAdapter) adapter;
   return new Integer(treeAdapter.getScrollLeft());
 }