org.simantics.databoard.accessor
Interface VariantAccessor

All Superinterfaces:
Accessor
All Known Subinterfaces:
FileVariantAccessor
All Known Implementing Classes:
BinaryVariant, JavaVariant

public interface VariantAccessor
extends Accessor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.simantics.databoard.accessor.Accessor
Accessor.Listener
 
Method Summary
<T extends Accessor>
T
getContentAccessor()
          Get an accessor to the variant's content.
 Datatype getContentType()
          Get the type of the content
 java.lang.Object getContentValue(Binding contentBinding)
          Get the content of this variant
 void setContentValue(Binding valueBinding, java.lang.Object value)
          Set the content of this variant.
 VariantType type()
          Get the type of this variant.
 
Methods inherited from interface org.simantics.databoard.accessor.Accessor
addListener, apply, getComponent, getValue, getValue, removeListener, setValue
 

Method Detail

getContentAccessor

<T extends Accessor> T getContentAccessor()
                                      throws AccessorConstructionException
Get an accessor to the variant's content.

Returns:
value
Throws:
AccessorException
AccessorConstructionException

setContentValue

void setContentValue(Binding valueBinding,
                     java.lang.Object value)
                     throws AccessorException
Set the content of this variant. (Note! this methods sets the _content_ value, in contrast to Accessor.setValue(org.simantics.databoard.binding.Binding, Object) which sets the _variant_ value.

Parameters:
valueBinding -
value -
Throws:
AccessorException

getContentValue

java.lang.Object getContentValue(Binding contentBinding)
                                 throws AccessorException
Get the content of this variant

Parameters:
contentBinding -
Returns:
content
Throws:
AccessorException

getContentType

Datatype getContentType()
                        throws AccessorException
Get the type of the content

Returns:
type
Throws:
AccessorException

type

VariantType type()
Get the type of this variant.

Specified by:
type in interface Accessor
Returns:
VariantType always