📄 wrapper.java
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2008-6-14 13:30:40
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: Wrapper.java
package org.displaytag.sample.decorators;
import java.text.DecimalFormat;
import org.apache.commons.lang.time.FastDateFormat;
import org.displaytag.decorator.TableDecorator;
import org.displaytag.sample.ListObject;
public class Wrapper extends TableDecorator
{
public Wrapper()
{
dateFormat = FastDateFormat.getInstance("MM/dd/yy");
moneyFormat = new DecimalFormat("$ #,###,###.00");
}
public String getNullValue()
{
return null;
}
public String getDate()
{
return dateFormat.format(((ListObject)getCurrentRowObject()).getDate());
}
public String getMoney()
{
return moneyFormat.format(((ListObject)getCurrentRowObject()).getMoney());
}
public String getLink1()
{
ListObject object = (ListObject)getCurrentRowObject();
int index = getListIndex();
return "<a href=\"details.jsp?index=" + index + "\">" + object.getId() + "</a>";
}
public String getLink2()
{
ListObject object = (ListObject)getCurrentRowObject();
int id = object.getId();
return "<a href=\"details.jsp?id=" + id + "&action=view\">View</a> | " + "<a href=\"details.jsp?id=" + id + "&action=edit\">Edit</a> | " + "<a href=\"details.jsp?id=" + id + "&action=delete\">Delete</a>";
}
private FastDateFormat dateFormat;
private DecimalFormat moneyFormat;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -