plugins.wdx
Class FieldValue

java.lang.Object
  extended by plugins.wdx.FieldValue

public class FieldValue
extends java.lang.Object

FieldValue is used by contentGetValue. Here the plugin needs to return the requested data. The data format depends on the field type.

Author:
Ken

Field Summary
static int FT_BOOLEAN
          contentGetSupportedField: A true/false value.
static int FT_DATE
          contentGetSupportedField: A date value (year, month, day).
static int FT_DATETIME
          contentGetSupportedField: A timestamp of type FILETIME, as returned e.g.
static int FT_DELAYED
          contentGetValue: field takes a long time to extract -> try again in background.
static int FT_FIELDEMPTY
          contentGetValue: field valid, but empty.
static int FT_FILEERROR
          contentGetValue: file i/o error.
static int FT_FULLTEXT
          contentGetSupportedField: A full text (multiple text strings), only used for searching.
static int FT_MULTIPLECHOICE
          contentGetSupportedField: A value allowing a limited number of choices.
static int FT_NOMOREFIELDS
          contentGetSupportedField: The FieldIndex is beyond the last available field.
static int FT_NOSUCHFIELD
          contentGetValue: error, invalid field number given.
static int FT_NOTSUPPORTED
          Function not supported.
static int FT_NUMERIC_32
          contentGetSupportedField: A 32-bit signed number.
static int FT_NUMERIC_64
          contentGetSupportedField: A 64-bit signed number, e.g. for file sizes.
static int FT_NUMERIC_FLOATING
          contentGetSupportedField: A double precision floating point number.
static int FT_ONDEMAND
          contentGetValue: field will be retrieved only when user presses <SPACEBAR>.
static int FT_SETCANCEL
          contentEditValue(): The user clicked on cancel.
static int FT_STRING
          contentGetSupportedField: A text string.
static int FT_TIME
          contentGetSupportedField: A time value (hour, minute, second).
 
Constructor Summary
FieldValue()
           
 
Method Summary
 LocalDate getDate()
          Value, if fieldType == FT_DATE.
 double getDoubleValue()
          Value, if fieldType == FT_NUMERIC_FLOATING.
 int getFieldType()
           
 FileTime getFileTime()
          Value, if fieldType == FT_DATETIME.
 int getIntValue()
          Value, if fieldType == FT_NUMERIC_32.
 long getLongValue()
          Value, if fieldType == FT_NUMERIC_64.
 java.lang.String getStr()
          Value, if fieldType == FT_MULTIPLECHOICE || fieldType == FT_STRING || fieldType == FT_FULLTEXT.
 LocalTime getTime()
          Value, if fieldType == FT_TIME.
 boolean isBoolValue()
          Value, if fieldType == FT_BOOLEAN.
 void parseValue(java.lang.String text)
          Parse text as expected type fieldType.
 void setValue(int type, java.lang.Object value)
          Create a new field value for the data format of the field type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FT_NOMOREFIELDS

public static final int FT_NOMOREFIELDS
contentGetSupportedField: The FieldIndex is beyond the last available field.

See Also:
Constant Field Values

FT_NUMERIC_32

public static final int FT_NUMERIC_32
contentGetSupportedField: A 32-bit signed number.

See Also:
Constant Field Values

FT_NUMERIC_64

public static final int FT_NUMERIC_64
contentGetSupportedField: A 64-bit signed number, e.g. for file sizes.

See Also:
Constant Field Values

FT_NUMERIC_FLOATING

public static final int FT_NUMERIC_FLOATING
contentGetSupportedField: A double precision floating point number.

See Also:
Constant Field Values

FT_DATE

public static final int FT_DATE
contentGetSupportedField: A date value (year, month, day). Date and time are in local time.

See Also:
Constant Field Values

FT_TIME

public static final int FT_TIME
contentGetSupportedField: A time value (hour, minute, second). Date and time are in local time.

See Also:
Constant Field Values

FT_BOOLEAN

public static final int FT_BOOLEAN
contentGetSupportedField: A true/false value.

See Also:
Constant Field Values

FT_MULTIPLECHOICE

public static final int FT_MULTIPLECHOICE
contentGetSupportedField: A value allowing a limited number of choices. Use the Units field to return all possible values.

See Also:
Constant Field Values

FT_STRING

public static final int FT_STRING
contentGetSupportedField: A text string.

See Also:
Constant Field Values

FT_FULLTEXT

public static final int FT_FULLTEXT
contentGetSupportedField: A full text (multiple text strings), only used for searching. Can be used e.g. for searching in the text portion of binary files, where the plugin makes the necessary translations. All fields of this type MUST be placed at the END of the field list, otherwise you will get errors in Total Commander!

See Also:
Constant Field Values

FT_DATETIME

public static final int FT_DATETIME
contentGetSupportedField: A timestamp of type FILETIME, as returned e.g. by FindFirstFile(). It is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. The time MUST be relative to universal time (Greenwich mean time) as returned by the file system, not local time!

See Also:
Constant Field Values

FT_NOSUCHFIELD

