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.emf.ui.properties.util
Class BooleanPropertyHelper

java.lang.Object
  extended by 
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 (org.eclipse.emf.ecore.EObject element)
          Constructor
 
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
 

Constructor Detail

BooleanPropertyHelper

public BooleanPropertyHelper(org.eclipse.emf.ecore.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 org.eclipse.emf.ecore.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.


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