javax.swing.plaf.ScrollBarUI源码实例Demo

类javax.swing.plaf.ScrollBarUI源码实例Demo

下面列出了javax.swing.plaf.ScrollBarUI 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: consulo   文件: JBScrollPane.java
public static boolean canBePreprocessed(MouseEvent e, JScrollBar bar) {
  if (e.getID() == MouseEvent.MOUSE_MOVED || e.getID() == MouseEvent.MOUSE_PRESSED) {
    ScrollBarUI ui = bar.getUI();
    if (ui instanceof BasicScrollBarUI) {
      BasicScrollBarUI bui = (BasicScrollBarUI)ui;
      try {
        Rectangle rect = (Rectangle)ReflectionUtil.getDeclaredMethod(BasicScrollBarUI.class, "getThumbBounds", ArrayUtil.EMPTY_CLASS_ARRAY).invoke(bui);
        Point point = SwingUtilities.convertPoint(e.getComponent(), e.getX(), e.getY(), bar);
        return !rect.contains(point);
      }
      catch (Exception e1) {
        return true;
      }
    }
  }
  return true;
}
 
源代码2 项目: openjdk-jdk9   文件: JScrollBarOperator.java
/**
 * Maps {@code JScrollBar.getUI()} through queue
 */
public ScrollBarUI getUI() {
    return (runMapping(new MapAction<ScrollBarUI>("getUI") {
        @Override
        public ScrollBarUI map() {
            return ((JScrollBar) getSource()).getUI();
        }
    }));
}
 
源代码3 项目: ghidra   文件: SideKickVerticalScrollbar.java
@Override
public ScrollBarUI getUI() {
	return delegate.getUI();
}
 
源代码4 项目: ghidra   文件: SideKickVerticalScrollbar.java
@Override
public void setUI(ScrollBarUI ui) {
	delegate.setUI(ui);
}
 
源代码5 项目: consulo   文件: DesktopEditorImpl.java
@Override
public void setUI(ScrollBarUI ui) {
  super.setUI(ui);
  setOpaque(false);
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法