public class TScrollableWindow extends TWindow implements Scrollable
Modifier and Type | Field and Description |
---|---|
protected THScroller |
hScroller
The horizontal scrollbar.
|
protected TVScroller |
vScroller
The vertical scrollbar.
|
ABSOLUTEXY, CENTERED, HIDEONCLOSE, inKeyboardResize, inWindowMove, inWindowResize, MODAL, mouse, NOCLOSEBOX, NOZOOMBOX, OVERRIDEMENU, RESIZABLE, statusBar
Constructor and Description |
---|
TScrollableWindow(TApplication application,
java.lang.String title,
int width,
int height)
Public constructor.
|
TScrollableWindow(TApplication application,
java.lang.String title,
int width,
int height,
int flags)
Public constructor.
|
TScrollableWindow(TApplication application,
java.lang.String title,
int x,
int y,
int width,
int height)
Public constructor.
|
TScrollableWindow(TApplication application,
java.lang.String title,
int x,
int y,
int width,
int height,
int flags)
Public 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 |
maximize()
Maximize window.
|
protected boolean |
mouseOnHorizontalScroller(TMouseEvent mouse)
Check if a mouse press/release/motion event coordinate is over the
horizontal scrollbar.
|
protected boolean |
mouseOnVerticalScroller(TMouseEvent mouse)
Check if a mouse press/release/motion event coordinate is over the
vertical scrollbar.
|
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 |
restore()
Restore (unmaximize) window.
|
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, addShortcutKeypress, center, clearShortcutKeypresses, close, draw, getApplication, getBackground, getBorder, getBorderControls, getScreen, getStatusBar, getTitle, getZ, hasCloseBox, hasHiddenMouse, hasOverriddenMenu, hasZoomBox, hide, inMovements, isHidden, isModal, isShortcutKeypress, isShown, mouseOnClose, mouseOnMaximize, mouseOnResize, newStatusBar, onClose, onCommand, onFocus, onHide, onKeypress, onMenu, onMouseDown, onMouseMotion, onMouseUp, onPreClose, onShow, onUnfocus, removeShortcutKeypress, setHiddenMouse, setMaximumWindowHeight, setMaximumWindowWidth, setMinimumWindowHeight, setMinimumWindowWidth, setTitle, setZ, show, stopMovements, toString
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, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onIdle, onMouseDoubleClick, 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, vLineXY
protected THScroller hScroller
protected TVScroller vScroller
public TScrollableWindow(TApplication application, java.lang.String title, int width, int height)
application
- TApplication that manages this windowtitle
- window title, will be centered along the top borderwidth
- width of windowheight
- height of windowpublic TScrollableWindow(TApplication application, java.lang.String title, int width, int height, int flags)
application
- TApplication that manages this windowtitle
- window title, will be centered along the top borderwidth
- width of windowheight
- height of windowflags
- bitmask of RESIZABLE, CENTERED, or MODALpublic TScrollableWindow(TApplication application, java.lang.String title, int x, int y, int width, int height)
application
- TApplication that manages this windowtitle
- window title, will be centered along the top borderx
- column relative to parenty
- row relative to parentwidth
- width of windowheight
- height of windowpublic TScrollableWindow(TApplication application, java.lang.String title, int x, int y, int width, int height, int flags)
application
- TApplication that manages this windowtitle
- window title, will be centered along the top borderx
- column relative to parenty
- row relative to parentwidth
- width of windowheight
- height of windowflags
- mask of RESIZABLE, CENTERED, or MODALpublic 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
protected final boolean mouseOnVerticalScroller(TMouseEvent mouse)
mouse
- a mouse-based eventprotected final boolean mouseOnHorizontalScroller(TMouseEvent mouse)
mouse
- a mouse-based eventCopyright © 2019 Kevin Lamonte. Licensed MIT.