Search in sources :

Example 16 with Order

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;
}
Also used : Order(org.eclipse.scout.rt.platform.Order)

Example 17 with Order

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;
}
Also used : EitherOrNode(org.eclipse.scout.rt.client.ui.form.fields.composer.node.EitherOrNode) Order(org.eclipse.scout.rt.platform.Order) ConfigOperation(org.eclipse.scout.rt.platform.annotations.ConfigOperation)

Example 18 with Order

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;
}
Also used : EitherOrNode(org.eclipse.scout.rt.client.ui.form.fields.composer.node.EitherOrNode) Order(org.eclipse.scout.rt.platform.Order) ConfigOperation(org.eclipse.scout.rt.platform.annotations.ConfigOperation)

Example 19 with Order

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();
    }
}
Also used : IDataModelEntity(org.eclipse.scout.rt.shared.data.model.IDataModelEntity) Order(org.eclipse.scout.rt.platform.Order) ConfigOperation(org.eclipse.scout.rt.platform.annotations.ConfigOperation)

Example 20 with Order

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();
    }
}
Also used : IDataModelEntity(org.eclipse.scout.rt.shared.data.model.IDataModelEntity) Order(org.eclipse.scout.rt.platform.Order) ConfigOperation(org.eclipse.scout.rt.platform.annotations.ConfigOperation)

Aggregations

Order (org.eclipse.scout.rt.platform.Order)26 ConfigOperation (org.eclipse.scout.rt.platform.annotations.ConfigOperation)20 IDataModelEntity (org.eclipse.scout.rt.shared.data.model.IDataModelEntity)4 EntityNode (org.eclipse.scout.rt.client.ui.form.fields.composer.node.EntityNode)3 LinkedList (java.util.LinkedList)2 ITreeNode (org.eclipse.scout.rt.client.ui.basic.tree.ITreeNode)2 EitherOrNode (org.eclipse.scout.rt.client.ui.form.fields.composer.node.EitherOrNode)2 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 Calendar (java.util.Calendar)1 HashSet (java.util.HashSet)1 TreeMap (java.util.TreeMap)1 BookmarkServiceEvent (org.eclipse.scout.rt.client.services.common.bookmark.BookmarkServiceEvent)1 BookmarkServiceListener (org.eclipse.scout.rt.client.services.common.bookmark.BookmarkServiceListener)1 IBookmarkService (org.eclipse.scout.rt.client.services.common.bookmark.IBookmarkService)1 FormFieldProvisioningContext (org.eclipse.scout.rt.client.services.lookup.FormFieldProvisioningContext)1 ILookupCallProvisioningService (org.eclipse.scout.rt.client.services.lookup.ILookupCallProvisioningService)1 ITable (org.eclipse.scout.rt.client.ui.basic.table.ITable)1 ITableRow (org.eclipse.scout.rt.client.ui.basic.table.ITableRow)1 IColumn (org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn)1