public class HudPrintStream extends TextComponentBase
TextComponentBase.HorizontalAlignment, TextComponentBase.VerticalAlignmentModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
static int |
defaultBufferSize |
static java.lang.String |
defaultFontName |
static double |
defaultLineSpacing |
static int |
defaultNumDisplayLines |
static PropertyList |
myProps |
defaultFont, defaultFontSize, defaultHAlignment, defaultTextSize, defaultVAlignmentenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
HudPrintStream()
Basic component, defaulting to 5 lines of 12pt monospaced font in bottom
left corner
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the buffer
|
void |
cls()
Appends blank lines to clear the screen
|
void |
fullscreen()
Makes the HUD full-screen according to the viewer's current height
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
int |
getBufferSize()
Returns maximum size of line buffer
|
double |
getLineSpacing()
Gets the line spacing
|
int |
getNumDisplayLines()
Maximum number of lines to display
|
Point2d |
getPosition()
Gets current 2D normalized coordinates, [0 1]x[0 1]
|
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
int |
getScrollOffset()
Gets the current scroll offset
|
boolean |
isFullscreen() |
void |
locateBottomCentre()
Moves the HUD to the bottom-centre
|
void |
locateBottomLeft()
Moves the HUD to the bottom-left corner
|
void |
locateBottomRight()
Moves the HUD to the bottom-right
|
void |
locateTopCentre()
Moves the HUD to the top-centre
|
void |
locateTopLeft()
Moves the HUD to the top-left corner
|
void |
locateTopRight()
Moves the HUD to the top-right
|
void |
print(java.lang.String str)
Standard print functionality
|
void |
printf(java.lang.String fmt,
java.lang.Object... args)
Standard printf functionality
|
void |
println(java.lang.String str)
Standard println functionality
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer. |
void |
scrollDown()
Scroll down by one line
|
void |
scrollUp()
Scroll up by one line
|
void |
setBufferSize(int buffSize)
Sets maximum number of lines to store
|
void |
setFullscreen(boolean enable) |
void |
setLineSpacing(double sp)
Sets the line spacing, 1 for single-space
|
void |
setNumDisplayLines(int max)
Sets maximum number of lines to display
|
void |
setPosition(Point2d pos)
Sets the 2D normalized coordinates, [0 1]x[0 1]
|
void |
setScrollOffset(int offset)
Set number of lines to scroll up 0 <= offset <= # buffered lines - lines
on screen
|
void |
setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
Sets the vertical alignment, one of
TOP, CENTRE, BOTTOM |
void |
toggleFullscreen() |
createRenderProps, getFont, getHorizontalAlignment, getTextSize, getVerticalAlignment, isSelectable, numSelectionQueriesNeeded, setFont, setHorizontalAlignment, setTextColor, setTextSizecopy, defaultRenderPropsAreNull, getRenderProps, getSelection, isVisible, prerender, setRenderProps, setVisible, updateBounds, updateRenderPropscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenpostscanisWritable, writepublic static java.lang.String defaultFontName
public static int defaultNumDisplayLines
public static double defaultLineSpacing
public static int defaultBufferSize
public static PropertyList myProps
public HudPrintStream()
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class TextComponentBasepublic void render(Renderer renderer, int flags)
IsRenderableRenderer.render in interface IsRenderablerender in class RenderableComponentBaserenderer - provides the functionality used to perform the rendering.flags - flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT and
Renderer.SORT_FACES.public void cls()
public void clear()
public void printf(java.lang.String fmt,
java.lang.Object... args)
public void print(java.lang.String str)
public void println(java.lang.String str)
public int getNumDisplayLines()
public void setNumDisplayLines(int max)
public void setBufferSize(int buffSize)
public int getBufferSize()
public void setLineSpacing(double sp)
public double getLineSpacing()
public Point2d getPosition()
public void setPosition(Point2d pos)
public int getRenderHints()
IsRenderableTRANSPARENT and
TWO_DIMENSIONAL.getRenderHints in interface IsRenderablegetRenderHints in class RenderableComponentBasepublic void locateTopLeft()
public void locateTopCentre()
public void locateTopRight()
public void locateBottomLeft()
public void locateBottomCentre()
public void locateBottomRight()
public void fullscreen()
public void toggleFullscreen()
public boolean isFullscreen()
public void setFullscreen(boolean enable)
public void setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
TextComponentBaseTOP, CENTRE, BOTTOMsetVerticalAlignment in class TextComponentBasepublic void setScrollOffset(int offset)
public int getScrollOffset()
public void scrollUp()
public void scrollDown()