org.drools.eclipse.flow.common.editor.core
Class DefaultElementWrapper

java.lang.Object
  extended by org.drools.eclipse.flow.common.editor.core.DefaultElementWrapper
All Implemented Interfaces:
Serializable, ElementWrapper, org.eclipse.ui.views.properties.IPropertySource
Direct Known Subclasses:
AbstractNodeWrapper, ElementContainerElementWrapper

public abstract class DefaultElementWrapper
extends Object
implements ElementWrapper, org.eclipse.ui.views.properties.IPropertySource, Serializable

Default wrapper of a model element.

See Also:
Serialized Form

Field Summary
protected  org.eclipse.swt.graphics.Color color
           
static String COLOR
           
protected static org.eclipse.ui.views.properties.IPropertyDescriptor[] DESCRIPTORS
           
static String ID
           
static String NAME
           
 
Fields inherited from interface org.drools.eclipse.flow.common.editor.core.ElementWrapper
CHANGE_CONSTRAINT, CHANGE_ID, CHANGE_INCOMING_CONNECTIONS, CHANGE_NAME, CHANGE_OUTGOING_CONNECTIONS
 
Constructor Summary
DefaultElementWrapper()
           
 
Method Summary
 void addIncomingConnection(ElementConnection connection)
           
 void addListener(ModelListener listener)
           
 void addOutgoingConnection(ElementConnection connection)
           
 org.eclipse.swt.graphics.Color getColor()
           
 org.eclipse.draw2d.geometry.Rectangle getConstraint()
           
 Object getEditableValue()
           
 Object getElement()
           
 List<ElementConnection> getIncomingConnections()
           
 List<ElementConnection> getOutgoingConnections()
           
 ElementContainer getParent()
           
 org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
           
 Object getPropertyValue(Object id)
           
static org.eclipse.swt.graphics.RGB integerToRGB(Integer color)
           
protected  void internalAddIncomingConnection(ElementConnection connection)
           
protected  void internalAddOutgoingConnection(ElementConnection connection)
           
protected  org.eclipse.swt.graphics.Color internalGetColor()
           
protected abstract  org.eclipse.draw2d.geometry.Rectangle internalGetConstraint()
           
protected  void internalRemoveIncomingConnection(ElementConnection connection)
           
protected  void internalRemoveOutgoingConnection(ElementConnection connection)
           
protected  void internalSetColor(Integer color)
           
protected abstract  void internalSetConstraint(org.eclipse.draw2d.geometry.Rectangle constraint)
           
protected  void internalSetName(String name)
           
 boolean isPropertySet(Object id)
           
 void localAddIncomingConnection(ElementConnection connection)
           
 void localAddOutgoingConnection(ElementConnection connection)
           
protected  void notifyListeners(int change)
           
 void removeIncomingConnection(ElementConnection connection)
           
 void removeListener(ModelListener listener)
           
 void removeOutgoingConnection(ElementConnection connection)
           
 void resetPropertyValue(Object id)
           
static Integer RGBToInteger(org.eclipse.swt.graphics.RGB rgb)
           
 void setColor(org.eclipse.swt.graphics.Color color)
           
 void setConstraint(org.eclipse.draw2d.geometry.Rectangle constraint)
           
