int x = (int) (WIDTH_NO_PADDING * (value > maxValue ? 1 : (double) value
/ maxValue));
location.x -= PADDING_X0 + x;
Rectangle bounds = new Rectangle(location.x, location.y, WIDTH, HEIGHT);
Monitor mouseMonitor = shell.getMonitor();
Monitor[] monitors = display.getMonitors();
for (int i = 0; i < monitors.length; i++) {
Monitor monitor = monitors[i];
if (monitor.getBounds().contains(location)) {
mouseMonitor = monitor;
break;
}
}
Rectangle monitorBounds = mouseMonitor.getBounds();