public class RosterEntrySelection extends Object implements Transferable, ClipboardOwner
Note that roster entries can only be transfered within a single JVM instance, and cannot be shared between programs via this mechanism.
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Modifier and Type Method Description
createRosterEntrySelection(ArrayList<RosterEntry> rosterEntries)Create a transferable with a list of RosterEntries.
getRosterEntries(Transferable t)Get an ArrayList of RosterEntries from a RosterEntrySelection.
lostOwnership(Clipboard clpbrd, Transferable t)
Create the transferable.
Takes as a parameter an ArrayList containing Strings representing RosterEntry Ids.
rosterEntries- an ArrayList of RosterEntry Ids
public static RosterEntrySelection createRosterEntrySelection(ArrayList<RosterEntry> rosterEntries)Create a transferable with a list of RosterEntries.
rosterEntries- entries to include in the selection
- a new selection with the given entries
public static ArrayList<RosterEntry> getRosterEntries(Transferable t) throws UnsupportedFlavorException, IOExceptionGet an ArrayList of RosterEntries from a RosterEntrySelection.