Class PoItemLegend
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class PoItemLegend extends PoLegend
Class to build an items legend. This legend associates a string (this is the values of the legend) to a box or/and a line or/and a marker. All the sizes cannot be controlled by the application and depend on the dimensions of the legend. The font size F of strings is calculated as function of the rectangle delimiting the legend. The size of the markers is equal to F. The height of the boxes is equal to 1.5 * F, and the width of the lines and of the boxes is equal to 1.5 * F * boxRatio.File format/default:
titleVisibility VISIBILITY_OFF titlePosition POS_BOTTOM titlePath RIGHT_PATH titleFontSize 0 titleFontName "" titleString "" valueVisibility VISIBILITY_ON valuePosition POS_RIGHT valueFontName "" valueAddStringVisibility false valueAddString "" marginType REL_MARGIN marginLeft 0.05 marginRight 0.05 marginBottom 0.05 marginTop 0.05 incrementType VERTICAL_INCREMENT numColumns 1 boxRatio 1 start 0 0 end 1 1 item "" boxVisibility true boxColor 0 0 0 lineVisibility false lineColor 0 0 0 lineSize 0 linePattern 0xFFFF markerVisibility false markerColor 0 0 0 markerSize 0 markerString "." <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <link REL="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> <title></title> </head> <BODY> <h1></h1> <h4> <A NAME="Heading671">CATALOG PARTS</A></h4> <ul><b>PoItemLegend</b> {</ul> <ul><ul><b>Separator</b> <tt>alternateRep</tt> (from PoBase) {<br> </ul></ul> <ul><ul><ul><b>AppearanceKit</b> <tt>appearance</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Specifies the appearance of all the kit. By default lightModel.model=BASE_COLOR.</i></ul></ul></ul> <ul><ul><ul><b>MatrixTransform</b> <tt>domainTransform</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Corresponds to the domain transformation.</i></ul></ul></ul> <ul><ul><ul><ul></ul></ul></ul></ul> <ul><ul><ul><b>Separator</b> <tt>backgroundSep</tt> (from PoLegend) {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw the background of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>backgroundApp </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of the background of the legend.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>background</tt> (from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoFaceSet shape to draw the background of the legend.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>backgroundBorderSep</tt> (from PoLegend) {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw background border of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>backgroundBorderApp </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of background border of the legend.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>backgroundBorder</tt> (from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoLineSet shape to draw background border of the legend.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>boxSep</tt> (from PoLegend) {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw boxes of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>boxApp </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of boxes of the legend.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>box</tt> (from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains if boxes are colored, a list of couple (SoMaterial, SoFaceSet), otherwise a list of SoFaceSet shapes, to draw boxes of the legend.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>boxBorderSep</tt> (from PoLegend){</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw borders of boxes of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>boxBorderApp </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of borders of boxes of the legend.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>boxBorder </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of SoLineSet shapes to draw borders of boxes of the legend.</i></ul></ul></ul></ul> <ul><ul><ul>}</ul></ul></ul> <ul><ul><ul><b>Separator</b> <tt>titleSep</tt> (from PoLegend){</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw title of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>titleApp </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of title of the legend. By default drawStyle.style=LINES. font.size and font.name are set when the kit is rebuilt.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>title </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoAnnoText3 shape to draw title of the legend.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>valueTextSep</tt> (from PoLegend){</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw text of values of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>valueTextApp </tt>(from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of text of values of the legend. By default drawStyle.style=LINES. font.size and font.name are set when the kit is rebuilt.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>valueText</tt> (from PoLegend)</ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of SoAnnoText3 shapes to draw text of values of the legend.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>lineSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw lines of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>lineApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of lines of the legend.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>line</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains if lines are colored, a list of couple (SoMaterial, SoLineSet), otherwise a list of SoLineSet shapes, to draw lines of the legend.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>markerSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw markers of the legend.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>markerApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of markers of the legend. If one of the strings of markerString is not equal to ".", the font used for markers is the font set in font.name.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>marker</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of SoText2 (markerString[i] != ".") or/and SoPointSet (markerString[i] = ".") shapes to draw the markers.</i></ul></ul></ul></ul> <ul><ul><ul>}</ul></ul></ul> <ul><ul>}</ul></ul> <ul>}</ul> <ul><ul><br> </ul></ul> </body> </html>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoLegend
PoLegend.IncrementTypes, PoLegend.MarginTypes, PoLegend.Positions, PoLegend.TextPaths, PoLegend.Visibilities
-
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 SoMFColor
boxColor
List of colors for the boxes (boxColor.getNum() must be greater or equal to item.getNum(), otherwise all boxes get the same color which is the inherited color).SoSFBool
boxVisibility
Visibility of the boxes.SoSFVec2f
end
Second point of the same diagonal.SoMFString
item
List of item names.SoMFColor
lineColor
List of colors for lines.SoMFUShort
linePattern
Be careful: (lineColor or lineSize or linePattern).getNum() must be greater or equal to item.getNum() in order to take into account one of these fields, otherwise the inherited attributes will be used.SoMFFloat
lineSize
List of sizes for lines.SoSFBool
lineVisibility
Visibility of the lines.SoMFColor
markerColor
List of color for markers.SoMFFloat
markerSize
List of sizes for markers.SoMFString
markerString
The markers are defined by a list of strings.SoSFBool
markerVisibility
Visibility of the markers.SoSFVec2f
start
First point of one of the diagonals of the rectangle delimiting the legend.-
Fields inherited from class com.openinventor.meshviz.graph.PoLegend
boxRatio, incrementType, marginBottom, marginLeft, marginRight, marginTop, marginType, numColumns, titleFontName, titleFontSize, titlePath, titlePosition, titleString, titleVisibility, valueAddString, valueAddStringVisibility, valueFontName, valuePosition, valueVisibility
-
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description PoItemLegend()
Default constructor.PoItemLegend(SbVec2f _start, SbVec2f _end, java.lang.String[] _item)
Calls PoItemLegend(_start, _end, _item, (com.openinventor.inventor.SbColor[])null).PoItemLegend(SbVec2f _start, SbVec2f _end, java.lang.String[] _item, SbColor[] _boxColor)
Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SoNodekitCatalog
getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.-
Methods inherited from class com.openinventor.meshviz.graph.PoLegend
getMiscTextAttr, setMiscTextAttr
-
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
First point of one of the diagonals of the rectangle delimiting the legend.
-
end
public final SoSFVec2f end
Second point of the same diagonal.
-
item
public final SoMFString item
List of item names.
-
boxVisibility
public final SoSFBool boxVisibility
Visibility of the boxes.
-
boxColor
public final SoMFColor boxColor
List of colors for the boxes (boxColor.getNum() must be greater or equal to item.getNum(), otherwise all boxes get the same color which is the inherited color).
-
lineVisibility
public final SoSFBool lineVisibility
Visibility of the lines.
-
lineColor
public final SoMFColor lineColor
List of colors for lines.
-
lineSize
public final SoMFFloat lineSize
List of sizes for lines.
-
linePattern
public final SoMFUShort linePattern
Be careful: (lineColor or lineSize or linePattern).getNum() must be greater or equal to item.getNum() in order to take into account one of these fields, otherwise the inherited attributes will be used.
-
markerVisibility
public final SoSFBool markerVisibility
Visibility of the markers.
-
markerColor
public final SoMFColor markerColor
List of color for markers. Be careful: markerColor.getNum() must be greater or equal to item.getNum() in order to take into account one of this field, otherwise the inherited attributes will be used.
-
markerSize
public final SoMFFloat markerSize
List of sizes for markers. Be careful: markerSize.getNum() must be greater or equal to item.getNum() in order to take into account one of this field, otherwise the inherited attributes will be used.
-
markerString
public final SoMFString markerString
The markers are defined by a list of strings. For each string of markerString equals to ".", the marker is anSoPointSet
shape, otherwise anSoText2
shape. Futhermore, only the first character of each string of markerString is used. To change the font of the text markers, set catalog part markerApp.font.name. Be careful, in this version, text markers are not vertically aligned.
-
-
Constructor Detail
-
PoItemLegend
public PoItemLegend(SbVec2f _start, SbVec2f _end, java.lang.String[] _item)
Calls PoItemLegend(_start, _end, _item, (com.openinventor.inventor.SbColor[])null).
-
PoItemLegend
public PoItemLegend(SbVec2f _start, SbVec2f _end, java.lang.String[] _item, SbColor[] _boxColor)
Constructor.
-
PoItemLegend
public PoItemLegend()
Default constructor.
-
-
Method Detail
-
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.
-
-