public class Clipboard extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Clipboard.Mode
the supported modes for the clipboard
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the clipboard
|
static Clipboard |
get()
Returns the clipboard of the session of the current user
|
Object |
getContainer()
Returns the container stored in the clipboard.
|
Clipboard.Mode |
getMode()
Returns the mode stored in the clipboard
|
List<? extends Object> |
getObjects()
Returns the objects stored in the clipboard.
|
boolean |
isEmpty()
Returns true if the clipboard is empty (which is the case if no objects are stored in the clipboard)
|
boolean |
objectsOfClass(Class<?>... classes)
Returns true if clipboard is empty or all the objects in the clipboard are an instance of at least one of the passed
classes.
|
void |
setContainer(Object newContainer)
Sets only the container, all other clipboard data remain unchanged
|
void |
setData(Object container,
List<? extends Object> objects,
Clipboard.Mode mode)
Sets the whole content for the clipboard
|
void |
setMode(Clipboard.Mode newMode)
Sets only the mode, all other clipboard data remain unchanged
|
void |
setObjects(List<? extends Object> newObjects)
Sets only the objects, all other clipboard data remain unchanged
|
public static Clipboard get()
public void setData(Object container, List<? extends Object> objects, Clipboard.Mode mode)
container
- the container of the passed objectsobjects
- the objects to be set to the clipboardmode
- the clipboard modepublic void setContainer(Object newContainer)
newContainer
- the new containerpublic void setObjects(List<? extends Object> newObjects)
newObjects
- the new objectspublic void setMode(Clipboard.Mode newMode)
newMode
- the new modepublic Object getContainer()
public List<? extends Object> getObjects()
public Clipboard.Mode getMode()
public boolean isEmpty()
public boolean objectsOfClass(Class<?>... classes)
classes
- the classes to checkpublic void clear()
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.