public class ColorBar extends TextComponentBase
TextComponentBase.FontStyle, TextComponentBase.HorizontalAlignment, TextComponentBase.VerticalAlignment
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static int |
defaultBarDivisions |
static ColorMapBase |
defaultColorMap |
static TextComponentBase.HorizontalAlignment |
defaultHAlignment |
static boolean |
defaultHorizontal |
static DoubleInterval |
defaultInterval |
static Rectangle |
defaultLoc |
static Rectangle |
defaultNormLoc |
static java.lang.String |
defaultNumberFormat |
static Vector2d |
defaultTextOffset |
static double |
defaultTextSize |
static Vector2d |
defaultTickFraction |
static TextComponentBase.VerticalAlignment |
defaultVAlignment |
static PropertyList |
myProps |
defaultFontName, defaultFontSize
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSLUCENT, TWO_DIMENSIONAL
Constructor and Description |
---|
ColorBar() |
ColorBar(ColorMapBase cmap) |
Modifier and Type | Method and Description |
---|---|
static RenderProps |
createDefaultRenderProps() |
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
void |
getColor(double value,
double[] rgb) |
ColorMapBase |
getColorMap() |
PropertyMode |
getColorMapMode() |
VectorNd |
getLabelPositions() |
java.util.ArrayList<java.lang.String> |
getLabels() |
java.lang.String |
getLabelSet() |
Rectangle |
getLocationOverride() |
Rectangle |
getNormalizedLocation() |
NumberFormat |
getNumberFormat() |
java.lang.String |
getNumberFormatString() |
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
Vector2d |
getTextOffset() |
Vector2d |
getTickFraction() |
DoubleInterval |
getValueRange() |
boolean |
isHorizontal() |
void |
parseLabelSet(java.lang.String str) |
int |
parseNext(char[] carray,
int idx,
java.util.ArrayList<java.lang.String> parsed) |
void |
populateLabels(double minVal,
double maxVal,
int nSections) |
void |
populateLabels(double minVal,
double maxVal,
int nSections,
NumberFormat fmt) |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
setColorMap(ColorMapBase colorMap) |
void |
setColorMapMode(PropertyMode mode) |
void |
setHorizontal(boolean set) |
void |
setHorizontalAlignment(TextComponentBase.HorizontalAlignment hAlignment)
Sets the horizontal alignment, one of
LEFT, CENTRE, RIGHT |
void |
setLabel(int idx,
java.lang.String text) |
void |
setLabelPositions(VectorNd pos) |
void |
setLabels(java.util.ArrayList<java.lang.String> text) |
void |
setLabels(VectorNd tickLocs,
java.util.ArrayList<java.lang.String> labels) |
void |
setLocationOverride(double x,
double y,
double width,
double height) |
void |
setLocationOverride(Rectangle pos) |
void |
setNormalizedLocation(double x,
double y,
double width,
double height) |
void |
setNormalizedLocation(Rectangle pos) |
void |
setNumberFormat(NumberFormat fmt) |
void |
setNumberFormatString(java.lang.String fmt) |
void |
setTextOffset(Vector2d offset) |
void |
setTickFraction(Vector2d frac) |
void |
setValueRange(double min,
double max) |
void |
setValueRange(DoubleInterval range) |
void |
setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
If bar is horizontal, then places text at supplied alignment location.
|
void |
updateLabels() |
void |
updateLabels(double minVal,
double maxVal) |
void |
updateLabels(double minVal,
double maxVal,
NumberFormat fmt) |
void |
updateLabels(NumberFormat fmt) |
dispose, getFontFamily, getFontSize, getFontStyle, getHorizontalAlignment, getTextSize, getVerticalAlignment, isSelectable, numSelectionQueriesNeeded, setFont, setFontFamily, setFontSize, setFontStyle, setTextColor, setTextRenderer, setTextSize
copy, getRenderProps, getSelection, prerender, setRenderProps, 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, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public static Rectangle defaultLoc
public static Rectangle defaultNormLoc
public static Vector2d defaultTickFraction
public static double defaultTextSize
public static Vector2d defaultTextOffset
public static java.lang.String defaultNumberFormat
public static TextComponentBase.VerticalAlignment defaultVAlignment
public static TextComponentBase.HorizontalAlignment defaultHAlignment
public static DoubleInterval defaultInterval
public static ColorMapBase defaultColorMap
public static int defaultBarDivisions
public static boolean defaultHorizontal
public static PropertyList myProps
public ColorBar()
public ColorBar(ColorMapBase cmap)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class TextComponentBase
public static RenderProps createDefaultRenderProps()
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class TextComponentBase
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
render
in class RenderableComponentBase
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public int getRenderHints()
GLRenderable
TRANSLUCENT
.getRenderHints
in interface GLRenderable
getRenderHints
in class RenderableComponentBase
public Rectangle getNormalizedLocation()
public void setNormalizedLocation(Rectangle pos)
public Rectangle getLocationOverride()
public void setLocationOverride(Rectangle pos)
public void setLocationOverride(double x, double y, double width, double height)
public void setNormalizedLocation(double x, double y, double width, double height)
public boolean isHorizontal()
public void setHorizontal(boolean set)
public ColorMapBase getColorMap()
public void setColorMap(ColorMapBase colorMap)
public PropertyMode getColorMapMode()
public void setColorMapMode(PropertyMode mode)
public VectorNd getLabelPositions()
public void setLabelPositions(VectorNd pos)
public void setLabels(java.util.ArrayList<java.lang.String> text)
public java.util.ArrayList<java.lang.String> getLabels()
public void setLabel(int idx, java.lang.String text)
public void parseLabelSet(java.lang.String str)
public int parseNext(char[] carray, int idx, java.util.ArrayList<java.lang.String> parsed)
public java.lang.String getLabelSet()
public void setTickFraction(Vector2d frac)
public Vector2d getTickFraction()
public Vector2d getTextOffset()
public void setTextOffset(Vector2d offset)
public void setLabels(VectorNd tickLocs, java.util.ArrayList<java.lang.String> labels)
public void populateLabels(double minVal, double maxVal, int nSections, NumberFormat fmt)
public void updateLabels(NumberFormat fmt)
public void updateLabels()
public void getColor(double value, double[] rgb)
public void updateLabels(double minVal, double maxVal, NumberFormat fmt)
public void updateLabels(double minVal, double maxVal)
public void populateLabels(double minVal, double maxVal, int nSections)
public void setValueRange(DoubleInterval range)
public void setValueRange(double min, double max)
public DoubleInterval getValueRange()
public void setHorizontalAlignment(TextComponentBase.HorizontalAlignment hAlignment)
TextComponentBase
LEFT, CENTRE, RIGHT
setHorizontalAlignment
in class TextComponentBase
public void setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
setVerticalAlignment
in class TextComponentBase
public void setNumberFormatString(java.lang.String fmt)
public java.lang.String getNumberFormatString()
public void setNumberFormat(NumberFormat fmt)
public NumberFormat getNumberFormat()