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 void
bigDecrement()
Perform a big step change left.void
bigIncrement()
Perform a big step change right.void
decrement()
Perform a small step change left.void
draw()
Draw a horizontal scroll bar.int
getBigChange()
Set the increment for clicking in the bar between the box and an arrow.int
getLeftValue()
Get the value that corresponds to being on the left edge of the scroll bar.int
getRightValue()
Get the value that corresponds to being on the right edge of the scroll bar.int
getSmallChange()
Get the increment for clicking on an arrow.int
getValue()
Get current value of the scroll.void
increment()
Perform a small step change right.void
onMouseDown(TMouseEvent mouse)
Handle mouse button press events.void
onMouseMotion(TMouseEvent mouse)
Handle mouse movement events.void
onMouseUp(TMouseEvent mouse)
Handle mouse button releases.void
setBigChange(int bigChange)
Set the increment for clicking in the bar between the box and an arrow.void
setLeftValue(int leftValue)
Set the value that corresponds to being on the left edge of the scroll bar.void
setRightValue(int rightValue)
Set the value that corresponds to being on the right edge of the scroll bar.void
setSmallChange(int smallChange)
Set the increment for clicking on an arrow.void
setValue(int value)
Set current value of the scroll.void
toLeft()
Go to the left edge of the scroller.void
toRight()
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, 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, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hasChild, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, 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, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setHeight, setLayoutManager, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, 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:
onMouseMotion
in classTWidget
- Parameters:
mouse
- mouse motion event
-
onMouseDown
public void onMouseDown(TMouseEvent mouse)
Handle mouse button press events.- Overrides:
onMouseDown
in 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.
-
-