public class TScrollableWidget extends TWidget implements Scrollable
Modifier and Type | Field and Description |
---|---|
protected THScroller |
hScroller
The horizontal scrollbar.
|
protected TVScroller |
vScroller
The vertical scrollbar.
|
Modifier | Constructor and Description |
---|---|
protected |
TScrollableWidget(TWidget parent)
Protected constructor.
|
protected |
TScrollableWidget(TWidget parent,
boolean enabled)
Protected constructor used by subclasses that are disabled by default.
|
protected |
TScrollableWidget(TWidget parent,
boolean enabled,
int x,
int y,
int width,
int height)
Protected constructor used by subclasses that are disabled by default.
|
protected |
TScrollableWidget(TWidget parent,
int x,
int y,
int width,
int height)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
bigHorizontalDecrement()
Perform a big step change left.
|
void |
bigHorizontalIncrement()
Perform a big step change right.
|
void |
bigVerticalDecrement()
Perform a big step change up.
|
void |
bigVerticalIncrement()
Perform a big step change down.
|
int |
getBottomValue()
Get the value that corresponds to being on the bottom edge of the
vertical scroll bar.
|
int |
getHorizontalBigChange()
Get the increment for clicking in the bar between the box and an
arrow on the horizontal scrollbar.
|
THScroller |
getHorizontalScroller()
Get the horizontal scrollbar, or null if this Viewport does not
support horizontal scrolling.
|
int |
getHorizontalSmallChange()
Get the increment for clicking on an arrow on the horizontal
scrollbar.
|
int |
getHorizontalValue()
Get current value of the horizontal scroll.
|
int |
getLeftValue()
Get the value that corresponds to being on the left edge of the
horizontal scroll bar.
|
int |
getRightValue()
Get the value that corresponds to being on the right edge of the
horizontal scroll bar.
|
int |
getTopValue()
Get the value that corresponds to being on the top edge of the
vertical scroll bar.
|
int |
getVerticalBigChange()
Get the increment for clicking in the bar between the box and an
arrow on the vertical scrollbar.
|
TVScroller |
getVerticalScroller()
Get the vertical scrollbar, or null if this Viewport does not support
vertical scrolling.
|
int |
getVerticalSmallChange()
Get the increment for clicking on an arrow on the vertical scrollbar.
|
int |
getVerticalValue()
Get current value of the vertical scroll.
|
void |
horizontalDecrement()
Perform a small step change left.
|
void |
horizontalIncrement()
Perform a small step change right.
|
void |
onResize(TResizeEvent event)
Handle window/screen resize events.
|
protected void |
placeScrollbars()
Place the scrollbars on the edge of this widget, and adjust bigChange
to match the new size.
|
void |
reflowData()
Recompute whatever data is displayed by this widget.
|
void |
setBottomValue(int bottomValue)
Set the value that corresponds to being on the bottom edge of the
vertical scroll bar.
|
void |
setHorizontalBigChange(int bigChange)
Set the increment for clicking in the bar between the box and an
arrow on the horizontal scrollbar.
|
void |
setHorizontalSmallChange(int smallChange)
Set the increment for clicking on an arrow on the horizontal
scrollbar.
|
void |
setHorizontalValue(int value)
Set current value of the horizontal scroll.
|
void |
setLeftValue(int leftValue)
Set the value that corresponds to being on the left edge of the
horizontal scroll bar.
|
void |
setRightValue(int rightValue)
Set the value that corresponds to being on the right edge of the
horizontal scroll bar.
|
void |
setTopValue(int topValue)
Set the value that corresponds to being on the top edge of the
vertical scroll bar.
|
void |
setVerticalBigChange(int bigChange)
Set the increment for clicking in the bar between the box and an
arrow on the vertical scrollbar.
|
void |
setVerticalSmallChange(int smallChange)
Set the increment for clicking on an arrow on the vertical scrollbar.
|
void |
setVerticalValue(int value)
Set current value of the vertical scroll.
|
void |
toBottom()
Go to the bottom edge of the vertical scroller.
|
void |
toEnd()
Go to the bottom-right edge of the horizontal and vertical scrollers.
|
void |
toHome()
Go to the top-left edge of the horizontal and vertical scrollers.
|
void |
toLeft()
Go to the left edge of the horizontal scroller.
|
void |
toRight()
Go to the right edge of the horizontal scroller.
|
void |
toTop()
Go to the top edge of the vertical scroller.
|
void |
verticalDecrement()
Perform a small step change up.
|
void |
verticalIncrement()
Perform a small step change down.
|
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, draw, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onKeypress, onMenu, onMouseDoubleClick, onMouseDown, onMouseMotion, onMouseUp, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEnabled, setHeight, setLayoutManager, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY
protected THScroller hScroller
protected TVScroller vScroller
protected TScrollableWidget(TWidget parent)
parent
- parent widgetprotected TScrollableWidget(TWidget parent, int x, int y, int width, int height)
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- width of widgetheight
- height of widgetprotected TScrollableWidget(TWidget parent, boolean enabled)
parent
- parent widgetenabled
- if true assume enabledprotected TScrollableWidget(TWidget parent, boolean enabled, int x, int y, int width, int height)
parent
- parent widgetenabled
- if true assume enabledx
- column relative to parenty
- row relative to parentwidth
- width of widgetheight
- height of widgetpublic void onResize(TResizeEvent event)
protected void placeScrollbars()
public void reflowData()
public THScroller getHorizontalScroller()
getHorizontalScroller
in interface Scrollable
public TVScroller getVerticalScroller()
getVerticalScroller
in interface Scrollable
public int getTopValue()
getTopValue
in interface Scrollable
public void setTopValue(int topValue)
setTopValue
in interface Scrollable
topValue
- the new scroll valuepublic int getBottomValue()
getBottomValue
in interface Scrollable
public void setBottomValue(int bottomValue)
setBottomValue
in interface Scrollable
bottomValue
- the new scroll valuepublic int getVerticalValue()
getVerticalValue
in interface Scrollable
public void setVerticalValue(int value)
setVerticalValue
in interface Scrollable
value
- the new scroll valuepublic int getVerticalSmallChange()
getVerticalSmallChange
in interface Scrollable
public void setVerticalSmallChange(int smallChange)
setVerticalSmallChange
in interface Scrollable
smallChange
- the new increment valuepublic int getVerticalBigChange()
getVerticalBigChange
in interface Scrollable
public void setVerticalBigChange(int bigChange)
setVerticalBigChange
in interface Scrollable
bigChange
- the new increment valuepublic void verticalDecrement()
verticalDecrement
in interface Scrollable
public void verticalIncrement()
verticalIncrement
in interface Scrollable
public void bigVerticalDecrement()
bigVerticalDecrement
in interface Scrollable
public void bigVerticalIncrement()
bigVerticalIncrement
in interface Scrollable
public void toTop()
toTop
in interface Scrollable
public void toBottom()
toBottom
in interface Scrollable
public int getLeftValue()
getLeftValue
in interface Scrollable
public void setLeftValue(int leftValue)
setLeftValue
in interface Scrollable
leftValue
- the new scroll valuepublic int getRightValue()
getRightValue
in interface Scrollable
public void setRightValue(int rightValue)
setRightValue
in interface Scrollable
rightValue
- the new scroll valuepublic int getHorizontalValue()
getHorizontalValue
in interface Scrollable
public void setHorizontalValue(int value)
setHorizontalValue
in interface Scrollable
value
- the new scroll valuepublic int getHorizontalSmallChange()
getHorizontalSmallChange
in interface Scrollable
public void setHorizontalSmallChange(int smallChange)
setHorizontalSmallChange
in interface Scrollable
smallChange
- the new increment valuepublic int getHorizontalBigChange()
getHorizontalBigChange
in interface Scrollable
public void setHorizontalBigChange(int bigChange)
setHorizontalBigChange
in interface Scrollable
bigChange
- the new increment valuepublic void horizontalDecrement()
horizontalDecrement
in interface Scrollable
public void horizontalIncrement()
horizontalIncrement
in interface Scrollable
public void bigHorizontalDecrement()
bigHorizontalDecrement
in interface Scrollable
public void bigHorizontalIncrement()
bigHorizontalIncrement
in interface Scrollable
public void toLeft()
toLeft
in interface Scrollable
public void toRight()
toRight
in interface Scrollable
public void toHome()
toHome
in interface Scrollable
public void toEnd()
toEnd
in interface Scrollable
Copyright © 2019 Kevin Lamonte. Licensed MIT.