use of org.eclipse.scout.rt.platform.Order in project scout.rt by eclipse.
the class AbstractColumn method calculateViewOrder.
/**
* Calculates the column's view order, e.g. if the @Order annotation is set to 30.0, the method will return 30.0. If
* no {@link Order} annotation is set, the method checks its super classes for an @Order annotation.
*
* @since 3.10.0-M4
*/
@SuppressWarnings("squid:S1244")
protected double calculateViewOrder() {
double viewOrder = getConfiguredViewOrder();
Class<?> cls = getClass();
if (viewOrder == IOrdered.DEFAULT_ORDER) {
while (cls != null && IColumn.class.isAssignableFrom(cls)) {
if (cls.isAnnotationPresent(Order.class)) {
Order order = (Order) cls.getAnnotation(Order.class);
return order.value();
}
cls = cls.getSuperclass();
}
}
return viewOrder;
}
use of org.eclipse.scout.rt.platform.Order in project scout.rt by eclipse.
the class AbstractComposerField method execCreateAdditionalOrNode.
/**
* Override this method to decorate or enhance new nodes whenever they are created
*
* @return the new node or null to ignore the add of a new node of this type
* <p>
* Normally overrides call super.{@link #interceptCreateAdditionalOrNode(ITreeNode, boolean)}
*/
@ConfigOperation
@Order(140)
protected EitherOrNode execCreateAdditionalOrNode(ITreeNode eitherOrNode, boolean negated) {
EitherOrNode node = new EitherOrNode(this, false);
node.setNegative(negated);
node.setStatus(ITreeNode.STATUS_INSERTED);
return node;
}
use of org.eclipse.scout.rt.platform.Order in project scout.rt by eclipse.
the class AbstractComposerField method execCreateEitherNode.
/**
* Override this method to decorate or enhance new nodes whenever they are created
*
* @return the new node or null to ignore the add of a new node of this type
* <p>
* Normally overrides call super.{@link #interceptCreateEitherNode(ITreeNode, boolean)}
*/
@ConfigOperation
@Order(130)
protected EitherOrNode execCreateEitherNode(ITreeNode parentNode, boolean negated) {
EitherOrNode node = new EitherOrNode(this, true);
node.setNegative(negated);
node.setStatus(ITreeNode.STATUS_INSERTED);
return node;
}
use of org.eclipse.scout.rt.platform.Order in project scout.rt by eclipse.
the class AbstractComposerField method execResolveRootPathForTopLevelAttribute.
/**
* see {@link #interceptResolveAttributePath(AttributeNode)}
*/
@ConfigOperation
@Order(98)
protected void execResolveRootPathForTopLevelAttribute(IDataModelAttribute a, List<IDataModelEntity> lifeList) {
IDataModelEntity tmp = (a != null ? a.getParentEntity() : null);
while (tmp != null) {
lifeList.add(0, tmp);
tmp = tmp.getParentEntity();
}
}
use of org.eclipse.scout.rt.platform.Order in project scout.rt by eclipse.
the class AbstractComposerField method execResolveRootPathForTopLevelEntity.
/**
* see {@link #interceptResolveEntityPath(EntityNode)}
*/
@ConfigOperation
@Order(98)
protected void execResolveRootPathForTopLevelEntity(IDataModelEntity e, List<IDataModelEntity> lifeList) {
IDataModelEntity tmp = (e != null ? e.getParentEntity() : null);
while (tmp != null) {
lifeList.add(0, tmp);
tmp = tmp.getParentEntity();
}
}
Aggregations