no message
This commit is contained in:
18
src/Common/Visual/Tables/DateRenderer_.java
Normal file
18
src/Common/Visual/Tables/DateRenderer_.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
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) ? "нет" : CommonUtils.print_date(value));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user