Package jexer
Class TVScroller
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TVScroller
-
-
Constructor Summary
Constructors Constructor Description TVScroller(TWidget parent, int x, int y, int height)
Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bigDecrement()
Perform a big step change up.void
bigIncrement()
Perform a big step change down.void
decrement()
Perform a small step change up.void
draw()
Draw a vertical scroll bar.int
getBigChange()
Set the increment for clicking in the bar between the box and an arrow.int
getBottomValue()
Get the value that corresponds to being on the bottom edge of the scroll bar.int
getSmallChange()
Get the increment for clicking on an arrow.int
getTopValue()
Get the value that corresponds to being on the top edge of the scroll bar.int
getValue()
Get current value of the scroll.void
increment()
Perform a small step change down.void
onMouseDown(TMouseEvent mouse)
Handle mouse 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
setBottomValue(int bottomValue)
Set the value that corresponds to being on the bottom edge of the scroll bar.void
setSmallChange(int smallChange)
Set the increment for clicking on an arrow.void
setTopValue(int topValue)
Set the value that corresponds to being on the top edge of the scroll bar.void
setValue(int value)
Set current value of the scroll.void
toBottom()
Go to the bottom edge of the scroller.void
toTop()
Go to the top 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
-
TVScroller
public TVScroller(TWidget parent, int x, int y, int height)
Public constructor.- Parameters:
parent
- parent widgetx
- column relative to parenty
- row relative to parentheight
- 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 press events.- Overrides:
onMouseDown
in classTWidget
- Parameters:
mouse
- mouse button press event
-
getTopValue
public int getTopValue()
Get the value that corresponds to being on the top edge of the scroll bar.- Returns:
- the scroll value
-
setTopValue
public void setTopValue(int topValue)
Set the value that corresponds to being on the top edge of the scroll bar.- Parameters:
topValue
- the new scroll value
-
getBottomValue
public int getBottomValue()
Get the value that corresponds to being on the bottom edge of the scroll bar.- Returns:
- the scroll value
-
setBottomValue
public void setBottomValue(int bottomValue)
Set the value that corresponds to being on the bottom edge of the scroll bar.- Parameters:
bottomValue
- 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 up.
-
increment
public void increment()
Perform a small step change down.
-
bigDecrement
public void bigDecrement()
Perform a big step change up.
-
bigIncrement
public void bigIncrement()
Perform a big step change down.
-
toTop
public void toTop()
Go to the top edge of the scroller.
-
toBottom
public void toBottom()
Go to the bottom edge of the scroller.
-
-