Package java.text

Examples of java.text.DateFormatSymbols$DateFormatSymbolsGetter


   */
  private JPanel getCalendarPanel()
  {

    final JPanel p = new JPanel(new GridLayout(7, 7));
    final DateFormatSymbols dateFormatSymbols = new DateFormatSymbols();
    final String[] weekDays = dateFormatSymbols.getShortWeekdays();

    for (int i = 0; i < this.WEEK_DAYS.length; i++)
    {
      p.add(new JLabel(weekDays[this.WEEK_DAYS[i]],
          SwingConstants.CENTER));
View Full Code Here


    /**
     * Creates a new utility class for the default locale.
     */
    public SerialDateUtilities() {
        this.dateFormatSymbols = new DateFormatSymbols();
        this.weekdays = this.dateFormatSymbols.getWeekdays();
        this.months = this.dateFormatSymbols.getMonths();
    }
View Full Code Here

      if (getRangePeriodCount() > 0 && getRangeTimePeriod() != null)
      {
        if (getRangeTickFormatString() != null)
        {
          final SimpleDateFormat formatter = new SimpleDateFormat
              (getRangeTickFormatString(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
          numberAxis.setTickUnit
              (new DateTickUnit(getDateUnitAsInt(getRangeTimePeriod()), (int) getRangePeriodCount(), formatter));
        }
        else
        {
          numberAxis.setTickUnit
              (new DateTickUnit(getDateUnitAsInt(getRangeTimePeriod()), (int) getRangePeriodCount()));
        }
      }
      else if (getRangeTickFormatString() != null)
      {
        final SimpleDateFormat formatter = new SimpleDateFormat
            (getRangeTickFormatString(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
        numberAxis.setDateFormatOverride(formatter);
      }

    }
View Full Code Here

        if (getLinePeriodCount() > 0 && getLineTimePeriod() != null)
        {
          if (getLineTicksLabelFormat() != null)
          {
            final SimpleDateFormat formatter = new SimpleDateFormat
                (getLineTicksLabelFormat(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
            numberAxis.setTickUnit
                (new DateTickUnit(getDateUnitAsInt(getLineTimePeriod()), (int) getLinePeriodCount(), formatter));
          }
          else
          {
            numberAxis.setTickUnit
                (new DateTickUnit(getDateUnitAsInt(getLineTimePeriod()), (int) getLinePeriodCount()));
          }
        }
        else if (getRangeTickFormatString() != null)
        {
          final SimpleDateFormat formatter = new SimpleDateFormat
              (getRangeTickFormatString(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
          numberAxis.setDateFormatOverride(formatter);
        }
      }

      if (linesAxis != null)
View Full Code Here

    {
      final Locale locale = runtime.getResourceBundleFactory().getLocale();
      if (locale != null && locale.equals(lastLocale) == false)
      {
        lastLocale = locale;
        getSimpleDateFormat().setDateFormatSymbols(new DateFormatSymbols(locale));
        invalidateCache();
      }
    }
    return super.getValue(runtime, element);
  }
View Full Code Here

        if (getLinePeriodCount() > 0 && getLineTimePeriod() != null)
        {
          if (getLineTicksLabelFormat() != null)
          {
            final SimpleDateFormat formatter = new SimpleDateFormat
                (getLineTicksLabelFormat(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
            numberAxis.setTickUnit
                (new DateTickUnit(getDateUnitAsInt(getLineTimePeriod()), (int) getLinePeriodCount(), formatter));
          }
          else
          {
            numberAxis.setTickUnit
                (new DateTickUnit(getDateUnitAsInt(getLineTimePeriod()), (int) getLinePeriodCount()));
          }
        }
        else if (getRangeTickFormatString() != null)
        {
          final SimpleDateFormat formatter = new SimpleDateFormat
              (getRangeTickFormatString(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
          numberAxis.setDateFormatOverride(formatter);
        }
      }

      if (linesAxis != null)
View Full Code Here

    {
      final Locale locale = runtime.getResourceBundleFactory().getLocale();
      if (locale != null && locale.equals(lastLocale) == false)
      {
        lastLocale = locale;
        getSimpleDateFormat().setDateFormatSymbols(new DateFormatSymbols(locale));
      }
    }
    return super.getValue(runtime, element);
  }
View Full Code Here

      if (getDomainPeriodCount() > 0 && getDomainTimePeriod() != null)
      {
        if (getDomainTickFormatString() != null)
        {
          final SimpleDateFormat formatter = new SimpleDateFormat
              (getDomainTickFormatString(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
          numberAxis.setTickUnit
              (new DateTickUnit(getDateUnitAsInt(getDomainTimePeriod()), (int) getDomainPeriodCount(), formatter));
        }
        else
        {
          numberAxis.setTickUnit
              (new DateTickUnit(getDateUnitAsInt(getDomainTimePeriod()), (int) getDomainPeriodCount()));
        }
      }
    }

    if (domainAxis != null)
    {
      domainAxis.setLabel(getDomainTitle());
      if (getDomainTitleFont() != null)
      {
        domainAxis.setLabelFont(getDomainTitleFont());
      }
      domainAxis.setVerticalTickLabels(isDomainVerticalTickLabels());
      if (getDomainTickFont() != null)
      {
        domainAxis.setTickLabelFont(getDomainTickFont());
      }
      if (getDomainMinimum() != ValueAxis.DEFAULT_LOWER_BOUND)
      {
        domainAxis.setLowerBound(getDomainMinimum());
      }
      if (getDomainMaximum() != ValueAxis.DEFAULT_UPPER_BOUND)
      {
        domainAxis.setUpperBound(getDomainMaximum());
      }
    }

    final ValueAxis rangeAxis = plot.getRangeAxis();
    if (rangeAxis instanceof NumberAxis)
    {
      final NumberAxis numberAxis = (NumberAxis) rangeAxis;

      if (getRangePeriodCount() > 0)
      {
        if (getRangeTickFormat() != null)
        {
          numberAxis.setTickUnit(new NumberTickUnit(getRangePeriodCount(), getRangeTickFormat()));
        }
        else if (getRangeTickFormatString() != null)
        {
          final FastDecimalFormat formatter = new FastDecimalFormat
              (getRangeTickFormatString(), getResourceBundleFactory().getLocale());
          numberAxis.setTickUnit(new FastNumberTickUnit(getRangePeriodCount(), formatter));
        }
        else
        {
          numberAxis.setTickUnit(new FastNumberTickUnit(getRangePeriodCount()));
        }
      }
      else
      {
        if (getRangeTickFormat() != null)
        {
          numberAxis.setNumberFormatOverride(getRangeTickFormat());
        }
        else if (getRangeTickFormatString() != null)
        {
          final DecimalFormat formatter = new DecimalFormat
              (getRangeTickFormatString(), new DecimalFormatSymbols(getResourceBundleFactory().getLocale()));
          numberAxis.setNumberFormatOverride(formatter);
        }
      }
    }
    else if (rangeAxis instanceof DateAxis)
    {
      final DateAxis numberAxis = (DateAxis) rangeAxis;

      if (getRangePeriodCount() > 0 && getRangeTimePeriod() != null)
      {
        if (getRangeTickFormatString() != null)
        {
          final SimpleDateFormat formatter = new SimpleDateFormat
              (getRangeTickFormatString(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
          numberAxis.setTickUnit
              (new DateTickUnit(getDateUnitAsInt(getRangeTimePeriod()), (int) getRangePeriodCount(), formatter));
        }
        else
        {
          numberAxis.setTickUnit
              (new DateTickUnit(getDateUnitAsInt(getRangeTimePeriod()), (int) getRangePeriodCount()));
        }
      }
      else
      {
        if (getRangeTickFormatString() != null)
        {
          final SimpleDateFormat formatter = new SimpleDateFormat
              (getRangeTickFormatString(), new DateFormatSymbols(getResourceBundleFactory().getLocale()));
          numberAxis.setDateFormatOverride(formatter);
        }
      }
    }
View Full Code Here

        else
        {
          final SimpleDateFormat sformat = new SimpleDateFormat(formatString);
          if (locale != null)
          {
            sformat.setDateFormatSymbols(new DateFormatSymbols(locale));
          }
          else
          {
            final ResourceBundleFactory factory = getResourceBundleFactory();
            sformat.setDateFormatSymbols(new DateFormatSymbols(factory.getLocale()));
          }
          format = sformat;
          dateFormat = sformat;
          lastLocale = localeUsed;
        }
View Full Code Here

        formatStringRaw = "EEE MMM dd HH:mm:ss zzz yyyy";
      }
      final Locale locale = runtime.getResourceBundleFactory().getLocale();
      final TimeZone timeZone = runtime.getResourceBundleFactory().getTimeZone();
      final SimpleDateFormat dateFormat = new SimpleDateFormat(String.valueOf(formatStringRaw), locale);
      dateFormat.setDateFormatSymbols(new DateFormatSymbols(locale));
      dateFormat.setTimeZone(timeZone);
      return dateFormat.format(staticValue);
    }
    return ElementTypeUtils.queryFieldName(element);
  }
View Full Code Here

TOP

Related Classes of java.text.DateFormatSymbols$DateFormatSymbolsGetter

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.