public class PoTimeAxis extends PoAxis
The abscissa or ordinate (following "type" field) of the start point of the axis is startDate. The abscissa or ordinate (following "type" field) of the end point of the axis is endDate. Both these abscissas and ordinates are computed according to the association between a dates range and a coordinates range defined by the the current date mapping.
Both startDate and endDate are described by character strings. The syntax must fit the current date format, otherwise the axis is not built.
The current date format and the current date mapping are defined as follows : If the method setDateFormatMapping(formatMapping) is called, the current date format and the current date mapping are defined by "formatMapping". Otherwise the current date format and the current date mapping are specified in the current inherited state (cf property node PoDateFormatMapping
).
Axis graduations are displayed depending on date representation given by the fields gradRep and timesPeriod. gradRep is a list of representations and timesPeriod is a list of possible duration.
Let D be the duration between startDate and endDate (date at the start and the end of the axis), and let Di (0 <= i < gradRep.getNum()) be the set of duration defined by the parameter timesPeriod. The choice of a representation is done as follows:
If the duration list is not provided (empty string), the representation is not chosen depending on D. It is chosen depending on calendar threads given with each representation.if D < D0 the axis is built using representation gradRep[0] if Di <= D < Di+1 the axis is built using representation gradRep[i+1] if DgradRep.getNum()-2 < D the axis is built using representation gradRep[gradRep.getNum() -1]
Syntax of the string timesPeriod which defines the set of duration. This is a rational language defined as follows:
remark: For all units but SEC, only the integer part of (r) is used. Specifying a decimal part is then useless.timesPeriod = ([r]U)* where (U) is the time units selected from SEC, MIN, HOU, DAY, YEA where ([r]) optional positive real value defining the number of units (=1 id r is not defined) ([r]U)* means that [r]U sequence may be repeated 0 or several times The 'space' characters are ignored examples: timesPeriod = "10SEC 20MIN HOU" defines 3 duration: 10 seconds, 20 minutes et 1 hour timesPeriod = "0.2SEC 30MIN 10DAY 2YEA" defines 4 duration: 0.2 seconds, 30 minutes, 10 day et 2 years
A date graduation representation allows the application:
A graduation representation is defined by:
All levels of graduation are displayed underneath each other for horizontal axes and side by side for vertical axes. The first level is the closest to the main line of the axis, the last one is the furthest. Date components are seconds, minutes, hours, days, months and years.
Syntax of the string gradRep[i] which defines the date representation number i. This is a rational language defined as follows:
Characters for the day of the month or month of the year are displayed using current language defined by the field language. n is an integer value greater than 0.gradRep[i] = R(/R)* where (/) stands for the current new line character (attribute of the current miscellaneous attributes - cf PoAxis description) (it appears before definition of new level) where (R) is the representation of dates for one level. This rational language is also defined by: R = [[r]U] ['string'] ([n]C['string'])* where [[r]U] (optional) defines the thread between 2 following calendar graduations of a level where ['string'] (optional) is any character strings between quotes where [n]C defines the appearance of one of the date calendar components [n]C = (s) to display the number of seconds (0 to 59.999...) = (m) to display the number of minutes (0 to 59) = (H) to display the number of hours (0 to 23) = (D) to display the day number in the month (1 to 31) = (nD) to display n first characters of the name of the day of the week = (M) to display number of the month (1 to 12) = (nM) to display n first characters of the name of the month of the year = (Y) or (2Y)to display 2 last digits of the year = (4Y)to display all digits of the year
Warning: To insert the quote (') character in the string ['string'], it must be repeated twice. If the string must only contain (') character then the string must be defined as ''''. To insert a (") in the string a back-slash character (\) must be added before it.
Example 1:
defines two levels of graduations:gradRep[i] = "20 SEC 'at'm''''s'sec' / 1MIN D 3M Y' ' H'h' m'''' "
Possible appearance of graduation may be for instance:
at11'50sec at12'10sec at12'30sec at12'50sec at13'10sec at13'30sec 3MAR94 18h12' 3MAR94 18h13'
Example 2:
defines three levels of graduation:gradRep[i] = "5 MIN H'h'm'''' / DAY D'-'3M / YEA 4Y"
Possible appearance of graduation may be for instance:
11h15' 11h20' 11h25' 11h30' 11h35' 11h40' 3-MAR 1995
File format/default:
gradVisibility | VISILITY_DEPEND |
gradPosition | GRAD_DEPEND |
gradPath | PATH_DEPEND |
gradFontName | "" |
gradFontSize | 0 |
gradDistAxis | 0 |
gradAddStringVisibility | false |
gradAddString | "" |
marginType | REL_MARGIN |
marginStart | 0 |
marginEnd | 0 |
titleVisibility | VISILITY_DEPEND |
titlePosition | TITLE_DEPEND |
titlePath | PATH_DEPEND |
titleFontName | "" |
titleFontSize | 0 |
titleDistAxis | 0 |
titleString | "" |
gridVisibility | VISILITY_DEPEND |
gridLengthGradSide | 0 |
gridLengthGradOtherSide | 1 |
arrowVisibility | VISIBILITY_DEPEND |
arrowHeight | 0.03 |
arrowLength | 0.05 |
tickVisibility | VISIBILITY_DEPEND |
tickPosition | TICK_GRAD_SIDE |
tickMainLength | 0 |
tickSubLength | 0 |
tickSubDef | PERIOD_MAIN_TICK |
tickNumOrPeriod | 1 |
tickFirstGrad | 1 |
tickLastGrad | 1 |
reverseFlag | AXIS_REVERSE_DEPEND |
startDate | "1-01-70" |
endDate | "2-01-70" |
coord | 0 |
type | X |
language | ENGLISH |
gradFit | GRAD_UNFIT |
gradRep | "" |
timesPeriod | "" |
Modifier and Type | Class and Description |
---|---|
static class |
PoTimeAxis.GradFits |
static class |
PoTimeAxis.Languages
Language used for date.
|
static class |
PoTimeAxis.Types
Axis orientation.
|
PoAxis.ArrowAttributes, PoAxis.AxisReverses, PoAxis.GradAttributes, PoAxis.GradPositions, PoAxis.GridAttributes, PoAxis.MarginAttributes, PoAxis.MarginTypes, PoAxis.TextPaths, PoAxis.TickAttributes, PoAxis.TickPositions, PoAxis.TickSubDefs, PoAxis.TitleAttributes, PoAxis.TitlePositions, PoAxis.Visibilities
PoBase.NodeWriteFormats, PoBase.TextTypes, PoBase.UpdateMethodTypes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFFloat |
coord
Abscissa or ordinate of the axis according to the axis type.
|
static int |
DEUTSCH
Deprecated.
Use
PoTimeAxis.Languages.DEUTSCH instead. |
SoSFString |
endDate
End date of the axis.
|
static int |
ENGLISH
Deprecated.
Use
PoTimeAxis.Languages.ENGLISH instead. |
static int |
ESPANOL
Deprecated.
Use
PoTimeAxis.Languages.ESPANOL instead. |
static int |
FRANCAIS
Deprecated.
Use
PoTimeAxis.Languages.FRANCAIS instead. |
static int |
GRAD_FIT
Deprecated.
Use
PoTimeAxis.GradFits.GRAD_FIT instead. |
static int |
GRAD_UNFIT
Deprecated.
Use
PoTimeAxis.GradFits.GRAD_UNFIT instead. |
SoSFEnum<PoTimeAxis.GradFits> |
gradFit
This flag indicates if the first graduation is in round figures or not.
|
SoMFString |
gradRep
List of date representation.
|
SoSFEnum<PoTimeAxis.Languages> |
language
Language of date graduations.
|
SoSFString |
startDate
Start date of the axis.
|
SoSFString |
timesPeriod
String containing gradRep.getNum() -1 sub-strings.
|
SoSFEnum<PoTimeAxis.Types> |
type
Axis type.
|
static int |
X
Deprecated.
Use
PoTimeAxis.Types.X instead. |
static int |
Y
Deprecated.
Use
PoTimeAxis.Types.Y instead. |
arrowHeight, arrowLength, arrowVisibility, AXIS_NO_REVERSE, AXIS_REVERSE, AXIS_REVERSE_DEPEND, FIXED_MARGIN, GRAD_ABOVE, GRAD_BELOW, GRAD_DEPEND, gradAddString, gradAddStringVisibility, gradDistAxis, gradFontName, gradFontSize, gradPath, gradPosition, gradVisibility, gridLengthGradOtherSide, gridLengthGradSide, gridVisibility, marginEnd, marginStart, marginType, NUM_SUB_TICK, PATH_DEPEND, PATH_DOWN, PATH_LEFT, PATH_RIGHT, PATH_UP, PERIOD_MAIN_TICK, REL_MARGIN, reverseFlag, TICK_ACROSS_AXIS, TICK_GRAD_OTHER_SIDE, TICK_GRAD_SIDE, tickFirstGrad, tickLastGrad, tickMainLength, tickNumOrPeriod, tickPosition, tickSubDef, tickSubLength, tickVisibility, TITLE_DEPEND, TITLE_END, TITLE_MIDDLE, titleDistAxis, titleFontName, titleFontSize, titlePath, titlePosition, titleString, titleVisibility, VISIBILITY_DEPEND, VISIBILITY_OFF, VISIBILITY_ON
FOLD_NODE_WRITE_FORMAT, SO_ANNO_TEXT3, SO_TEXT3, UNFOLD_NODE_WRITE_FORMAT, UPDATE_METHOD_IMMEDIATE, UPDATE_METHOD_ON_ACTION
boundingBoxIgnoring
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
PoTimeAxis()
Constructor.
|
PoTimeAxis(java.lang.String _startDate,
java.lang.String _endDate,
float _coord)
Calls PoTimeAxis(_startDate, _endDate, _coord, PoTimeAxis.Types.valueOf( PoTimeAxis.Types.X.getValue() )).
|
PoTimeAxis(java.lang.String _startDate,
java.lang.String _endDate,
float _coord,
PoTimeAxis.Types _type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static SoNodekitCatalog |
getClassNodekitCatalog()
Returns the
SoNodekitCatalog for this class. |
PbDateFormatMapping |
getDateFormatMapping()
Gets a reference to a
PbDateFormatMapping object for the input date format and for the association dates, coordinates. |
void |
setDateFormatMapping(PbDateFormatMapping formatMapping)
Sets a reference to a
PbDateFormatMapping object for the input date format and for the association dates, coordinates. |
getArrow, getGrad, getGrid, getMargin, getMiscTextAttr, getReverseFlag, getTick, getTitle, setMiscTextAttr
addPostRebuildCallback, addPreRebuildCallback, getDomain, getNodeWriteFormat, getTextType, getUpdateMethod, isBuilt, isModified, isVRML2Mode, rebuild, setDomain, setNodeWriteFormat, setTextType, setUpdateMethod, setVRML2Mode, touchKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int ENGLISH
PoTimeAxis.Languages.ENGLISH
instead.@Deprecated public static final int FRANCAIS
PoTimeAxis.Languages.FRANCAIS
instead.@Deprecated public static final int DEUTSCH
PoTimeAxis.Languages.DEUTSCH
instead.@Deprecated public static final int ESPANOL
PoTimeAxis.Languages.ESPANOL
instead.@Deprecated public static final int GRAD_FIT
PoTimeAxis.GradFits.GRAD_FIT
instead.@Deprecated public static final int GRAD_UNFIT
PoTimeAxis.GradFits.GRAD_UNFIT
instead.@Deprecated public static final int X
PoTimeAxis.Types.X
instead.@Deprecated public static final int Y
PoTimeAxis.Types.Y
instead.public final SoSFString startDate
public final SoSFString endDate
public final SoSFFloat coord
public final SoSFEnum<PoTimeAxis.Types> type
public final SoSFEnum<PoTimeAxis.Languages> language
public final SoSFEnum<PoTimeAxis.GradFits> gradFit
public final SoMFString gradRep
public final SoSFString timesPeriod
public PoTimeAxis(java.lang.String _startDate, java.lang.String _endDate, float _coord)
public PoTimeAxis(java.lang.String _startDate, java.lang.String _endDate, float _coord, PoTimeAxis.Types _type)
public PoTimeAxis()
public PbDateFormatMapping getDateFormatMapping()
PbDateFormatMapping
object for the input date format and for the association dates, coordinates.public void setDateFormatMapping(PbDateFormatMapping formatMapping)
PbDateFormatMapping
object for the input date format and for the association dates, coordinates.
If this method is not called (or called passing NULL as argument), this is the date format and date mapping defined in the current inherited state (defined with the property node PoDateFormatMapping
) which are used.public static SoNodekitCatalog getClassNodekitCatalog()
SoNodekitCatalog
for this class.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com