com.ebmwebsourcing.webdesigner.presentation.gwt.client.metamodel.properties
Class DiagramProperty<T>
java.lang.Object
com.ebmwebsourcing.webdesigner.presentation.gwt.client.metamodel.properties.DiagramProperty<T>
- Type Parameters:
T - The property value type
- All Implemented Interfaces:
- HasValueAndDefaultValues<T>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.ui.HasValue<T>
public class DiagramProperty<T>
- extends java.lang.Object
- implements HasValueAndDefaultValues<T>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>
This class is the base for the property system
It uses generics. A property system allows to define models containing custom properties.
- Author:
- enhan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DiagramProperty
public DiagramProperty(java.lang.String name,
T defaultValue,
DiagramModel owner)
- Builds a DiagramProperty for a model. It's only a template.
To create the property and assign it to a real DiagramElementInstance, see createNewInstanceOfProperty
- Parameters:
name - the property namedefaultValue - a default value for the property (can't be null)owner - the model where the property belongs
addHandler
protected final <H extends com.google.gwt.event.shared.EventHandler> com.google.gwt.event.shared.HandlerRegistration addHandler(H handler,
com.google.gwt.event.shared.GwtEvent.Type<H> type)
- Adds this handler to the property.
- Type Parameters:
H - the type of handler to add- Parameters:
type - the event typehandler - the handler
- Returns:
HandlerRegistration used to remove the handler
ensureHandlers
protected com.google.gwt.event.shared.HandlerManager ensureHandlers()
fireEvent
public void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
- Specified by:
fireEvent in interface com.google.gwt.event.shared.HasHandlers
getName
public java.lang.String getName()
getElementInstance
public DiagramElementInstance getElementInstance()
getNameValuePair
public com.gwtext.client.core.NameValuePair getNameValuePair()
getDefaultValue
public T getDefaultValue()
- Specified by:
getDefaultValue in interface HasValueAndDefaultValues<T>
setDefaultValue
public void setDefaultValue(T v)
- Specified by:
setDefaultValue in interface HasValueAndDefaultValues<T>
getValue
public T getValue()
- Specified by:
getValue in interface com.google.gwt.user.client.ui.HasValue<T>
setObjectValue
public void setObjectValue(java.lang.Object value,
boolean fireEvent)
setValue
public void setValue(T arg0)
- Specified by:
setValue in interface com.google.gwt.user.client.ui.HasValue<T>
setValue
public void setValue(T arg0,
boolean arg1)
- Specified by:
setValue in interface com.google.gwt.user.client.ui.HasValue<T>
addValueChangeHandler
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<T> handler)
- Specified by:
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<T>
createNewInstanceOfProperty
public DiagramProperty<T> createNewInstanceOfProperty(DiagramElementInstance instance)
copyPropertyValue
public void copyPropertyValue(DiagramProperty<?> property)
Copyright © 2010 eBM WebSourcing. All Rights Reserved.