Package org.rhq.coregui.client.components.table

Examples of org.rhq.coregui.client.components.table.TimestampCellFormatter


    protected ListGridField createStartedTimeField() {
        ListGridField startedTimeField = new ListGridField(AbstractOperationHistoryDataSource.Field.STARTED_TIME);
        startedTimeField.setAlign(Alignment.LEFT);
        startedTimeField.setCellAlign(Alignment.LEFT);
        startedTimeField.setCellFormatter(new TimestampCellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                if (value != null) {
                    return super.format(value, record, rowNum, colNum);
                } else {
                    return "<i>" + MSG.view_operationHistoryList_notYetStarted() + "</i>";
View Full Code Here


        IconField availabilityField = new IconField(AVAILABILITY.propertyName(), AVAILABILITY.title(), 70);
        fields.add(availabilityField);

        ListGridField ctimeField = new ListGridField(CTIME.propertyName(), CTIME.title(), 120);
        ctimeField.setCellFormatter(new TimestampCellFormatter());
        fields.add(ctimeField);

        ListGridField itimeField = new ListGridField(ITIME.propertyName(), ITIME.title(), 120);
        itimeField.setCellFormatter(new TimestampCellFormatter());
        fields.add(itimeField);

        ListGridField mtimeField = new ListGridField(MTIME.propertyName(), MTIME.title(), 120);
        mtimeField.setCellFormatter(new TimestampCellFormatter());
        fields.add(mtimeField);

        ListGridField modifiedByField = new ListGridField(MODIFIER.propertyName(), MODIFIER.title(), 100);
        fields.add(modifiedByField);
View Full Code Here

             */
            public ArrayList<ListGridField> getListGridFields() {
                ArrayList<ListGridField> fields = new ArrayList<ListGridField>(7);

                ListGridField ctimeField = new ListGridField(DriftDataSource.ATTR_CTIME, MSG.common_title_createTime());
                ctimeField.setCellFormatter(new TimestampCellFormatter());
                ctimeField.setShowHover(true);
                ctimeField.setHoverCustomizer(TimestampCellFormatter.getHoverCustomizer(DriftDataSource.ATTR_CTIME));
                fields.add(ctimeField);

                ListGridField categoryField = new ListGridField(DriftDataSource.ATTR_CATEGORY,
View Full Code Here

            MSG.common_title_value());
        fields.add(valueField);

        ListGridField timestampField = new ListGridField(MeasurementDataTraitCriteria.SORT_FIELD_TIMESTAMP,
            MSG.dataSource_traits_field_lastChanged());
        timestampField.setCellFormatter(new TimestampCellFormatter());
        timestampField.setShowHover(true);
        timestampField.setHoverCustomizer(TimestampCellFormatter
            .getHoverCustomizer(MeasurementDataTraitCriteria.SORT_FIELD_TIMESTAMP));
        timestampField.setWidth("20%");
        fields.add(timestampField);
View Full Code Here

        ListGridField changeSetField = new ListGridField(ATTR_CHANGE_SET_VERSION, MSG.view_drift_table_snapshot());
        changeSetField.setCanSortClientOnly(true);
        fields.add(changeSetField);

        ListGridField changeSetTimeField = new ListGridField(ATTR_CHANGE_SET_CTIME, MSG.view_drift_table_snapshotTime());
        changeSetTimeField.setCellFormatter(new TimestampCellFormatter());
        changeSetTimeField.setShowHover(true);
        changeSetTimeField.setHoverCustomizer(TimestampCellFormatter.getHoverCustomizer(ATTR_CHANGE_SET_CTIME));
        changeSetTimeField.setCanSortClientOnly(true);
        fields.add(changeSetTimeField);
View Full Code Here

     */
    public ArrayList<ListGridField> getListGridFields(boolean showResourceAncestry) {
        ArrayList<ListGridField> fields = new ArrayList<ListGridField>(7);

        ListGridField ctimeField = new ListGridField(AlertCriteria.SORT_FIELD_CTIME, MSG.common_title_createTime());
        ctimeField.setCellFormatter(new TimestampCellFormatter(TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
        ctimeField.setShowHover(true);
        ctimeField.setHoverCustomizer(TimestampCellFormatter.getHoverCustomizer(AlertCriteria.SORT_FIELD_CTIME));
        fields.add(ctimeField);

        ListGridField nameField = new ListGridField("name", MSG.common_title_name());
View Full Code Here

     */
    public ArrayList<ListGridField> getListGridFields() {
        ArrayList<ListGridField> fields = new ArrayList<ListGridField>(7);

        ListGridField ctimeField = new ListGridField(ATTR_CTIME, MSG.common_title_createTime());
        ctimeField.setCellFormatter(new TimestampCellFormatter());
        ctimeField.setShowHover(true);
        ctimeField.setHoverCustomizer(TimestampCellFormatter.getHoverCustomizer(ATTR_CTIME));
        fields.add(ctimeField);

        ListGridField changeSetDefField = new ListGridField(ATTR_CHANGESET_DEF_NAME, MSG.common_title_definition());
View Full Code Here

        });

        ListGridField lastCalculationTimeField = new ListGridField("lastCalculationTime",
            MSG.view_dynagroup_lastCalculationTime(), 175);
        //lastCalculationTimeField.setAlign(Alignment.CENTER);
        lastCalculationTimeField.setCellFormatter(new TimestampCellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                if (value == null) {
                    return MSG.common_val_never();
                }
                return super.format(value, record, rowNum, colNum);
            }
        });
        lastCalculationTimeField.setShowHover(true);
        lastCalculationTimeField.setHoverCustomizer(new HoverCustomizer() {
            public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
                String attribValue = record.getAttribute("lastCalculationTime");
                if (attribValue != null) {
                    return TimestampCellFormatter.getHoverDateString(new Date(Long.valueOf(attribValue).longValue()));
                } else {
                    return null;
                }
            }
        });

        ListGridField nextCalculationTimeField = new ListGridField("nextCalculationTime",
            MSG.view_dynagroup_nextCalculationTime(), 175);
        nextCalculationTimeField.setCellFormatter(new TimestampCellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                if (value == null || "0".equals(value.toString())) {
                    return MSG.common_val_na();
                }
                return super.format(value, record, rowNum, colNum);
View Full Code Here

    protected void onDraw() {
        super.onDraw();

        ListGridField timeNext = new ListGridField(ScheduledOperationsDataSource.Field.TIME.propertyName(),
            ScheduledOperationsDataSource.Field.TIME.title(), WIDTH_SCHEDULED_TIME);
        timeNext.setCellFormatter(new TimestampCellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                if (value != null) {
                    String timestamp = super.format(value, record, rowNum, colNum);
                    Integer id = record.getAttributeAsInt(AncestryUtil.RESOURCE_ID);
                    String url = null;
View Full Code Here

        ListGridField scheduleNameField = new ListGridField("scheduleName", MSG
            .dataSource_measurementOob_field_scheduleName());
        fields.add(scheduleNameField);

        ListGridField timestampField = new ListGridField("timestamp", MSG.common_title_timestamp());
        timestampField.setCellFormatter(new TimestampCellFormatter(TimestampCellFormatter.DATE_TIME_FORMAT_SHORT));
        timestampField.setShowHover(true);
        timestampField.setHoverCustomizer(TimestampCellFormatter.getHoverCustomizer("timestamp"));
        fields.add(timestampField);

        ListGridField bandField = new ListGridField("formattedBaseband", MSG
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.components.table.TimestampCellFormatter

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.