org.eclipse.gmf.runtime.emf.ui.properties.util
Class BooleanPropertyHelper
java.lang.Object
org.eclipse.gmf.runtime.emf.ui.properties.util.BooleanPropertyHelper
-
public abstract class BooleanPropertyHelper
- extends java.lang.Object
Helper class used by boolean-based property descriptors and cell editors. It
provides for conversion from/to objects used by cell editors. It also
provides abstract methods to set/get the actual property.
Method Summary
|
protected abstract boolean
|
getBooleanValue
()
Clients should overwrite to get the boolean value from the property. |
org.eclipse.emf.ecore.EObject
|
getElement
()
|
java.lang.Integer
|
getValue
()
Gets the Integer representation of the boolean property. |
boolean
|
isCompatible
(java.lang.Object obj)
Checks if the provided object is compatible with the boolean based
property. |
protected abstract void
|
setBooleanValue
(boolean value)
Clients should overwrite to set the boolean value to the property. |
void
|
setValue
(java.lang.Object value)
Sets the value to the boolean property. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
BooleanPropertyHelper
public BooleanPropertyHelper(org.eclipse.emf.ecore.EObject element)
- Constructor
-
Parameters:
-
element
- The element that owns the property
isCompatible
public boolean isCompatible(java.lang.Object obj)
- Checks if the provided object is compatible with the boolean based
property. This implementation requires the value to be of type Integer.
This method may be overwritten but only in conjunction with setValue().
-
-
Parameters:
-
obj
- Object to be checked
-
Returns:
- 'true' if the object is compatible
setValue
public void setValue(java.lang.Object value)
- Sets the value to the boolean property. If the object (value) is not
compatible, throws the IllegalArgumentException exception. This
implementation requires the value to be of type Integer. This method may
be overwritten but only in conjunction with isCompatible().
-
-
Parameters:
-
value
- Value to be set
setBooleanValue
protected abstract void setBooleanValue(boolean value)
- Clients should overwrite to set the boolean value to the property.
-
-
Parameters:
-
value
- Boolean value to be set
getValue
public java.lang.Integer getValue()
- Gets the Integer representation of the boolean property.
-
-
Returns:
- Integer representation of the boolean property
getBooleanValue
protected abstract boolean getBooleanValue()
- Clients should overwrite to get the boolean value from the property.
-
-
Returns:
- Boolean value from the property
getElement
public org.eclipse.emf.ecore.EObject getElement()
-
-
Returns:
- Returns the element that owns the property.
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.