public int getXMargin()
{
return this.marginX;
}
public ScrollBar(Panel owner, int width) : base(0, 0, width, width) { this.owner = owner; x_relative = owner.getWidth() - owner.getXMargin() + DEFAULT_X_OFFSET_FROM_RIGHT_MARGIN; y_relative = owner.getYMargin(); x_offset = owner.getX(); y_offset = owner.getY(); this.startY = owner.getYMargin(); this.maxHeight = owner.getHeight() - owner.getYMargin() * 2; this.setX(x_offset + x_relative); this.setY(y_offset + y_relative); }