Package jexer.help
Class THelpText
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TScrollableWidget
-
- jexer.help.THelpText
-
- All Implemented Interfaces:
java.lang.Comparable<TWidget>,Scrollable
public class THelpText extends TScrollableWidget
THelpText displays help text with clickable links in a scrollable text area. It reflows automatically on resize.
-
-
Field Summary
-
Fields inherited from class jexer.TScrollableWidget
hScroller, vScroller
-
-
Constructor Summary
Constructors Constructor Description THelpText(THelpWindow parent, Topic topic, int x, int y, int width, int height)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw()Draw the text box.voidonKeypress(TKeypressEvent keypress)Handle keystrokes.voidonMouseDown(TMouseEvent mouse)Handle mouse press events.protected voidplaceScrollbars()Place the scrollbars on the edge of this widget, and adjust bigChange to match the new size.voidreflowData()Resize text and scrollbars for a new width/height.voidsetHeight(int height)Override TWidget's height: we need to set child widget heights.voidsetTopic(Topic topic)Set the topic.voidsetTopic(Topic topic, boolean separator)Set the topic.voidsetWidth(int width)Override TWidget's width: we need to set child widget widths.-
Methods inherited from class jexer.TScrollableWidget
bigHorizontalDecrement, bigHorizontalIncrement, bigVerticalDecrement, bigVerticalIncrement, getBottomValue, getHorizontalBigChange, getHorizontalScroller, getHorizontalSmallChange, getHorizontalValue, getLeftValue, getRightValue, getTopValue, getVerticalBigChange, getVerticalScroller, getVerticalSmallChange, getVerticalValue, horizontalDecrement, horizontalIncrement, onResize, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, setVerticalValue, toBottom, toEnd, toHome, toLeft, toRight, toTop, verticalDecrement, verticalIncrement
-
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, onMenu, onMouseDoubleClick, onMouseMotion, onMouseUp, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setCustomMousePointer, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setLayoutManager, setLocale, setMouseStyle, setParent, setupForTWindow, setVisible, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY, vLineXY
-
-
-
-
Constructor Detail
-
THelpText
public THelpText(THelpWindow parent, Topic topic, int x, int y, int width, int height)
Public constructor.- Parameters:
parent- parent widgettopic- the topic to displayx- column relative to parenty- row relative to parentwidth- width of text areaheight- height of text area
-
-
Method Detail
-
setWidth
public void setWidth(int width)
Override TWidget's width: we need to set child widget widths.
-
setHeight
public void setHeight(int height)
Override TWidget's height: we need to set child widget heights. time.
-
onMouseDown
public void onMouseDown(TMouseEvent mouse)
Handle mouse press events.- Overrides:
onMouseDownin classTWidget- Parameters:
mouse- mouse button press event
-
onKeypress
public void onKeypress(TKeypressEvent keypress)
Handle keystrokes.- Overrides:
onKeypressin classTWidget- Parameters:
keypress- keystroke event
-
placeScrollbars
protected void placeScrollbars()
Place the scrollbars on the edge of this widget, and adjust bigChange to match the new size. This is called by onResize().- Overrides:
placeScrollbarsin classTScrollableWidget
-
reflowData
public void reflowData()
Resize text and scrollbars for a new width/height.- Overrides:
reflowDatain classTScrollableWidget
-
setTopic
public void setTopic(Topic topic)
Set the topic.- Parameters:
topic- new topic to display
-
setTopic
public void setTopic(Topic topic, boolean separator)
Set the topic.- Parameters:
topic- new topic to displayseparator- if true, separate paragraphs
-
-