Runtime

## 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.

Constructor Summary
`BooleanPropertyHelper(EObject element)` Constructor

Method Summary
`protected abstract boolean` `getBooleanValue()` Clients should overwrite to get the boolean value from the property.
`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`

Constructor Detail

### BooleanPropertyHelper

    public BooleanPropertyHelper(EObject element)

  Constructor

Parameters:
  `element` - The element that owns the property

Method Detail

### 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 EObject getElement()

  Returns:
    Returns the element that owns the property.

Runtime

Guidelines for using Eclipse APIs.

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