18 package org.turro.financials.linetype;
20 import java.util.logging.Level;
21 import java.util.logging.Logger;
22 import org.turro.string.Strings;
23 import org.turro.elephant.context.ElephantContext;
24 import org.turro.financials.contract.OperatingModifierListbox;
25 import org.turro.financials.entity.AccountPosition;
26 import org.turro.financials.entity.LineType;
27 import org.turro.financials.entity.LineTypeAccount;
28 import org.turro.financials.entity.LineTypeAccountType;
29 import org.turro.financials.entity.OperatingModifier;
30 import org.turro.financials.entity.RegisterView;
31 import org.turro.financials.view.ViewListbox;
32 import org.turro.i18n.I_;
33 import org.turro.zkoss.grid.CollectionGrid;
34 import org.turro.zkoss.grid.EditableCell;
35 import org.zkoss.zk.ui.HtmlBasedComponent;
36 import org.zkoss.zk.ui.ext.AfterCompose;
37 import org.zkoss.zul.Row;
82 ltatl.setMold(
"select");
88 apl.setMold(
"select");
100 oml.setAllowNull(
true);
101 oml.setMold(
"select");
105 return super.createEditor(editableCell);
131 return super.formatCell(editableCell, value);
134 private void addColumns() {
136 addColumn(
I_.
get(
"Type"), org.turro.financials.entity.LineTypeAccountType.class,
137 "type",
null, 0,
false,
false).setWidth(
"150px");
139 "typeValue",
"0.00", 2,
false,
false).setWidth(
"100px");
141 "pattern",
null, 0,
false,
false);
142 addColumn(
I_.
get(
"Position"), org.turro.financials.entity.AccountPosition.class,
143 "position",
null, 0,
false,
false).setWidth(
"150px");
145 "coefficient",
"0.00", 2,
false,
false).setWidth(
"100px");
146 addColumn(
I_.
get(
"View"), org.turro.financials.entity.RegisterView.class,
147 "view",
null, 0,
false,
false).setWidth(
"250px");
148 addColumn(
"", org.turro.financials.entity.OperatingModifier.class,
149 "operatingModifier",
null, 0,
false,
false).setWidth(
"250px");
150 }
catch (ClassNotFoundException ex) {
151 Logger.getLogger(
LineTypeAccountGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
void setCoefficient(double coefficient)
LineTypeAccountType getType()
AccountPosition getPosition()
void setLineType(LineType lineType)
Set< LineTypeAccount > getLineTypeAccounts()
boolean deleteRow(Row row)
void initiateRow(Row row, LineTypeAccount value)
HtmlBasedComponent createEditor(EditableCell editableCell)
LineTypeAccountGrid(LineType lineType)
String formatCell(EditableCell editableCell, Object value)
boolean isValid(LineTypeAccount v)
static String byKey(String key)
static String get(String msg)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
Object getCellValue(EditableCell editableCell)
void setDefaultBehavior(boolean defaultBehavior)