|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AcceptCriterion
Criterion that can be used create policy to accept/discard dragged content
(presented by Transferable).
The drag and drop mechanism will verify the criteria returned by
DropHandler.getAcceptCriterion() before calling
DropHandler.drop(DragAndDropEvent).
The criteria can be evaluated either on the client (browser - see
ClientSideCriterion) or on the server (see
ServerSideCriterion). If no constraints are needed, an
AcceptAll can be used.
In addition to accepting or rejecting a possible drop, criteria can provide
additional hints for client side painting.
DropHandler,
ClientSideCriterion,
ServerSideCriterion| Method Summary | |
|---|---|
boolean |
accept(DragAndDropEvent dragEvent)
Validates the data in event to be appropriate for the DropHandler.drop(DragAndDropEvent) method. |
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)
|
void |
paintResponse(PaintTarget target)
This needs to be implemented iff criterion does some lazy server side initialization. |
| Method Detail |
|---|
boolean isClientSideVerifiable()
void paint(PaintTarget target)
throws PaintException
PaintException
void paintResponse(PaintTarget target)
throws PaintException
accept(DragAndDropEvent) is called before this method.
target -
PaintExceptionboolean accept(DragAndDropEvent dragEvent)
DropHandler.drop(DragAndDropEvent) method.
Note that even if your criterion is validated on client side, you should always validate the data on server side too.
dragEvent -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||