|
Oxygen XML Editor, Version 14.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectro.sync.sample.plugin.converter.ConversionFormat
public class ConversionFormat
Manages a set of conversion entries, associated to a format. ("Length", "Force", etc)
Constructor Summary | |
---|---|
ConversionFormat(org.w3c.dom.Node formatNode)
Constructor for the ConversionFormat object. |
Method Summary | |
---|---|
double |
convert(java.lang.String masterValue,
java.lang.String slaveValue,
double arg1,
double arg2,
boolean direct,
int decimalsNumber)
Based on masterValue and slaveValue it determines the conversion entry that knows how to convert the two values. |
java.lang.String |
getAssociatedLabel(java.lang.String measure)
Get the label associated with a measure. |
java.util.Set |
getMasterValues(java.lang.String slaveValue)
Get all the possible values that can be listed in the first combo box, in the context of the selected value in the second combo box. |
java.lang.String |
getName()
Get the format name. |
java.util.Set |
getSlaveValues(java.lang.String masterValue)
Get all the possible values that can be listed in the second combo box, in the context of the selected value in the first combo box. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConversionFormat(org.w3c.dom.Node formatNode) throws ConversionException
formatNode
- The root node for this format.
ConversionException
- If an entry for this format is invalid,
or root node is null.Method Detail |
---|
public java.lang.String getName()
public java.util.Set getMasterValues(java.lang.String slaveValue)
slaveValue
- The value that is selected in the second combo box. If
null, all the possible values for the first combo box will be
returned.
public java.util.Set getSlaveValues(java.lang.String masterValue)
masterValue
- The value that is selected in the first combo box. If
null, all the possible values for the second combo box will be
returned.
public java.lang.String getAssociatedLabel(java.lang.String measure)
measure
- The measure, for example "milimeters"
public double convert(java.lang.String masterValue, java.lang.String slaveValue, double arg1, double arg2, boolean direct, int decimalsNumber) throws ConversionException
masterValue
- The first section conversion measure. Eg
"foot".slaveValue
- The second section conversion measure. Eg
"meter".arg1
- The value existing in the first edit.arg2
- The value existing in the first edit.direct
- Is true when the conversion is made
directly from the first measure into the second, or reversed.decimalsNumber
- The decimals number.
ConversionException
- Description of Exception
|
Oxygen XML Editor, Version 14.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |