- performance enhancement: turn off grid stripe
This commit is contained in:
parent
60143c031e
commit
336b9784f7
|
@ -32,10 +32,19 @@ public class Grid extends org.zkoss.zul.Grid
|
|||
*/
|
||||
private static final long serialVersionUID = -8286221761079570001L;
|
||||
private boolean noStrip = false;
|
||||
|
||||
public void makeNoStrip() {
|
||||
setStyle("border: none");
|
||||
setOddRowSclass("even");
|
||||
private String oddRowSclass;
|
||||
|
||||
public Grid() {
|
||||
super();
|
||||
//cache default
|
||||
oddRowSclass = super.getOddRowSclass();
|
||||
super.setOddRowSclass(oddRowSclass);
|
||||
}
|
||||
|
||||
public void makeNoStrip() {
|
||||
setStyle("border: none");
|
||||
// setOddRowSclass("even");
|
||||
setOddRowSclass(null);
|
||||
noStrip = true;
|
||||
}
|
||||
|
||||
|
@ -54,4 +63,21 @@ public class Grid extends org.zkoss.zul.Grid
|
|||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOddRowSclass() {
|
||||
if (oddRowSclass == null)
|
||||
return null;
|
||||
else
|
||||
return super.getOddRowSclass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOddRowSclass(String scls) {
|
||||
if (scls != null && scls.length() == 0)
|
||||
oddRowSclass = null;
|
||||
else
|
||||
oddRowSclass = scls;
|
||||
super.setOddRowSclass(scls);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ public class GridPanel extends Borderlayout implements EventListener
|
|||
{
|
||||
this.windowNo = windowNo;
|
||||
listbox = new Grid();
|
||||
listbox.setOddRowSclass(null);
|
||||
south = new South();
|
||||
this.appendChild(south);
|
||||
|
||||
|
|
Loading…
Reference in New Issue