public void onMouseDown(Widget sender, int x, int y) {
   float newPercent = (float) x / (float) base.getOffsetWidth();
   int newPosition =
       Math.round(
               (target.getOffsetWidth() + target.getMaxHorizontalScrollPosition())
                   * newPercent)
           - (target.getOffsetWidth() / 2);
   Logger.getAnonymousLogger().log(Level.SPAM, "New Position: " + newPosition, null);
   target.setHorizontalScrollPosition(newPosition);
 }
        public void onMouseDown(Widget sender, int x, int y) {
          float newPercent =
              (float) (x + lower.getOffsetWidth() + bar.getOffsetWidth())
                  / (float) base.getOffsetWidth();
          int newPosition =
              Math.round(
                      (target.getOffsetWidth() + target.getMaxHorizontalScrollPosition())
                          * newPercent)
                  - (target.getOffsetWidth() / 2);

          target.setHorizontalScrollPosition(newPosition);
        }
        public void onMouseMove(Widget sender, int x, int y) {
          if (inDrag) {
            float newPercent =
                (float) ((x - start) + lower.getOffsetWidth()) / (float) base.getOffsetWidth();
            Logger.getAnonymousLogger().log(Level.SPAM, x + " " + newPercent, null);

            int newPosition =
                Math.round(
                        (target.getOffsetWidth() + target.getMaxHorizontalScrollPosition())
                            * newPercent)
                    + x;
            target.setHorizontalScrollPosition(newPosition);
          }
        }