Add methods for reading and manipulating horizontal scollbars in text editor.

Deprecate old methods to prefer methods with Vertical/Horizontal in their names.
This commit is contained in:
Jonathan Feinberg
2014-05-04 12:38:29 -04:00
parent e3ccd69ce6
commit 035cb6e7a4
@@ -192,20 +192,50 @@ public class JEditTextArea extends JComponent
/**
* Get current position of the vertical scroll bar. [fry]
* @deprecated Use {@link #getVerticalScrollPosition()}.
*/
public int getScrollPosition() {
return vertical.getValue();
return getVerticalScrollPosition();
}
/**
* Set position of the vertical scroll bar. [fry]
* @deprecated Use {@link #setVerticalScrollPosition(int)}.
*/
public void setScrollPosition(int what) {
vertical.setValue(what);
setVerticalScrollPosition(what);
}
/**
* Get current position of the vertical scroll bar.
*/
public int getVerticalScrollPosition() {
return vertical.getValue();
}
/**
* Set position of the vertical scroll bar.
*/
public void setVerticalScrollPosition(int what) {
vertical.setValue(what);
}
/**
* Get current position of the horizontal scroll bar.
*/
public int getHorizontalScrollPosition() {
return horizontal.getValue();
}
/**
* Set position of the horizontal scroll bar.
*/
public void setHorizontalScrollPosition(int what) {
horizontal.setValue(what);
}
/**
* Returns the object responsible for painting this text area.
*/