org.qriterium.dogma.gui
Class DogmaClipboard

java.lang.Object
  extended by org.qriterium.dogma.gui.DogmaClipboard

public class DogmaClipboard
extends java.lang.Object


Method Summary
 void add(DogmaResource resource)
          Adds a single DogmaResource into clipboard.
 void copyResources(DogmaResourceTable model, int[] rows)
          Copies multiple row from a table of DogmaResources to the clipboard.
 boolean dogmaResourceOnClipboard()
          Function for checking the Clipboard status.
 java.util.Vector<DogmaResource> getContents()
          Returns a Vector of DogmaResources currently on the clipboard.
 DogmaResource getFirstOnClipboard()
          Returns the first DogmaResource currently on the clipboard.
static DogmaClipboard getInstance()
          Returns the singleton instance of DogmaClipboard
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DogmaClipboard getInstance()
Returns the singleton instance of DogmaClipboard

Returns:
the singleton instance of DogmaClipboard

add

public void add(DogmaResource resource)
Adds a single DogmaResource into clipboard.

Parameters:
resource - DogmaResource to be added

copyResources

public void copyResources(DogmaResourceTable model,
                          int[] rows)
Copies multiple row from a table of DogmaResources to the clipboard.

Parameters:
model - model KTableSortedModel presenting the contents
beginRow - number indicating the begin row
endRow - number indicating the end row

getFirstOnClipboard

public DogmaResource getFirstOnClipboard()
Returns the first DogmaResource currently on the clipboard.

Returns:
first DogmaResource on Clipboard or null, if Clipboard empty

getContents

public java.util.Vector<DogmaResource> getContents()
Returns a Vector of DogmaResources currently on the clipboard.

Returns:
contents of the clipboard in a Vector

dogmaResourceOnClipboard

public boolean dogmaResourceOnClipboard()
Function for checking the Clipboard status.

Returns:
true if DogmaResource(s) on Clipboard, otherwise false