https://github.com/svenmeier/wicket-dnd
Wicket drag-and-drop
https://github.com/svenmeier/wicket-dnd
Last synced: 3 months ago
JSON representation
Wicket drag-and-drop
- Host: GitHub
- URL: https://github.com/svenmeier/wicket-dnd
- Owner: svenmeier
- Created: 2012-12-08T19:56:05.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2023-06-13T23:14:46.000Z (over 2 years ago)
- Last Synced: 2025-08-19T21:30:58.712Z (5 months ago)
- Language: Java
- Size: 111 KB
- Stars: 19
- Watchers: 3
- Forks: 15
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-wicket - wicket-dnd - 一般的なドラッグ & ドロップ UI を提供するライブラリ。 (ライブラリ)
README
wicket-dnd
==========
A generic Drag&Drop framework for [Wicket](http://wicket.apache.org):
(see [http://code.google.com/p/wicket-dnd](http://code.google.com/p/wicket-dnd) for Wicket 1.4 and 1.5)
- operate on any markup element via selectors
- drag and drop between any Wicket components
- vertical, horizontal and hierarchical structured markup
- drag initiators (a.k.a. handles)
- common desktop metaphors with `MOVE`, `COPY` and `LINK` operations
- transfer types
- themeable
- works in Firefox, Safari, Chrome, Opera
See our live examples on [http://wicket-dnd-jquery.appspot.com](http://wicket-dnd-jquery.appspot.com) (beware - very slow!).
Themes
------
You have to add a theme (build-in or your own) to your component you want to enable for DnD, e.g.
container.add(new WindowsTheme());
Drag source
-----------
Enable a component as a source of drags:
container.add(new DragSource(Operation.MOVE) {
public void onAfterDrop(AjaxRequestTarget target, Transfer transfer) {
// remove transfer data
}
}.drag("tr"));
In this example only a MOVE operation is allowed. Drags are initiated on `` tags.
Drop target
-----------
Enable a component as a target for drops:
container.add(new DropTarget(Operation.MOVE, Operation.COPY) {
public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) {
// add transfer data
}
}.dropCenter("tr"));
In this example MOVE and COPY operations are allowed. Drops are performed on center of `` tags,
the location holds a reference to the actual component and the anchor the transfer was dropped on.
Maven dependency
----------------
Releases are available on [Maven central](http://repo1.maven.org/maven2/com/github/svenmeier/wicket-dnd)
and [OSS Sonatype](https://oss.sonatype.org/content/repositories/releases/com/github/svenmeier/wicket-dnd).
com.github.svenmeier.wicket-dnd
wicket-dnd
0.6.2
com.github.svenmeier.wicket-dnd
wicket-dnd
0.7.3
For snapshot releases you have to use the [OSS Sonatype Snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/com/github/svenmeier/wicket-dnd/):
com.github.svenmeier.wicket-dnd
wicket-dnd
0.7.4-SNAPSHOT
sonatype-snapshots
https://oss.sonatype.org/content/repositories/snapshots
true