/** * Creates a new column that shows the covered count for the given entity. * * @param entity * counter entity for this column * @param locale * locale for rendering numbers * @return column instance */ public static CounterColumn newCovered(final CounterEntity entity, final Locale locale) { return new CounterColumn(entity, locale, CounterComparator.COVEREDITEMS .reverse().on(entity)) { @Override protected int getValue(final ICounter counter) { return counter.getCoveredCount(); } }; }
/** * Creates a new column that shows the total count for the given entity. * * @param entity * counter entity for this column * @param locale * locale for rendering numbers * @return column instance */ public static CounterColumn newTotal(final CounterEntity entity, final Locale locale) { return new CounterColumn(entity, locale, CounterComparator.TOTALITEMS .reverse().on(entity)) { @Override protected int getValue(final ICounter counter) { return counter.getTotalCount(); } }; }
/** * Creates a new column that shows the missed count for the given entity. * * @param entity * counter entity for this column * @param locale * locale for rendering numbers * @return column instance */ public static CounterColumn newMissed(final CounterEntity entity, final Locale locale) { return new CounterColumn(entity, locale, CounterComparator.MISSEDITEMS .reverse().on(entity)) { @Override protected int getValue(final ICounter counter) { return counter.getMissedCount(); } }; }
/** * Creates a new column that is based on the {@link ICounter} for the given * entity. * * @param entity * counter entity for visualization * @param locale * locale for rendering numbers */ public BarColumn(final CounterEntity entity, final Locale locale) { this.entity = entity; this.integerFormat = DecimalFormat.getIntegerInstance(locale); this.comparator = new TableItemComparator(CounterComparator.MISSEDITEMS .reverse().on(entity) .second(CounterComparator.TOTALITEMS.reverse().on(entity))); }