Files
VisualSapfor/src/Common/Visual/Tables/DateRenderer_.java
2024-10-11 00:00:30 +03:00

19 lines
613 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package Common.Visual.Tables;
import Common.Utils.Utils_;
import javax.swing.*;
import java.util.Date;
//название пересекается с встроенным классом поэтому подчеркивание.
public class DateRenderer_ extends RendererCell<Date> {
private static final Date zero = new Date(0);
@Override
public Date Init(JTable table, Object value, int row, int column) {
return (Date) value;
}
@Override
public void Display() {
if (value != null)
setText(value.equals(zero) ? "нет" : Utils_.print_date(value));
}
}