@Override
    protected void paintComponent(Graphics g) {
      g.setColor(ButtonlessScrollBarUI.getTrackBackground());
      g.fillRect(0, 0, getWidth(), getHeight());

      g.setColor(ButtonlessScrollBarUI.getTrackBorderColor());

      int x2 = getWidth() - 1;
      int y2 = getHeight() - 1;

      if (myPos == UPPER_LEFT_CORNER || myPos == UPPER_RIGHT_CORNER) {
        g.drawLine(0, y2, x2, y2);
      }
      if (myPos == LOWER_LEFT_CORNER || myPos == LOWER_RIGHT_CORNER) {
        g.drawLine(0, 0, x2, 0);
      }

      if (myPos == UPPER_LEFT_CORNER || myPos == LOWER_LEFT_CORNER) {
        g.drawLine(x2, 0, x2, y2);
      }

      if (myPos == UPPER_RIGHT_CORNER || myPos == LOWER_RIGHT_CORNER) {
        g.drawLine(0, 0, 0, y2);
      }
    }
 @Override
 protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) {
   int shift = isMirrored() ? -9 : 9;
   g.translate(shift, 0);
   super.paintThumb(g, c, thumbBounds);
   g.translate(-shift, 0);
 }
 public void setErrorStripeVisible(boolean val) {
   if (val) {
     myEditor.getVerticalScrollBar().setPersistentUI(new MyErrorPanel());
   } else {
     myEditor.getVerticalScrollBar().setPersistentUI(ButtonlessScrollBarUI.createNormal());
   }
 }
 @Override
 protected void uninstallListeners() {
   scrollbar.removeMouseMotionListener(this);
   scrollbar.removeMouseListener(this);
   myErrorStripeButton.removeMouseMotionListener(this);
   myErrorStripeButton.removeMouseListener(this);
   super.uninstallListeners();
 }
 @Override
 protected void installListeners() {
   super.installListeners();
   scrollbar.addMouseMotionListener(this);
   scrollbar.addMouseListener(this);
   myErrorStripeButton.addMouseMotionListener(this);
   myErrorStripeButton.addMouseListener(this);
 }
    private MyScrollingHelper() {
      myLeftScroll = new JScrollBar(JScrollBar.HORIZONTAL);
      myLeftScroll.setUI(ButtonlessScrollBarUI.createNormal());

      myLeftEditors = new ArrayList<Editor>();
      myRightEditors = new ArrayList<Editor>();

      myMaxColumnsLeft = 0;
      myMaxColumnsRight = 0;
      myLeftModels = new ArrayList<ScrollingModel>();
      myRightModels = new ArrayList<ScrollingModel>();
    }
 @Override
 public void updateUI() {
   setUI(ButtonlessScrollBarUI.createNormal());
 }