public static final int FT_NOSUCHFIELD
contentGetValue: error, invalid field number given.

See Also:
Constant Field Values

FT_FILEERROR

public static final int FT_FILEERROR
contentGetValue: file i/o error.

See Also:
Constant Field Values

FT_FIELDEMPTY

public static final int FT_FIELDEMPTY
contentGetValue: field valid, but empty.

See Also:
Constant Field Values

FT_ONDEMAND

public static final int FT_ONDEMAND
contentGetValue: field will be retrieved only when user presses <SPACEBAR>.

See Also:
Constant Field Values

FT_NOTSUPPORTED

public static final int FT_NOTSUPPORTED
Function not supported.

See Also:
Constant Field Values

FT_SETCANCEL

public static final int FT_SETCANCEL
contentEditValue(): The user clicked on cancel.

See Also:
Constant Field Values

FT_DELAYED

public static final int FT_DELAYED
contentGetValue: field takes a long time to extract -> try again in background.

See Also:
Constant Field Values
Constructor Detail

FieldValue

public FieldValue()
Method Detail

getIntValue

public final int getIntValue()
Value, if fieldType == FT_NUMERIC_32.

Returns:
Returns the intValue.

getLongValue

public final long getLongValue()
Value, if fieldType == FT_NUMERIC_64.

Returns:
Returns the longValue.

getDoubleValue

public final double getDoubleValue()
Value, if fieldType == FT_NUMERIC_FLOATING.

Returns:
Returns the doubleValue.

isBoolValue

public final boolean isBoolValue()
Value, if fieldType == FT_BOOLEAN.

Returns:
Returns the boolValue.

getStr

public final java.lang.String getStr()
Value, if fieldType == FT_MULTIPLECHOICE || fieldType == FT_STRING || fieldType == FT_FULLTEXT.

Returns:
Returns the str.

getFileTime

public final FileTime getFileTime()
Value, if fieldType == FT_DATETIME.

Returns:
Returns the fileTime.

getDate

public final LocalDate getDate()
Value, if fieldType == FT_DATE.

Returns:
Returns the date.

getTime

public final LocalTime getTime()
Value, if fieldType == FT_TIME.

Returns:
Returns the time.

getFieldType

public final int getFieldType()
Returns:
Returns the fieldType.
  • FT_NUMERIC_32: FieldValue points to a 32-bit signed integer variable.
  • FT_NUMERIC_64: FieldValue points to a 64-bit signed integer variable.
  • FT_NUMERIC_FLOATING: FieldValue points to a 64-bit floating point variable (ISO standard double precision)
    See remark below about additional string field!
  • FT_DATE: FieldValue points to a structure containing year,month,day as 2 byte values.
  • FT_TIME: FieldValue points to a structure containing hour,minute,second as 2 byte values.
  • FT_BOOLEAN: FieldValue points to a 32-bit number. 0 neans false, anything else means true.
  • FT_STRING or ft_multiplechoice: FieldValue is a pointer to a 0-terminated string.
  • FT_FULLTEXT: Read maxlen bytes of interpreted data starting at offset UnitIndex. The data must be a 0 terminated string.
  • FT_DATETIME: A timestamp of type FILETIME, as returned e.g. by FindFirstFile(). It is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. The time MUST be relative to universal time (Greenwich mean time) as returned by the file system, not local time!
  • FT_DELAYED, FT_ONDEMAND: You may return a zero-terminated string as in FT_STRING, which will be shown until the actual value has been extracted. Requires plugin version>=1.4.

setValue

public final void setValue(int type,
                           java.lang.Object value)
Create a new field value for the data format of the field type.

Parameters:
type -
  • FT_NUMERIC_32: FieldValue points to a 32-bit signed integer variable.
  • FT_NUMERIC_64: FieldValue points to a 64-bit signed integer variable.
  • FT_NUMERIC_FLOATING: FieldValue points to a 64-bit floating point variable (ISO standard double precision)
    See remark below about additional string field!
  • FT_DATE: FieldValue points to a structure containing year,month,day as 2 byte values.
  • FT_TIME: FieldValue points to a structure containing hour,minute,second as 2 byte values.
  • FT_BOOLEAN: FieldValue points to a 32-bit number. 0 neans false, anything else means true.
  • FT_STRING or ft_multiplechoice: FieldValue is a pointer to a 0-terminated string.
  • FT_FULLTEXT: Read maxlen bytes of interpreted data starting at offset UnitIndex. The data must be a 0 terminated string.
  • FT_DATETIME: A timestamp of type FILETIME, as returned e.g. by FindFirstFile(). It is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. The time MUST be relative to universal time (Greenwich mean time) as returned by the file system, not local time!
  • FT_DELAYED, FT_ONDEMAND: You may return a zero-terminated string as in FT_STRING, which will be shown until the actual value has been extracted. Requires plugin version>=1.4.
value - The value of the field type.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

parseValue

public final void parseValue(java.lang.String text)
Parse text as expected type fieldType.

Parameters:
text - the string presentation of the value