public class DDGridLayout extends com.vaadin.ui.GridLayout implements LayoutDragSource, com.vaadin.event.dd.DropTarget, ShimSupport, com.vaadin.ui.LegacyComponent, DragFilterSupport, DragImageReferenceSupport, DragGrabFilterSupport, HasDragCaptionProvider
Modifier and Type | Class and Description |
---|---|
class |
DDGridLayout.GridLayoutTargetDetails
Target details for a drop event
|
static class |
DDGridLayout.GridLayoutTransferable
Contains the transferable details when dragging from a GridLayout.
|
com.vaadin.ui.GridLayout.Area, com.vaadin.ui.GridLayout.OutOfBoundsException, com.vaadin.ui.GridLayout.OverlapsException
com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.HasContextHelp, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
com.vaadin.server.Sizeable.Unit
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
Constructor and Description |
---|
DDGridLayout()
Constructs an empty grid layout that is extended as needed.
|
DDGridLayout(int columns,
int rows)
Constructor for grid of given size (number of cells).
|
DDGridLayout(int columns,
int rows,
com.vaadin.ui.Component... children)
Constructor for grid of given size (number of cells).
|
Modifier and Type | Method and Description |
---|---|
void |
beforeClientResponse(boolean initial) |
void |
changeVariables(java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> variables) |
DragCaptionProvider |
getDragCaptionProvider() |
DragFilter |
getDragFilter()
Get a filter which determines which components can be dragged from the
layout and which cannot.
|
DragGrabFilter |
getDragGrabFilter() |
DragImageProvider |
getDragImageProvider()
Returns the drag image provider
|
LayoutDragMode |
getDragMode()
Gets the drag mode which controls how drags can be made.
|
com.vaadin.event.dd.DropHandler |
getDropHandler() |
DDGridLayoutState |
getState() |
com.vaadin.event.Transferable |
getTransferable(java.util.Map<java.lang.String,java.lang.Object> rawVariables) |
boolean |
isShimmed()
Are shims used over iframes so dragging is possible
|
void |
paintContent(com.vaadin.server.PaintTarget target) |
void |
setComponentHorizontalDropRatio(float ratio)
Sets the ratio which determines how a cell is divided into drop zones.
|
void |
setComponentVerticalDropRatio(float ratio)
Sets the ratio which determines how a cell is divided into drop zones.
|
void |
setDragCaptionProvider(DragCaptionProvider provider) |
void |
setDragFilter(DragFilter dragFilter)
Set a filter which determines which components can be dragged from the
layout and which cannot.
|
void |
setDragGrabFilter(DragGrabFilter dragGrabFilter) |
void |
setDragImageProvider(DragImageProvider provider)
Set a component as a drag image for a component in the layout.
|
void |
setDragMode(LayoutDragMode mode)
Sets the drag mode which controls how drags can be made.
|
void |
setDropHandler(com.vaadin.event.dd.DropHandler dropHandler) |
void |
setShim(boolean shim)
False to disable the iframe shim used to enable dragging iframe based
components (defaults to true).
|
com.vaadin.event.dd.TargetDetails |
translateDropTargetDetails(java.util.Map<java.lang.String,java.lang.Object> clientVariables) |
addComponent, addComponent, addComponent, addLayoutClickListener, getColumnExpandRatio, getColumns, getComponent, getComponentAlignment, getComponentArea, getComponentCount, getCursorX, getCursorY, getCustomAttributes, getDefaultComponentAlignment, getMargin, getRowExpandRatio, getRows, getState, insertRow, isHideEmptyRowsAndColumns, isSpacing, iterator, newLine, readDesign, removeAllComponents, removeComponent, removeComponent, removeLayoutClickListener, removeRow, replaceComponent, setColumnExpandRatio, setColumns, setComponentAlignment, setCursorX, setCursorY, setDefaultComponentAlignment, setHideEmptyRowsAndColumns, setMargin, setMargin, setRowExpandRatio, setRows, setSpacing, space, writeDesign
isRequiredIndicatorVisible, readMargin, setRequiredIndicatorVisible, writeMargin
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidth
addContextClickListener, addContextHelpIconClickListener, addListener, addShortcutListener, addStyleName, attach, detach, ensureContextHelpInitialized, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireContextHelpClick, focus, getActionManager, getCaption, getComponentError, getComponentErrorProvider, getContextHelpText, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getRequiredError, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isContextHelpTextHtmlEnabled, isEnabled, isOrHasAncestor, isReadOnly, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setComponentErrorProvider, setContextHelpText, setContextHelpTextHtmlEnabled, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setJTestId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredError, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setJTestId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
public DDGridLayout(int columns, int rows)
columns
- Number of columns in the grid.rows
- Number of rows in the grid.public DDGridLayout(int columns, int rows, com.vaadin.ui.Component... children)
columns
- Number of columns in the grid.rows
- Number of rows in the grid.children
- Child componentspublic DDGridLayout()
@Nullable public DragGrabFilter getDragGrabFilter()
getDragGrabFilter
in interface DragGrabFilterSupport
public void setDragGrabFilter(@Nullable DragGrabFilter dragGrabFilter)
setDragGrabFilter
in interface DragGrabFilterSupport
dragGrabFilter
- drag grab filterpublic void setDragCaptionProvider(@Nullable DragCaptionProvider provider)
setDragCaptionProvider
in interface HasDragCaptionProvider
@Nullable public DragCaptionProvider getDragCaptionProvider()
getDragCaptionProvider
in interface HasDragCaptionProvider
public void paintContent(com.vaadin.server.PaintTarget target) throws com.vaadin.server.PaintException
paintContent
in interface com.vaadin.ui.LegacyComponent
com.vaadin.server.PaintException
public void changeVariables(java.lang.Object source, java.util.Map<java.lang.String,java.lang.Object> variables)
changeVariables
in interface com.vaadin.server.VariableOwner
public com.vaadin.event.dd.DropHandler getDropHandler()
getDropHandler
in interface com.vaadin.event.dd.DropTarget
public void setDropHandler(com.vaadin.event.dd.DropHandler dropHandler)
public LayoutDragMode getDragMode()
getDragMode
in interface LayoutDragSource
public void setDragMode(LayoutDragMode mode)
setDragMode
in interface LayoutDragSource
mode
- The mode to setpublic com.vaadin.event.dd.TargetDetails translateDropTargetDetails(java.util.Map<java.lang.String,java.lang.Object> clientVariables)
translateDropTargetDetails
in interface com.vaadin.event.dd.DropTarget
public com.vaadin.event.Transferable getTransferable(java.util.Map<java.lang.String,java.lang.Object> rawVariables)
getTransferable
in interface com.vaadin.event.dd.DragSource
public void setComponentHorizontalDropRatio(float ratio)
ratio
- A ratio between 0 and 0.5. Default is 0.2public void setComponentVerticalDropRatio(float ratio)
ratio
- A ratio between 0 and 0.5. Default is 0.2public void setShim(boolean shim)
setShim
in interface ShimSupport
shim
- Are the iframes shimmedpublic boolean isShimmed()
isShimmed
in interface ShimSupport
public DragFilter getDragFilter()
LayoutDragMode.NONE
By default the drag filter permits dragging all components when the
layout drag mode allows it.getDragFilter
in interface DragFilterSupport
getDragFilter
in interface LayoutDragSource
DragFilter.ALL
is used.public void setDragFilter(DragFilter dragFilter)
LayoutDragMode.NONE
By default the drag filter permits dragging all components when the
layout drag mode allows it.setDragFilter
in interface DragFilterSupport
setDragFilter
in interface LayoutDragSource
dragFilter
- The filter to use, by default DragFilter.ALL
is used.public DDGridLayoutState getState()
getState
in class com.vaadin.ui.GridLayout
public void beforeClientResponse(boolean initial)
beforeClientResponse
in interface com.vaadin.server.ClientConnector
beforeClientResponse
in class com.vaadin.ui.GridLayout
public void setDragImageProvider(@Nullable DragImageProvider provider)
DragImageReferenceSupport
setDragImageProvider
in interface DragImageReferenceSupport
provider
- The image provider@Nullable public DragImageProvider getDragImageProvider()
DragImageReferenceSupport
getDragImageProvider
in interface DragImageReferenceSupport