Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.common.ui.action.actions.global
Class ClipboardManager

java.lang.Object
  extended by 
org.eclipse.gmf.runtime.common.ui.action.actions.global.ClipboardManager

public final class ClipboardManager
extends java.lang.Object

This class is used to add/retrieve data to/from the system clipboard. This class should be used within the global action infrastructure framework.


Field Summary
static java.lang.String COMMON_FORMAT
          String constant for the common format (paste on ME or a daigram (usually as a result of Harvesting)
 
Method Summary
 void addToCache (java.lang.Object data, Transfer dataType)
          Adds data to the internal cache.
 void addToCache (java.lang.Object data, Transfer dataType, ClipboardState state)
          Adds data to the internal cache.
protected  void clearCache ()
          Clear the cache
 boolean doesCacheHaveType ( Transfer dataType)
          Checks if the cache has the specified transfer agent
 boolean doesClipboardHaveData (java.lang.String format, ClipboardContentsHelper contentsHelper)
          Checks if the system clipboard has any ICustomData with the specified format
 boolean doesClipboardHaveData ( Transfer dataType, ClipboardContentsHelper contentsHelper)
          Checks if the system clipboard has any data with the specified transfer agent
 void flushCacheToClipboard ()
          Flushes the chache to the system clipboard and clears the cache NOTE: visibility changed from (protected) to (public) to support Harvesting feature
 java.lang.String[] getAvailableTypeNames ()
          Returns a platform specific list of the data types currently available on the system clipboard.
 java.lang.Object getClipboardContents ( Transfer dataType, ClipboardContentsHelper helper)
          Returns the system clipboard contents
 ICustomData[] getClipboardData (java.lang.String format, ClipboardContentsHelper contentsHelper)
          Gets the ICustomData associated with the specified format from the system clipboard.
  ClipboardState getClipboardState ()
           
static  ClipboardManager getInstance ()
          Return the singleton.
 void removeFromCache ( Transfer dataType)
          Removes the transfer agent from the cache
 void setClipboardState ( ClipboardState clipboardState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMON_FORMAT

public static final java.lang.String COMMON_FORMAT
String constant for the common format (paste on ME or a daigram (usually as a result of Harvesting)

See Also:
Constant Field Values
Method Detail

getInstance

public static 
ClipboardManager getInstance()
Return the singleton.

Returns:
a singleton instance of ClipboardManager

getClipboardContents

public java.lang.Object getClipboardContents(
Transfer dataType,
                                             
ClipboardContentsHelper helper)
Returns the system clipboard contents

Parameters:
dataType - The transfer agent
Returns:
Object Data associated with the transfer agent

addToCache

public void addToCache(java.lang.Object data,
                       
Transfer dataType)
Adds data to the internal cache. The clipboard state is reset to NORMAL.

Parameters:
data - The data for the transfer agent
dataType - The transfer agent

addToCache

public void addToCache(java.lang.Object data,
                       
Transfer dataType,
                       
ClipboardState state)
Adds data to the internal cache. The clipboard state is set to the specified value.

Parameters:
data - The data for the transfer agent
dataType - The transfer agent
state - The clipboard state

flushCacheToClipboard

public void flushCacheToClipboard()
Flushes the chache to the system clipboard and clears the cache NOTE: visibility changed from (protected) to (public) to support Harvesting feature


clearCache

protected void clearCache()
Clear the cache


getAvailableTypeNames

public java.lang.String[] getAvailableTypeNames()
Returns a platform specific list of the data types currently available on the system clipboard.

Note: getAvailableTypeNames is a utility for writing a Transfer sub-class. It should NOT be used within an application because it provides platform specific information.

Returns:
a platform specific list of the data types currently available on the system clipboard

removeFromCache

public void removeFromCache(
Transfer dataType)
Removes the transfer agent from the cache

Parameters:
dataType - The transfer agent

doesCacheHaveType

public boolean doesCacheHaveType(
Transfer dataType)
Checks if the cache has the specified transfer agent

Parameters:
dataType - The transfer agent
Returns:
boolean

doesClipboardHaveData

public boolean doesClipboardHaveData(java.lang.String format,
                                     
ClipboardContentsHelper contentsHelper)
Checks if the system clipboard has any ICustomData with the specified format

Parameters:
format - The format
Returns:
boolean

doesClipboardHaveData

public boolean doesClipboardHaveData(
Transfer dataType,
                                     
ClipboardContentsHelper contentsHelper)
Checks if the system clipboard has any data with the specified transfer agent

Parameters:
dataType - The transfer agent
Returns:
boolean

getClipboardData

public ICustomData[] getClipboardData(java.lang.String format,
                                      
ClipboardContentsHelper contentsHelper)
Gets the ICustomData associated with the specified format from the system clipboard.

Parameters:
format - The format
Returns:
ICustomData[]

getClipboardState

public 
ClipboardState getClipboardState()
Returns:
Returns the clipboard state.

setClipboardState

public void setClipboardState(
ClipboardState clipboardState)
Parameters:
clipboardState - The clipboard state to set.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire