Class PoHistogram
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
PoMultipleHistogram
,PoSingleHistogram
public class PoHistogram extends PoGraphMaster
Abstract class for histogram representations. This class handles the start, the end, the values of the bars, the names of the bars and the bars spacing of a histogram.All histogram texts depend on the current miscellaneous text attributes which define the font name, line length and so on. If the method setMiscTextAttr(textAttr) is called, the current miscellaneous text attributes are defined by "textAttr". Otherwise the current miscellaneous text attributes are specified in the current inherited state (cf property node
PoMiscTextAttr
).All histogram numerical values depend on the current numerical display format. If the method setFormat(format) is called, the current numerical display format is "format". Otherwise the current numerical display format is specified in the current inherited state (cf property node
PoNumericDisplayFormat
).If coloring = DATA_MAPPING, colors of histogram bars depend on the current data mapping. If the method setDataMapping(dataMapping) is called, the current data mapping is "dataMapping". Otherwise the current data mapping is specified in the current inherited state (cf property node
PoDataMapping
and its derived classes). If there is no current data-mapping (i.esetDataMapping()
not called and noPoDataMapping
node traversed before in the scene graph), all bars get the same color which is the inherited color.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PoHistogram.BarSpaceTypes
Type of spacing between bars.static class
PoHistogram.Colorings
Type of coloration of the bars.static class
PoHistogram.Positions
Type of positions relative to a histogram bar.static class
PoHistogram.TextPaths
Type of text path.static class
PoHistogram.Types
Type of orientation of the histogram's bars.static class
PoHistogram.Visibilities
Type of visibility.-
Nested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoBase
PoBase.NodeWriteFormats, PoBase.TextTypes, PoBase.UpdateMethodTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFEnum<PoHistogram.BarSpaceTypes>
barSpaceType
Type of bar spacing.SoSFFloat
barSpaceValue
Spacing value.SoMFColor
color
Color list for the histogram bars.SoSFEnum<PoHistogram.Colorings>
coloring
Specifies how the histogram bars are colored.SoSFFloat
end
Define the end point of the histogram.SoSFString
nameFontName
Font name of bars names.SoSFFloat
nameFontSize
Font size of bars names.SoSFEnum<PoHistogram.TextPaths>
namePath
Bars names path.SoSFEnum<PoHistogram.Positions>
namePosition
Bars names position in relation to histograms bars.SoSFEnum<PoHistogram.Visibilities>
nameVisibility
Bars names visibility.SoSFVec2f
start
Define the start point of the histogram.SoSFEnum<PoHistogram.Types>
type
Defines if the histogram is an X histogram (bars are perpendicular to the X- axis) or a Y histogram (bars are perpendicular to the Y-axis).SoSFString
valueAddString
String to be concatenated.SoSFBool
valueAddStringVisibility
Visibility of the string concatenated to the values.SoSFString
valueFontName
Font name of values.SoSFFloat
valueFontSize
Font size of values.SoSFEnum<PoHistogram.TextPaths>
valuePath
Values path.SoSFEnum<PoHistogram.Positions>
valuePosition
Values position in relation to histogram bars.SoSFEnum<PoHistogram.Visibilities>
valueVisibility
Values visibility.-
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SoNodekitCatalog
getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.PbDataMapping
getDataMapping()
Gets a reference to aPbDataMapping
object to the association color-value for coloring the bars.PbNumericDisplayFormat
getFormat()
Gets a reference to aPbNumericDisplayFormat
object for the numerical display format of values of the histograms.PbMiscTextAttr
getMiscTextAttr()
Gets a reference to aPbMiscTextAttr
for miscellaneous text attributes.void
setDataMapping(PbDataMapping dataMapping)
Sets a reference to aPbDataMapping
object to the association color-value for coloring the bars.void
setFormat(PbNumericDisplayFormat format)
Sets a reference to aPbNumericDisplayFormat
object for the numerical display format of values of the histograms.void
setMiscTextAttr(PbMiscTextAttr textAttr)
Sets a reference to aPbMiscTextAttr
for miscellaneous text attributes.-
Methods inherited from class com.openinventor.meshviz.graph.PoBase
addPostRebuildCallback, addPreRebuildCallback, getDomain, getNodeWriteFormat, getTextType, getUpdateMethod, isBuilt, isModified, isVRML2Mode, rebuild, setDomain, setNodeWriteFormat, setTextType, setUpdateMethod, setVRML2Mode, touchKit
-
Methods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
start
public final SoSFVec2f start
Define the start point of the histogram.
-
end
public final SoSFFloat end
Define the end point of the histogram.
-
type
public final SoSFEnum<PoHistogram.Types> type
Defines if the histogram is an X histogram (bars are perpendicular to the X- axis) or a Y histogram (bars are perpendicular to the Y-axis).
-
color
public final SoMFColor color
Color list for the histogram bars. This field is used only if coloring = COLOR_LIST. If the number of colors is less than the number of bars, all the bars get the same color which is the inherited color.
-
coloring
public final SoSFEnum<PoHistogram.Colorings> coloring
Specifies how the histogram bars are colored. if coloring = COLOR_LIST, the bars are colored using the color list field color, otherwise the bars are colored according to their values (see the current data mapping for the association color-value at the header description).
-
valueVisibility
public final SoSFEnum<PoHistogram.Visibilities> valueVisibility
Values visibility.
-
valuePosition
public final SoSFEnum<PoHistogram.Positions> valuePosition
Values position in relation to histogram bars.
-
valuePath
public final SoSFEnum<PoHistogram.TextPaths> valuePath
Values path. .
-
valueFontSize
public final SoSFFloat valueFontSize
Font size of values. if this value is less or equal to 0, the font size is fixed at 0.04. This value is a percentage of the current domain (cfPoBase
description).
-
valueFontName
public final SoSFString valueFontName
Font name of values. If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.
-
valueAddStringVisibility
public final SoSFBool valueAddStringVisibility
Visibility of the string concatenated to the values.
-
valueAddString
public final SoSFString valueAddString
String to be concatenated.
-
nameVisibility
public final SoSFEnum<PoHistogram.Visibilities> nameVisibility
Bars names visibility.
-
namePosition
public final SoSFEnum<PoHistogram.Positions> namePosition
Bars names position in relation to histograms bars.
-
namePath
public final SoSFEnum<PoHistogram.TextPaths> namePath
Bars names path. .
-
nameFontSize
public final SoSFFloat nameFontSize
Font size of bars names. if this value is less or equal to 0, the font size is fixed at 0.04. This value is a percentage of the current domain (cfPoBase
description).
-
nameFontName
public final SoSFString nameFontName
Font name of bars names. If the font is equal to its default value, the font used is the font of the current miscellaneous text attributes.
-
barSpaceType
public final SoSFEnum<PoHistogram.BarSpaceTypes> barSpaceType
Type of bar spacing. The spacing between bars modifies the thickness of the histogram bars.
-
barSpaceValue
public final SoSFFloat barSpaceValue
Spacing value. If barSpaceType = REL_SPACE, real_spacing = barSpaceValue * width_bar, where width_bar is the distance between the histogram origin and the end point divided by the number of main bars. If barSpaceType = FIXED_SPACE, the real spacing is equal to barSpaceValue.
-
-
Method Detail
-
getFormat
public PbNumericDisplayFormat getFormat()
Gets a reference to aPbNumericDisplayFormat
object for the numerical display format of values of the histograms.
-
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.
-
getDataMapping
public PbDataMapping getDataMapping()
Gets a reference to aPbDataMapping
object to the association color-value for coloring the bars.
-
setFormat
public void setFormat(PbNumericDisplayFormat format)
Sets a reference to aPbNumericDisplayFormat
object for the numerical display format of values of the histograms. If this method is not called (or called passing NULL as argument), this is the numerical display format defined in the current inherited state (defined with the property nodePoNumericDisplayFormat
) which is used.
-
setDataMapping
public void setDataMapping(PbDataMapping dataMapping)
Sets a reference to aPbDataMapping
object to the association color-value for coloring the bars. If this method is not called (or called passing NULL as argument), this is the data mapping defined in the current inherited state (defined with the property nodePoDataMapping
and its derived classes) which is used. This method is ignored if coloring = COLOR_LIST.
-
setMiscTextAttr
public void setMiscTextAttr(PbMiscTextAttr textAttr)
Sets a reference to aPbMiscTextAttr
for miscellaneous text attributes. If this method is not called (or called passing NULL as argument), this is the miscellaneous text attributes defined in the current inherited state (defined with the property nodePoMiscTextAttr
) which are used.
-
getMiscTextAttr
public PbMiscTextAttr getMiscTextAttr()
Gets a reference to aPbMiscTextAttr
for miscellaneous text attributes.
-
-