protected  void setElement(Object element)
           
 void setName(String name)
           
 void setParent(ElementContainer parent)
           
 void setPropertyValue(Object id, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.drools.eclipse.flow.common.editor.core.ElementWrapper
acceptsIncomingConnection, acceptsOutgoingConnection, getId, getName
 

Field Detail

DESCRIPTORS

protected static org.eclipse.ui.views.properties.IPropertyDescriptor[] DESCRIPTORS

NAME

public static final String NAME
See Also:
Constant Field Values

ID

public static final String ID
See Also:
Constant Field Values

COLOR

public static final String COLOR
See Also:
Constant Field Values

color

protected org.eclipse.swt.graphics.Color color
Constructor Detail

DefaultElementWrapper

public DefaultElementWrapper()
Method Detail

setElement

protected void setElement(Object element)

getElement

public Object getElement()

setConstraint

public void setConstraint(org.eclipse.draw2d.geometry.Rectangle constraint)
Specified by:
setConstraint in interface ElementWrapper

internalSetConstraint

protected abstract void internalSetConstraint(org.eclipse.draw2d.geometry.Rectangle constraint)

getConstraint

public org.eclipse.draw2d.geometry.Rectangle getConstraint()
Specified by:
getConstraint in interface ElementWrapper

internalGetConstraint

protected abstract org.eclipse.draw2d.geometry.Rectangle internalGetConstraint()

setParent

public void setParent(ElementContainer parent)
Specified by:
setParent in interface ElementWrapper

getParent

public ElementContainer getParent()
Specified by:
getParent in interface ElementWrapper

getOutgoingConnections

public List<ElementConnection> getOutgoingConnections()
Specified by:
getOutgoingConnections in interface ElementWrapper

getIncomingConnections

public List<ElementConnection> getIncomingConnections()
Specified by:
getIncomingConnections in interface ElementWrapper

addIncomingConnection

public void addIncomingConnection(ElementConnection connection)
Specified by:
addIncomingConnection in interface ElementWrapper

localAddIncomingConnection

public void localAddIncomingConnection(ElementConnection connection)
Specified by:
localAddIncomingConnection in interface ElementWrapper

internalAddIncomingConnection

protected void internalAddIncomingConnection(ElementConnection connection)

removeIncomingConnection

public void removeIncomingConnection(ElementConnection connection)
Specified by:
removeIncomingConnection in interface ElementWrapper

internalRemoveIncomingConnection

protected void internalRemoveIncomingConnection(ElementConnection connection)

addOutgoingConnection

public void addOutgoingConnection(ElementConnection connection)
Specified by:
addOutgoingConnection in interface ElementWrapper

localAddOutgoingConnection

public void localAddOutgoingConnection(ElementConnection connection)
Specified by:
localAddOutgoingConnection in interface ElementWrapper

internalAddOutgoingConnection

protected void internalAddOutgoingConnection(ElementConnection connection)

removeOutgoingConnection

public void removeOutgoingConnection(ElementConnection connection)
Specified by:
removeOutgoingConnection in interface ElementWrapper

internalRemoveOutgoingConnection

protected void internalRemoveOutgoingConnection(ElementConnection connection)

setName

public void setName(String name)
Specified by:
setName in interface ElementWrapper

internalSetName

protected void internalSetName(String name)

getColor

public org.eclipse.swt.graphics.Color getColor()

internalGetColor

protected org.eclipse.swt.graphics.Color internalGetColor()

setColor

public void setColor(org.eclipse.swt.graphics.Color color)

internalSetColor

protected void internalSetColor(Integer color)

addListener

public void addListener(ModelListener listener)
Specified by:
addListener in interface ElementWrapper

removeListener

public void removeListener(ModelListener listener)
Specified by:
removeListener in interface ElementWrapper

notifyListeners

protected void notifyListeners(int change)

getPropertyDescriptors

public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySource

getEditableValue

public Object getEditableValue()
Specified by:
getEditableValue in interface org.eclipse.ui.views.properties.IPropertySource

isPropertySet

public boolean isPropertySet(Object id)
Specified by:
isPropertySet in interface org.eclipse.ui.views.properties.IPropertySource

getPropertyValue

public Object getPropertyValue(Object id)
Specified by:
getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource

resetPropertyValue

public void resetPropertyValue(Object id)
Specified by:
resetPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource

setPropertyValue

public void setPropertyValue(Object id,
                             Object value)
Specified by:
setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource

RGBToInteger

public static Integer RGBToInteger(org.eclipse.swt.graphics.RGB rgb)

integerToRGB

public static org.eclipse.swt.graphics.RGB integerToRGB(Integer color)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.