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.services.properties.extended
Class PropertySource

java.lang.Object
  extended by 
org.eclipse.gmf.runtime.common.ui.services.properties.extended.PropertySource
All Implemented Interfaces:
IExtendedPropertySource, ICompositePropertySource, IPropertySource

public class PropertySource
extends java.lang.Object
implements IExtendedPropertySource


Field Summary
protected   ICompositePropertySource enclosed
          ICompositePropertySource
protected  java.util.Map properties
          map containing properties key: id Value: property
protected  java.util.Map propertyDescriptors
          map containing propertyDescriptors key: id value: propertydescriptor
 
Constructor Summary
PropertySource ()
          basic constructor
PropertySource (java.lang.Object element)
          The constructor which accepts an element object as an argument.
 
Method Summary
 void addProperty (java.lang.Object id, java.lang.Object property)
          add properties to the properties map
 void addPropertyDescriptor ( IExtendedPropertyDescriptor propertyDescriptor)
          Adds propertyDescriptor to this property source.
 void addPropertySource ( ICompositePropertySource source)
          Add enclosed property source object (a child) - this creates a linked list of property sources
 java.lang.Object getEditableValue ()
          getter for the editable value
 java.lang.Object getElement ()
          Returns the element.
 java.util.Map getProperties ()
          Returns the properties.
  IExtendedPropertyDescriptor getPropertyDescriptor (java.lang.Object id)
          Gets IExtendedPropertyDescriptor
  IPropertyDescriptor[] getPropertyDescriptors ()
           
 java.lang.Object getPropertyValue (java.lang.Object id)
           
 boolean isDirty ()
          Return if the dirty flag.
 boolean isPropertySet (java.lang.Object id)
           
 boolean isValueOkay (java.lang.Object id, java.lang.Object value)
          checks to see if the value entered is the same as the BLANK value displayed in multiple select.
 void refresh ()
          Refresh properties
 void removeProperty (java.lang.Object id)
          removes properties from the properties map
 void resetPropertyValue (java.lang.Object id)
           
 void setDirty (boolean flag)
          Set the dirty flag to boolean.
 void setEditableValue (java.lang.Object object)
          Deprecated.   
 void setElement (java.lang.Object element)
          Sets the element.
 void setProperties (java.util.Map properties)
          Sets the properties.
 void setPropertyDescriptors (java.util.Map propertyDescriptors)
          Sets the propertyDescriptors.
 void setPropertyValue (java.lang.Object id, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected java.util.Map properties
map containing properties key: id Value: property


propertyDescriptors

protected java.util.Map propertyDescriptors
map containing propertyDescriptors key: id value: propertydescriptor


enclosed

protected 
ICompositePropertySource enclosed
ICompositePropertySource

Constructor Detail

PropertySource

public PropertySource()
basic constructor


PropertySource

public PropertySource(java.lang.Object element)
The constructor which accepts an element object as an argument.

Parameters:
element - The element which is in the selection
Method Detail

addPropertySource

public void addPropertySource(
ICompositePropertySource source)
Add enclosed property source object (a child) - this creates a linked list of property sources

Specified by:
addPropertySource in interface ICompositePropertySource
Parameters:
source - - an eclosed (a child) property source object

getEditableValue

public java.lang.Object getEditableValue()
getter for the editable value

Specified by:
getEditableValue in interface IPropertySource
See Also:
IPropertySource.getEditableValue()

setEditableValue

public void setEditableValue(java.lang.Object object)
Deprecated. 

Setter of the editor value

Parameters:
object -

getPropertyDescriptors

public 
IPropertyDescriptor[] getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface IPropertySource
See Also:
IPropertySource.getPropertyDescriptors()

addPropertyDescriptor

public void addPropertyDescriptor(
IExtendedPropertyDescriptor propertyDescriptor)
Adds propertyDescriptor to this property source. Also sets back link from property descriptor to this property source.

Specified by:
addPropertyDescriptor in interface IExtendedPropertySource
Parameters:
propertyDescriptor - IExtendedPropertyDescriptor descriptor to be added

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object id)
Specified by:
getPropertyValue in interface IPropertySource
See Also:
IPropertySource.getPropertyValue(Object)

isPropertySet

public boolean isPropertySet(java.lang.Object id)
Specified by:
isPropertySet in interface IPropertySource
See Also:
IPropertySource.isPropertySet(Object)

resetPropertyValue

public void resetPropertyValue(java.lang.Object id)
Specified by:
resetPropertyValue in interface IPropertySource
See Also:
IPropertySource.resetPropertyValue(Object)

setPropertyValue

public void setPropertyValue(java.lang.Object id,
                             java.lang.Object value)
Specified by:
setPropertyValue in interface IPropertySource
See Also:
IPropertySource.setPropertyValue(Object, Object)

getElement

public java.lang.Object getElement()
Returns the element.

Specified by:
getElement in interface IExtendedPropertySource
Returns:
Object

setElement

public void setElement(java.lang.Object element)
Sets the element.

Specified by:
setElement in interface IExtendedPropertySource
Parameters:
element - The modelElement to set

addProperty

public void addProperty(java.lang.Object id,
                        java.lang.Object property)
add properties to the properties map

Specified by:
addProperty in interface IExtendedPropertySource
Parameters:
id - Object
property - Object

removeProperty

public void removeProperty(java.lang.Object id)
removes properties from the properties map

Specified by:
removeProperty in interface IExtendedPropertySource
Parameters:
id - Object

getPropertyDescriptor

public 
IExtendedPropertyDescriptor getPropertyDescriptor(java.lang.Object id)
Gets IExtendedPropertyDescriptor

Parameters:
id - The id of the property descriptor.
Returns:
the IExtendedPropertyDescriptor

isDirty

public boolean isDirty()
Description copied from interface: IExtendedPropertySource
Return if the dirty flag.

Specified by:
isDirty in interface IExtendedPropertySource
Returns:
flag: True means dirty and viceversa.
See Also:
IExtendedPropertySource.isDirty()

setDirty

public void setDirty(boolean flag)
Description copied from interface: IExtendedPropertySource
Set the dirty flag to boolean. This functionality is used when the property source itself is a value of a property and we need to show some value other than the editable value in case of multiple select unequal value.

Specified by:
setDirty in interface IExtendedPropertySource
Parameters:
flag - : Flag = true means dirty, Flag = false means not dirty.
See Also:
IExtendedPropertySource.setDirty(boolean)

getProperties

public java.util.Map getProperties()
Returns the properties.

Specified by:
getProperties in interface IExtendedPropertySource
Returns:
Map

setProperties

public void setProperties(java.util.Map properties)
Sets the properties.

Parameters:
properties - The properties to set

setPropertyDescriptors

public void setPropertyDescriptors(java.util.Map propertyDescriptors)
Sets the propertyDescriptors.

Parameters:
propertyDescriptors - The propertyDescriptors to set

refresh

public void refresh()
Description copied from interface: IExtendedPropertySource
Refresh properties

Specified by:
refresh in interface IExtendedPropertySource
See Also:
IExtendedPropertySource.refresh()

isValueOkay

public boolean isValueOkay(java.lang.Object id,
                           java.lang.Object value)
checks to see if the value entered is the same as the BLANK value displayed in multiple select. If it is the same as BLANK value, return false; else return true

Specified by:
isValueOkay in interface IExtendedPropertySource
Parameters:
id - property id
value - value to verify
Returns:
true if value is ok, false otherwise

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