public class HudPrintStream extends TextComponentBase
TextComponentBase.HorizontalAlignment, TextComponentBase.VerticalAlignment
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, defaultVAlignment
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, 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, setTextSize
copy, defaultRenderPropsAreNull, getRenderProps, getSelection, isVisible, prerender, setRenderProps, setVisible, updateBounds, updateRenderProps
checkFlag, 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, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
public 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()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class TextComponentBase
public void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class RenderableComponentBase
renderer
- 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()
IsRenderable
TRANSPARENT
and
TWO_DIMENSIONAL
.getRenderHints
in interface IsRenderable
getRenderHints
in class RenderableComponentBase
public 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)
TextComponentBase
TOP, CENTRE, BOTTOM
setVerticalAlignment
in class TextComponentBase
public void setScrollOffset(int offset)
public int getScrollOffset()
public void scrollUp()
public void scrollDown()