| Line 37... |
Line 37... |
| 37 |
interface SelectionStyle extends CssResource {
|
37 |
interface SelectionStyle extends CssResource {
|
| 38 |
String selectedRow();
|
38 |
String selectedRow();
|
| 39 |
String fatalRow();
|
39 |
String fatalRow();
|
| 40 |
String criticalRow();
|
40 |
String criticalRow();
|
| 41 |
String badInventory();
|
41 |
String badInventory();
|
| - |
|
42 |
String todayShippingInStockRow();
|
| - |
|
43 |
String todayShippingNotInStockRow();
|
| - |
|
44 |
String laterShippingRow();
|
| 42 |
}
|
45 |
}
|
| 43 |
//add gin here
|
46 |
//add gin here
|
| 44 |
private static final OrderListUiBinder binder = GWT.create(OrderListUiBinder.class);
|
47 |
private static final OrderListUiBinder binder = GWT.create(OrderListUiBinder.class);
|
| 45 |
|
48 |
|
| 46 |
@UiField DataGrid<Order> table;
|
49 |
@UiField DataGrid<Order> table;
|
| Line 54... |
Line 57... |
| 54 |
public Boolean getValue(Order order) {
|
57 |
public Boolean getValue(Order order) {
|
| 55 |
return table.getSelectionModel().isSelected(order);
|
58 |
return table.getSelectionModel().isSelected(order);
|
| 56 |
}
|
59 |
}
|
| 57 |
};
|
60 |
};
|
| 58 |
|
61 |
|
| - |
|
62 |
private TextColumn<Order> transactionIdColumn = new TextColumn<Order>() {
|
| - |
|
63 |
@Override
|
| - |
|
64 |
public String getValue(Order order) {
|
| - |
|
65 |
return "" + order.getTransactionId();
|
| - |
|
66 |
}
|
| - |
|
67 |
};
|
| 59 |
|
68 |
|
| 60 |
private TextColumn<Order> promisedShippingDateColumn = new TextColumn<Order>() {
|
69 |
private TextColumn<Order> promisedShippingDateColumn = new TextColumn<Order>() {
|
| 61 |
@Override
|
70 |
@Override
|
| 62 |
public String getValue(Order order) {
|
71 |
public String getValue(Order order) {
|
| 63 |
return getDisplayableDate(new Date(order.getPromisedShippingTime()))+"";
|
72 |
return getDisplayableDate(new Date(order.getPromisedShippingTime()))+"";
|
| Line 192... |
Line 201... |
| 192 |
case ACCEPTANCE_DELAYED:
|
201 |
case ACCEPTANCE_DELAYED:
|
| 193 |
case VERIFICATION_DELAYED:
|
202 |
case VERIFICATION_DELAYED:
|
| 194 |
case ORDER_NOT_CONNECTED:
|
203 |
case ORDER_NOT_CONNECTED:
|
| 195 |
style = selectionStyle.criticalRow();
|
204 |
style = selectionStyle.criticalRow();
|
| 196 |
break;
|
205 |
break;
|
| - |
|
206 |
case TODAY_SHIPPING_IN_STOCK:
|
| - |
|
207 |
style = selectionStyle.todayShippingInStockRow();
|
| - |
|
208 |
break;
|
| - |
|
209 |
case TODAY_SHIPPING_NOT_IN_STOCK:
|
| - |
|
210 |
style = selectionStyle.todayShippingNotInStockRow();
|
| - |
|
211 |
break;
|
| - |
|
212 |
case LATER_SHIPPING:
|
| - |
|
213 |
style = selectionStyle.laterShippingRow();
|
| - |
|
214 |
break;
|
| 197 |
case WARNING:
|
215 |
case WARNING:
|
| 198 |
case NONE:
|
216 |
case NONE:
|
| 199 |
}
|
217 |
}
|
| 200 |
if(order.getProductCondition()==1) {
|
218 |
if(order.getProductCondition()==1) {
|
| 201 |
style = selectionStyle.badInventory();
|
219 |
style = selectionStyle.badInventory();
|
| Line 207... |
Line 225... |
| 207 |
|
225 |
|
| 208 |
|
226 |
|
| 209 |
// Add the columns.
|
227 |
// Add the columns.
|
| 210 |
table.addColumn(checkboxColumn,"");
|
228 |
table.addColumn(checkboxColumn,"");
|
| 211 |
table.addColumn(promisedShippingDateColumn, "Promised Shipping");
|
229 |
table.addColumn(promisedShippingDateColumn, "Promised Shipping");
|
| - |
|
230 |
table.addColumn(transactionIdColumn, "Transaction Id");
|
| 212 |
table.addColumn(paymentModeColumn, "Type");
|
231 |
table.addColumn(paymentModeColumn, "Type");
|
| 213 |
table.addColumn(orderFromColumn, "Order From");
|
232 |
table.addColumn(orderFromColumn, "Order From");
|
| 214 |
table.addColumn(idColumn, "Order Id");
|
233 |
table.addColumn(idColumn, "Order Id");
|
| 215 |
table.addColumn(productDescriptionColumn, "Product Description");
|
234 |
table.addColumn(productDescriptionColumn, "Product Description");
|
| 216 |
table.addColumn(creationDateColumn, "Creation Date");
|
235 |
table.addColumn(creationDateColumn, "Creation Date");
|
| Line 218... |
Line 237... |
| 218 |
// table.addColumn(expectedDeliveryDateColumn, "Expected Delivery");
|
237 |
// table.addColumn(expectedDeliveryDateColumn, "Expected Delivery");
|
| 219 |
table.addColumn(statusMessageColumn, "Current Status");
|
238 |
table.addColumn(statusMessageColumn, "Current Status");
|
| 220 |
|
239 |
|
| 221 |
//Set the widths
|
240 |
//Set the widths
|
| 222 |
table.setWidth("100%");
|
241 |
table.setWidth("100%");
|
| 223 |
table.setColumnWidth(checkboxColumn, 30, Unit.PX);
|
242 |
table.setColumnWidth(checkboxColumn, 20, Unit.PX);
|
| 224 |
table.setColumnWidth(promisedShippingDateColumn, 140.0, Unit.PX);
|
243 |
table.setColumnWidth(promisedShippingDateColumn, 120.0, Unit.PX);
|
| - |
|
244 |
table.setColumnWidth(transactionIdColumn, 70.0, Unit.PX);
|
| 225 |
table.setColumnWidth(paymentModeColumn, 60.0, Unit.PX);
|
245 |
table.setColumnWidth(paymentModeColumn, 50.0, Unit.PX);
|
| 226 |
table.setColumnWidth(idColumn, 70.0, Unit.PX);
|
246 |
table.setColumnWidth(idColumn, 70.0, Unit.PX);
|
| 227 |
table.setColumnWidth(orderFromColumn, 70.0, Unit.PX);
|
247 |
table.setColumnWidth(orderFromColumn, 70.0, Unit.PX);
|
| 228 |
table.setColumnWidth(productDescriptionColumn, 230.0, Unit.PX);
|
248 |
table.setColumnWidth(productDescriptionColumn, 230.0, Unit.PX);
|
| 229 |
table.setColumnWidth(creationDateColumn, 140.0, Unit.PX);
|
249 |
table.setColumnWidth(creationDateColumn, 120.0, Unit.PX);
|
| 230 |
// table.setColumnWidth(promisedDeliveryDateColumn, 140.0, Unit.PX);
|
250 |
// table.setColumnWidth(promisedDeliveryDateColumn, 140.0, Unit.PX);
|
| 231 |
// table.setColumnWidth(expectedDeliveryDateColumn, 140.0, Unit.PX);
|
251 |
// table.setColumnWidth(expectedDeliveryDateColumn, 140.0, Unit.PX);
|
| 232 |
table.setColumnWidth(statusMessageColumn, 180.0, Unit.PX);
|
252 |
table.setColumnWidth(statusMessageColumn, 170.0, Unit.PX);
|
| 233 |
|
253 |
|
| 234 |
table.setRowCount(count, true);
|
254 |
table.setRowCount(count, true);
|
| 235 |
table.setVisibleRange(start, orders.size());
|
255 |
table.setVisibleRange(start, orders.size());
|
| 236 |
|
256 |
|
| 237 |
// Connect the table to the data provider.
|
257 |
// Connect the table to the data provider.
|