Package jexer
Class THScroller
- java.lang.Object
-
- jexer.TWidget
-
- jexer.THScroller
-
-
Constructor Summary
Constructors Constructor Description THScroller(TWidget parent, int x, int y, int width)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbigDecrement()Perform a big step change left.voidbigIncrement()Perform a big step change right.voiddecrement()Perform a small step change left.voiddraw()Draw a horizontal scroll bar.intgetBigChange()Set the increment for clicking in the bar between the box and an arrow.intgetLeftValue()Get the value that corresponds to being on the left edge of the scroll bar.intgetRightValue()Get the value that corresponds to being on the right edge of the scroll bar.intgetSmallChange()Get the increment for clicking on an arrow.intgetValue()Get current value of the scroll.voidincrement()Perform a small step change right.voidonMouseDown(TMouseEvent mouse)Handle mouse button press events.voidonMouseMotion(TMouseEvent mouse)Handle mouse movement events.voidonMouseUp(TMouseEvent mouse)Handle mouse button releases.voidsetBigChange(int bigChange)Set the increment for clicking in the bar between the box and an arrow.voidsetLeftValue(int leftValue)Set the value that corresponds to being on the left edge of the scroll bar.voidsetRightValue(int rightValue)Set the value that corresponds to being on the right edge of the scroll bar.voidsetSmallChange(int smallChange)Set the increment for clicking on an arrow.voidsetValue(int value)Set current value of the scroll.voidtoLeft()Go to the left edge of the scroller.voidtoRight()Go to the right edge of the scroller.-
Methods inherited from class jexer.TWidget
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addField, addImage, addImage, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, drawChildren, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getClipboard, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getCustomMousePointer, getHeight, getLayoutManager, getLocale, getMouseStyle, getParent, getScreen, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, hLineXY, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, isPixelMouse, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onKeypress, onMenu, onMouseDoubleClick, onResize, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setCustomMousePointer, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setHeight, setLayoutManager, setLocale, setMouseStyle, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY, vLineXY
-
-
-
-
Constructor Detail
-
THScroller
public THScroller(TWidget parent, int x, int y, int width)
Public constructor.- Parameters:
parent- parent widgetx- column relative to parenty- row relative to parentwidth- height of scroll bar
-
-
Method Detail
-
onMouseUp
public void onMouseUp(TMouseEvent mouse)
Handle mouse button releases.
-
onMouseMotion
public void onMouseMotion(TMouseEvent mouse)
Handle mouse movement events.- Overrides:
onMouseMotionin classTWidget- Parameters:
mouse- mouse motion event
-
onMouseDown
public void onMouseDown(TMouseEvent mouse)
Handle mouse button press events.- Overrides:
onMouseDownin classTWidget- Parameters:
mouse- mouse button press event
-
getLeftValue
public int getLeftValue()
Get the value that corresponds to being on the left edge of the scroll bar.- Returns:
- the scroll value
-
setLeftValue
public void setLeftValue(int leftValue)
Set the value that corresponds to being on the left edge of the scroll bar.- Parameters:
leftValue- the new scroll value
-
getRightValue
public int getRightValue()
Get the value that corresponds to being on the right edge of the scroll bar.- Returns:
- the scroll value
-
setRightValue
public void setRightValue(int rightValue)
Set the value that corresponds to being on the right edge of the scroll bar.- Parameters:
rightValue- the new scroll value
-
getValue
public int getValue()
Get current value of the scroll.- Returns:
- the scroll value
-
setValue
public void setValue(int value)
Set current value of the scroll.- Parameters:
value- the new scroll value
-
getSmallChange
public int getSmallChange()
Get the increment for clicking on an arrow.- Returns:
- the increment value
-
setSmallChange
public void setSmallChange(int smallChange)
Set the increment for clicking on an arrow.- Parameters:
smallChange- the new increment value
-
getBigChange
public int getBigChange()
Set the increment for clicking in the bar between the box and an arrow.- Returns:
- the increment value
-
setBigChange
public void setBigChange(int bigChange)
Set the increment for clicking in the bar between the box and an arrow.- Parameters:
bigChange- the new increment value
-
decrement
public void decrement()
Perform a small step change left.
-
increment
public void increment()
Perform a small step change right.
-
bigDecrement
public void bigDecrement()
Perform a big step change left.
-
bigIncrement
public void bigIncrement()
Perform a big step change right.
-
toLeft
public void toLeft()
Go to the left edge of the scroller.
-
toRight
public void toRight()
Go to the right edge of the scroller.
-
-