Package org.apache.isis.core.metamodel.facets.objpropparam.typicallen

Examples of org.apache.isis.core.metamodel.facets.objpropparam.typicallen.TypicalLengthFacet


        if(renderFacet != null && !renderFacet.isNoop()) {
            RenderFacetRepr renderFacetRepr = new RenderFacetRepr();
            renderFacetRepr.value = renderFacet.value();
            memberRepr.render = renderFacetRepr;
        }
        TypicalLengthFacet typicalLengthFacet = assoc.getFacet(TypicalLengthFacet.class);
        if(typicalLengthFacet != null && !typicalLengthFacet.isNoop()) {
            TypicalLengthFacetRepr typicalLengthFacetRepr = new TypicalLengthFacetRepr();
            typicalLengthFacetRepr.value = typicalLengthFacet.value();
            memberRepr.typicalLength = typicalLengthFacetRepr;
        }

        final List<ObjectAction> actions = objectSpec.getObjectActions(
                ActionType.USER, Contributed.INCLUDED, ObjectAction.Filters.memberOrderOf(assoc));
View Full Code Here


        final FacetedMethodParameter facetHolder = processParameterContext.getFacetHolder();
        addFacetDerivedFromTypeIfPresent(facetHolder, type);
    }

    private void addFacetDerivedFromTypeIfPresent(final FacetHolder holder, final Class<?> type) {
        final TypicalLengthFacet facet = getTypicalLengthFacet(type);
        if (facet != null) {
            FacetUtil.addFacet(new TypicalLengthFacetOnParameterDerivedFromType(facet, holder));
        }
    }
View Full Code Here

        final FacetedMethod facetHolder = processMethodContext.getFacetHolder();
        addFacetDerivedFromTypeIfPresent(facetHolder, type);
    }

    private void addFacetDerivedFromTypeIfPresent(final FacetHolder holder, final Class<?> type) {
        final TypicalLengthFacet facet = getTypicalLengthFacet(type);
        if (facet != null) {
            FacetUtil.addFacet(new TypicalLengthFacetOnPropertyDerivedFromType(facet, holder));
        }
    }
View Full Code Here

        super(FeatureType.PROPERTIES_ONLY);
    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        TypicalLengthFacet facet = createFromMetadataPropertiesIfPossible(processMethodContext);
        if(facet == null) {
            facet = createFromAnnotationIfPossible(processMethodContext);
        }

        // no-op if null
View Full Code Here

        FacetUtil.addFacet(facet);
    }

    @Override
    public void process(ProcessContributeeMemberContext processMemberContext) {
        TypicalLengthFacet facet = createFromMetadataPropertiesIfPossible(processMemberContext);

        // no-op if null
        FacetUtil.addFacet(facet);
    }
View Full Code Here

        return facet.value();
    }

    @Override
    public int getTypicalLineLength() {
        final TypicalLengthFacet facet = getFacet(TypicalLengthFacet.class);
        return facet.value();
    }
View Full Code Here

        if (param.getSpecification().getFacet(ParseableFacet.class) != null) {
            final int maxLength = param.getFacet(MaxLengthFacet.class).value();
            field.setMaxLength(maxLength);

            final TypicalLengthFacet typicalLengthFacet = param.getFacet(TypicalLengthFacet.class);
            if (typicalLengthFacet.isDerived() && maxLength > 0) {
                field.setWidth(maxLength);
            } else {
                field.setWidth(typicalLengthFacet.value());
            }

            final MultiLineFacet multiLineFacet = param.getFacet(MultiLineFacet.class);
            field.setHeight(multiLineFacet.numberOfLines());
            field.setWrapped(!multiLineFacet.preventWrapping());
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.objpropparam.typicallen.TypicalLengthFacet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.