Examples of Resolution


Examples of com.vaadin.shared.ui.datefield.Resolution

                // Update the value based on the received info
                // Must set in this order to avoid invalid dates (or wrong
                // dates if lenient is true) in calendar
                for (int r = Resolution.YEAR.ordinal(); r >= 0; r--) {
                    Resolution res = Resolution.values()[r];
                    if (calendarFieldChanges.containsKey(res)) {

                        // Field resolution should be included. Others are
                        // skipped so that client can not make unexpected
                        // changes (e.g. day change even though resolution is
                        // year).
                        Integer newValue = calendarFieldChanges.get(res);
                        cal.set(res.getCalendarField(), newValue);
                    }
                }
                newDate = cal.getTime();
            }
View Full Code Here

Examples of com.vaadin.shared.ui.datefield.Resolution

public class TextualDateConnector extends AbstractDateFieldConnector {

    @Override
    public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
        Resolution origRes = getWidget().getCurrentResolution();
        String oldLocale = getWidget().getCurrentLocale();
        super.updateFromUIDL(uidl, client);
        if (origRes != getWidget().getCurrentResolution()
                || oldLocale != getWidget().getCurrentLocale()) {
            // force recreating format string
View Full Code Here

Examples of com.vaadin.shared.ui.datefield.Resolution

        // specifies
        getWidget().setShowISOWeekNumbers(
                uidl.getBooleanAttribute(DateFieldConstants.ATTR_WEEK_NUMBERS)
                        && getWidget().dts.getFirstDayOfWeek() == 1);

        Resolution newResolution;
        if (uidl.hasVariable("sec")) {
            newResolution = Resolution.SECOND;
        } else if (uidl.hasVariable("min")) {
            newResolution = Resolution.MINUTE;
        } else if (uidl.hasVariable("hour")) {
            newResolution = Resolution.HOUR;
        } else if (uidl.hasVariable("day")) {
            newResolution = Resolution.DAY;
        } else if (uidl.hasVariable("month")) {
            newResolution = Resolution.MONTH;
        } else {
            newResolution = Resolution.YEAR;
        }

        // Remove old stylename that indicates current resolution
        setWidgetStyleName(
                getWidget().getStylePrimaryName()
                        + "-"
                        + VDateField.resolutionToString(getWidget()
                                .getCurrentResolution()), false);

        getWidget().setCurrentResolution(newResolution);

        // Add stylename that indicates current resolution
        setWidgetStyleName(
                getWidget().getStylePrimaryName()
                        + "-"
                        + VDateField.resolutionToString(getWidget()
                                .getCurrentResolution()), true);

        final Resolution resolution = getWidget().getCurrentResolution();
        final int year = uidl.getIntVariable("year");
        final int month = (resolution.getCalendarField() >= Resolution.MONTH
                .getCalendarField()) ? uidl.getIntVariable("month") : -1;
        final int day = (resolution.getCalendarField() >= Resolution.DAY
                .getCalendarField()) ? uidl.getIntVariable("day") : -1;
        final int hour = (resolution.getCalendarField() >= Resolution.HOUR
                .getCalendarField()) ? uidl.getIntVariable("hour") : 0;
        final int min = (resolution.getCalendarField() >= Resolution.MINUTE
                .getCalendarField()) ? uidl.getIntVariable("min") : 0;
        final int sec = (resolution.getCalendarField() >= Resolution.SECOND
                .getCalendarField()) ? uidl.getIntVariable("sec") : 0;

        // Construct new date for this datefield (only if not null)
        if (year > -1) {
            getWidget().setCurrentDate(
View Full Code Here

Examples of com.vaadin.shared.ui.datefield.Resolution

        resoSelect.addValueChangeListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {

                Resolution r = (Resolution) resoSelect.getValue();
                inlineDynamicDateField.setResolution(r);
                dynamicDateField.setResolution(r);

            }
        });
View Full Code Here

Examples of com.vaadin.shared.ui.datefield.Resolution

    private void updateValuesForDateField(DateField df) {
        Date fromVal = fromRange.getValue();
        Date toVal = toRange.getValue();
        Date value = valueDF.getValue();
        Resolution r = (Resolution) resoSelect.getValue();
        boolean immediate = immediateCB.getValue();

        df.setValue(value);
        df.setResolution(r);
        df.setRangeStart(fromVal);
View Full Code Here

Examples of edu.hawaii.ics.csdl.jupiter.model.reviewissue.Resolution

    this.major = new Severity(ResourceBundleKey.ITEM_KEY_SEVERITY_MAJOR, 1);
    this.normal = new Severity(ResourceBundleKey.ITEM_KEY_SEVERITY_NORMAL, 2);
    this.minor = new Severity(ResourceBundleKey.ITEM_KEY_SEVERITY_MINOR, 3);
    this.trivial = new Severity(ResourceBundleKey.ITEM_KEY_SEVERITY_TRIVIAL, 4);
    String resolutionKey = ResourceBundleKey.ITEM_KEY_UNSET;
    this.unset = new Resolution(resolutionKey, 0);
    resolutionKey = ResourceBundleKey.ITEM_KEY_RESOLUTION_VALID_NEEDSFIXING;
    this.validNeedsfixing = new Resolution(resolutionKey, 1);
    resolutionKey = ResourceBundleKey.ITEM_KEY_RESOLUTION_VALID_FIXLATER;
    this.validFixlater = new Resolution(resolutionKey, 2);
    resolutionKey = ResourceBundleKey.ITEM_KEY_RESOLUTION_VALID_DUPLICATE;
    this.validDuplicate = new Resolution(resolutionKey, 3);
    resolutionKey = ResourceBundleKey.ITEM_KEY_RESOLUTION_VALID_WONTFIX;
    this.validWontfix = new Resolution(resolutionKey, 4);
    resolutionKey = ResourceBundleKey.ITEM_KEY_RESOLUTION_INVALID_WONTFIX;
    this.invalidWontfix = new Resolution(resolutionKey, 5);
    resolutionKey = ResourceBundleKey.ITEM_KEY_RESOLUTION_UNSURE_VALIDITY;
    this.unsureValidity = new Resolution(resolutionKey, 6);
    this.unresolved = new Status(ResourceBundleKey.ITEM_KEY_STATUS_UNRESOLVED, 0);
    this.resolved = new Status(ResourceBundleKey.ITEM_KEY_STATUS_RESOLVED, 1);
  }
View Full Code Here

Examples of mil.nga.giat.geowave.raster.Resolution

    final DataStatistics<?> stats = geowaveStatisticsStore.getDataStatistics(
        new ByteArrayId(
            coverageName),
        HistogramStatistics.STATS_ID);
    if ((stats != null) && (stats instanceof HistogramStatistics)) {
      return ((HistogramStatistics) stats).getHistogram(new Resolution(
          new double[] {
            resX,
            resY
          }));
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.Resolution

     * @param context the current execution context
     * @return the Resolution produced by calling context.proceed()
     * @throws Exception if the Tuscany injection process produced unrecoverable errors
     */
    public Resolution intercept(ExecutionContext context) throws Exception {
        Resolution resolution = context.proceed();
        log.debug("Running Tuscany dependency injection for instance of ",
                  context.getActionBean().getClass().getSimpleName());
        TuscanyHelper.injectBeans(context.getActionBean(), context.getActionBeanContext());
        return resolution;
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.Resolution

     */
  public Resolution intercept(ExecutionContext context) throws Exception {
    LifecycleStage stage = context.getLifecycleStage();
        ActionBeanContext abc = context.getActionBeanContext();
        String event = abc == null ? null : abc.getEventName();
        Resolution resolution = null;

    // Run @Before methods, as long as there's a bean to run them on
    if (context.getActionBean() != null) {
            ActionBean bean = context.getActionBean();
            FilterMethods filterMethods = getFilterMethods(bean.getClass());
      List<Method> beforeMethods = filterMethods.getBeforeMethods(stage);

            for (Method method : beforeMethods) {
                String[] on = method.getAnnotation(Before.class).on();
                if (event == null || CollectionUtil.applies(on, event)) {
                    resolution = invoke(bean, method, stage, Before.class);
                    if (resolution != null) {
                        return resolution;
                    }
                }
            }
        }

        // Continue on and execute other filters and the lifecycle code
        resolution = context.proceed();

        // Run After filter methods (if any)
        if (context.getActionBean() != null) {
            ActionBean bean = context.getActionBean();
            FilterMethods filterMethods = getFilterMethods(bean.getClass());
            List<Method> afterMethods = filterMethods.getAfterMethods(stage);

            // Re-get the event name in case we're executing after handler resolution
            // in which case the name will have been null before, and non-null now
            event = abc == null ? null : abc.getEventName();

            Resolution overrideResolution = null;
            for (Method method : afterMethods) {
                String[] on = method.getAnnotation(After.class).on();
                if (event == null || CollectionUtil.applies(on, event)) {
                    overrideResolution = invoke(bean, method, stage, After.class);
                    if (overrideResolution != null) {
View Full Code Here

Examples of net.sourceforge.stripes.action.Resolution

     * @return an ActionBean that will render a view for the user, or null
     * @since Stripes 1.3
     */
    protected ActionBean handleActionBeanNotFound(ActionBeanContext context, String urlBinding) {
        ActionBean bean = null;
        Resolution view = findView(urlBinding);

        if (view != null) {
            log.debug("Could not find an ActionBean bound to '", urlBinding, "', but found a view ",
                      "at '", view, "'. Forwarding the user there instead.");
            bean = new DefaultViewActionBean(view);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.