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.diagram.core.preferences
Class PreferencesHint

java.lang.Object
  extended by 
org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint

public class PreferencesHint
extends java.lang.Object

This specifies the hint with which a preference store containing the diagram preferences will be registered against in the preferences registry. This hint will be passed around and when a view is created it will use this hint to initialize its properties based on the values in the preference store registered against this hint in the preferences registry.


Field Summary
static  PreferencesHint USE_DEFAULTS
          The hint that indicates there are no preferences to be used for the generic diagram preferences, instead use the default values.
 
Constructor Summary
PreferencesHint (java.lang.String id)
          Creates a new instance.
 
Method Summary
 boolean equals (java.lang.Object arg0)
           
 java.lang.Object getPreferenceStore ()
          Gets the preference store registered with the preference hint given.
 int hashCode ()
           
static boolean registerPreferenceStore ( PreferencesHint preferencesHint, java.lang.Object preferenceStore)
          Registers a preference store containing some or all of the generic diagram preferences (those preferences defined in the diagram layer) to a preference hint.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_DEFAULTS

public static 
PreferencesHint USE_DEFAULTS
The hint that indicates there are no preferences to be used for the generic diagram preferences, instead use the default values.

Constructor Detail

PreferencesHint

public PreferencesHint(java.lang.String id)
Creates a new instance.

Parameters:
id - the unique id string of this hint
Method Detail

equals

public boolean equals(java.lang.Object arg0)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

registerPreferenceStore

public static boolean registerPreferenceStore(
PreferencesHint preferencesHint,
                                              java.lang.Object preferenceStore)
Registers a preference store containing some or all of the generic diagram preferences (those preferences defined in the diagram layer) to a preference hint. When a diagram preference is needed, it will be retrieved from the preference store using the hint specified in the root editpart. This allows each diagram editor to have its own diagram preferences. The preference store is only registered against the hint given if there is not already a preference store registered with that same preference hint.

Parameters:
preferencesHint - the preference hint for which the preferences store is to be associated
preferenceStore - the preference store initialized with the diagram preferences (an instance of IPreferenceStore)
Returns:
true if the preference store was successfully registered; false otherwise

getPreferenceStore

public java.lang.Object getPreferenceStore()
Gets the preference store registered with the preference hint given.

Parameters:
preferenceHint - the preference hint
Returns:
the preference store (an instance of IPreferenceStore) registered with the preferences hint given; if no preference store has been registered with this hint the preference store with the default values is returned.

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