Class ClientSideCriterion
- java.lang.Object
-
- com.vaadin.event.dd.acceptcriteria.ClientSideCriterion
-
- All Implemented Interfaces:
AcceptCriterion
,Serializable
- Direct Known Subclasses:
AbstractSelect.AcceptItem
,AbstractSelect.TargetItemIs
,AcceptAll
,And
,ContainsDataFlavor
,Not
,Or
,SourceIs
,SourceIsTarget
,TargetDetailIs
,Tree.TargetInSubtree
public abstract class ClientSideCriterion extends Object implements Serializable, AcceptCriterion
Parent class for criteria that can be completely validated on client side. All classes that provide criteria that can be completely validated on client side should extend this class. It is recommended that subclasses of ClientSideCriterion re-validate the condition on the server side inAcceptCriterion.accept(com.vaadin.event.dd.DragAndDropEvent)
after the client side validation has accepted a transfer.- Since:
- 6.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClientSideCriterion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getIdentifier()
boolean
isClientSideVerifiable()
Returns whether the criteria can be checked on the client or whether a server request is needed to check the criteria.void
paint(PaintTarget target)
protected void
paintContent(PaintTarget target)
void
paintResponse(PaintTarget target)
This needs to be implemented iff criterion does some lazy server side initialization.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.event.dd.acceptcriteria.AcceptCriterion
accept
-
-
-
-
Method Detail
-
isClientSideVerifiable
public final boolean isClientSideVerifiable()
Description copied from interface:AcceptCriterion
Returns whether the criteria can be checked on the client or whether a server request is needed to check the criteria. This requirement may depend on the state of the criterion (e.g. logical operations between criteria), so this cannot be based on a marker interface.- Specified by:
isClientSideVerifiable
in interfaceAcceptCriterion
-
paint
public void paint(PaintTarget target) throws PaintException
- Specified by:
paint
in interfaceAcceptCriterion
- Throws:
PaintException
-
paintContent
protected void paintContent(PaintTarget target) throws PaintException
- Throws:
PaintException
-
getIdentifier
protected String getIdentifier()
-
paintResponse
public final void paintResponse(PaintTarget target) throws PaintException
Description copied from interface:AcceptCriterion
This needs to be implemented iff criterion does some lazy server side initialization. The UIDL painted in this method will be passed to client side drop handler implementation. Implementation can assume thatAcceptCriterion.accept(DragAndDropEvent)
is called before this method.- Specified by:
paintResponse
in interfaceAcceptCriterion
- Throws:
PaintException
-
-