Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
f3212497
by Tony Chemit at 2017-07-19T00:04:41+02:00
4 changed files:
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUIInitializer.java
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIHandler.java
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java
- pom.xml
Changes:
| ... | ... | @@ -103,15 +103,11 @@ public class ObserveMainUIInitializer { |
| 103 | 103 |
if (source == null || !source.isOpen()) {
|
| 104 | 104 |
|
| 105 | 105 |
// no open data source
|
| 106 |
- if (log.isDebugEnabled()) {
|
|
| 107 |
- log.debug("No open Data source.");
|
|
| 108 |
- }
|
|
| 106 |
+ log.debug("No open Data source.");
|
|
| 109 | 107 |
return;
|
| 110 | 108 |
}
|
| 111 | 109 |
if (ui.getNavigation().isSelectionEmpty()) {
|
| 112 |
- if (log.isDebugEnabled()) {
|
|
| 113 |
- log.debug("No selection, show empty panel...");
|
|
| 114 |
- }
|
|
| 110 |
+ log.debug("No selection, show empty panel...");
|
|
| 115 | 111 |
|
| 116 | 112 |
boolean foundEmptySelection = false;
|
| 117 | 113 |
for (Component component : ui.getContent().getComponents()) {
|
| ... | ... | @@ -225,9 +221,7 @@ public class ObserveMainUIInitializer { |
| 225 | 221 |
}
|
| 226 | 222 |
}
|
| 227 | 223 |
if (focusOnNavigation) {
|
| 228 |
- if (log.isInfoEnabled()) {
|
|
| 229 |
- log.info("Focus on navigation: " + focusOwner);
|
|
| 230 |
- }
|
|
| 224 |
+ log.debug("Focus on navigation: " + focusOwner);
|
|
| 231 | 225 |
}
|
| 232 | 226 |
|
| 233 | 227 |
ContentUI<?, ?> previousSelectedContent = manager.getSelectedContentUI();
|
| ... | ... | @@ -126,9 +126,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 126 | 126 |
public void beforeInit(U ui) {
|
| 127 | 127 |
this.ui = ui;
|
| 128 | 128 |
prefix = "[" + ui.getClass().getSimpleName() + "] ";
|
| 129 |
- if (log.isDebugEnabled()) {
|
|
| 130 |
- log.debug("[" + this + "] for ui " + prefix);
|
|
| 131 |
- }
|
|
| 129 |
+ log.debug("[" + this + "] Before init " + prefix);
|
|
| 132 | 130 |
}
|
| 133 | 131 |
|
| 134 | 132 |
public void afterInit(U ui) {
|
| ... | ... | @@ -198,9 +196,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 198 | 196 |
}
|
| 199 | 197 |
}
|
| 200 | 198 |
|
| 201 |
- if (log.isDebugEnabled()) {
|
|
| 202 |
- log.debug("previousUI is in edit mode");
|
|
| 203 |
- }
|
|
| 199 |
+ log.debug("previousUI is in edit mode");
|
|
| 204 | 200 |
|
| 205 | 201 |
boolean wasClosed = true;
|
| 206 | 202 |
|
| ... | ... | @@ -247,9 +243,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 247 | 243 |
t("observe.choice.continue"),
|
| 248 | 244 |
t("observe.choice.cancel")},
|
| 249 | 245 |
0);
|
| 250 |
- if (log.isDebugEnabled()) {
|
|
| 251 |
- log.debug("response : " + reponse);
|
|
| 252 |
- }
|
|
| 246 |
+ log.debug("response : " + reponse);
|
|
| 253 | 247 |
switch (reponse) {
|
| 254 | 248 |
case JOptionPane.CLOSED_OPTION:
|
| 255 | 249 |
case 1:
|
| ... | ... | @@ -340,9 +334,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 340 | 334 |
ValidationContext context = applicationContext.getValidationContext();
|
| 341 | 335 |
context.cleanCache();
|
| 342 | 336 |
|
| 343 |
- if (log.isDebugEnabled()) {
|
|
| 344 |
- log.debug("ui " + ui.getClass());
|
|
| 345 |
- }
|
|
| 337 |
+ log.debug("Open ui " + ui.getClass());
|
|
| 346 | 338 |
// suppression des messages de validation
|
| 347 | 339 |
removeAllMessages(ui);
|
| 348 | 340 |
NavigationTree tree = getNavigationTree();
|
| ... | ... | @@ -373,9 +365,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 373 | 365 |
treeHelper.reloadSelectedNode(false, true);
|
| 374 | 366 |
|
| 375 | 367 |
NavigationTreeNodeSupport parentNode = treeHelper.getSelectedNode().getParent();
|
| 376 |
- if (log.isDebugEnabled()) {
|
|
| 377 |
- log.debug("PARENT NODE = " + parentNode);
|
|
| 378 |
- }
|
|
| 368 |
+ log.debug("PARENT NODE = " + parentNode);
|
|
| 379 | 369 |
treeHelper.addUnsavedNode(parentNode, getBeanType());
|
| 380 | 370 |
}
|
| 381 | 371 |
|
| ... | ... | @@ -390,10 +380,8 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 390 | 380 |
SwingUtilities.invokeLater(() -> {
|
| 391 | 381 |
mainUI.getNavigation().requestFocusInWindow();
|
| 392 | 382 |
|
| 393 |
- if (log.isInfoEnabled()) {
|
|
| 394 |
- log.info("Focus old owner: " + focusOwner);
|
|
| 395 |
- log.info("Focus new owner: " + mainUI.getFocusOwner());
|
|
| 396 |
- }
|
|
| 383 |
+ log.debug("Focus old owner: " + focusOwner);
|
|
| 384 |
+ log.debug("Focus new owner: " + mainUI.getFocusOwner());
|
|
| 397 | 385 |
});
|
| 398 | 386 |
}
|
| 399 | 387 |
});
|
| ... | ... | @@ -401,9 +389,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 401 | 389 |
FocusTraversalPolicy focusTraversalPolicy = ui.getFocusTraversalPolicy();
|
| 402 | 390 |
if (focusTraversalPolicy != null) {
|
| 403 | 391 |
JComponent firstComponent = (JComponent) focusTraversalPolicy.getFirstComponent(ui);
|
| 404 |
- if (log.isInfoEnabled()) {
|
|
| 405 |
- log.info("Grab focus on first component: " + firstComponent);
|
|
| 406 |
- }
|
|
| 392 |
+ log.debug("Grab focus on first component: " + firstComponent);
|
|
| 407 | 393 |
UIHelper.askFocus(firstComponent);
|
| 408 | 394 |
}
|
| 409 | 395 |
}
|
| ... | ... | @@ -492,9 +478,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 492 | 478 |
// on quite de suite
|
| 493 | 479 |
return;
|
| 494 | 480 |
}
|
| 495 |
- if (log.isInfoEnabled()) {
|
|
| 496 |
- log.info(prefix + "Will restart edit " + getUi().getClass().getName());
|
|
| 497 |
- }
|
|
| 481 |
+ log.debug(prefix + "Will restart edit " + getUi().getClass().getName());
|
|
| 498 | 482 |
|
| 499 | 483 |
// on ne peut redemarrer une edition que si la donnee
|
| 500 | 484 |
// est exactement une entites (pas possible sur une liste)
|
| ... | ... | @@ -531,9 +515,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 531 | 515 |
|
| 532 | 516 |
final boolean closeUI() {
|
| 533 | 517 |
boolean b = checkEdit(ui);
|
| 534 |
- if (log.isDebugEnabled()) {
|
|
| 535 |
- log.debug("Can close " + ui.getClass() + " : " + b);
|
|
| 536 |
- }
|
|
| 518 |
+ log.debug("Can close " + ui.getClass() + " : " + b);
|
|
| 537 | 519 |
if (b) {
|
| 538 | 520 |
closeSafeUI();
|
| 539 | 521 |
}
|
| ... | ... | @@ -609,9 +591,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 609 | 591 |
|
| 610 | 592 |
ImmutableMap.Builder<String, ReferentialReferenceSet<?>> modelReferentialReferenceSets = ImmutableMap.builder();
|
| 611 | 593 |
|
| 612 |
- if (log.isInfoEnabled()) {
|
|
| 613 |
- log.info("Update referential reference sets for: " + requestName);
|
|
| 614 |
- }
|
|
| 594 |
+ log.info("Update referential reference sets for: " + requestName);
|
|
| 615 | 595 |
|
| 616 | 596 |
// mettre à jour le cache de référentiel
|
| 617 | 597 |
ImmutableMap<Class<?>, ReferentialReferenceSet<?>> referentialReferenceSetsByType = getDataSource().updateReferentialReferenceSetsCache(requestName);
|
| ... | ... | @@ -640,14 +620,10 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 640 | 620 |
|
| 641 | 621 |
protected <D extends ReferentialDto> Collection<ReferentialReference<D>> filterReferentialReferences(Class<D> dtoType, String propertyName, LinkedList<ReferentialReference<D>> incomingReferences) {
|
| 642 | 622 |
|
| 643 |
- if (log.isDebugEnabled()) {
|
|
| 644 |
- log.debug(String.format("Filter referential references (type %s - property %s), original size: %d", dtoType.getSimpleName(), propertyName, incomingReferences.size()));
|
|
| 645 |
- }
|
|
| 623 |
+ log.debug(String.format("Filter referential references (type %s - property %s), original size: %d", dtoType.getSimpleName(), propertyName, incomingReferences.size()));
|
|
| 646 | 624 |
// by default always remove obsolete references
|
| 647 | 625 |
List<ReferentialReference<D>> referentialReferences = ReferentialReferences.filterEnabled(incomingReferences);
|
| 648 |
- if (log.isDebugEnabled()) {
|
|
| 649 |
- log.debug(String.format("Filter referential references (type %s - property %s), without diabled size: %d", dtoType.getSimpleName(), propertyName, incomingReferences.size()));
|
|
| 650 |
- }
|
|
| 626 |
+ log.debug(String.format("Filter referential references (type %s - property %s), without diabled size: %d", dtoType.getSimpleName(), propertyName, incomingReferences.size()));
|
|
| 651 | 627 |
return referentialReferences;
|
| 652 | 628 |
|
| 653 | 629 |
}
|
| ... | ... | @@ -811,9 +787,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 811 | 787 |
}
|
| 812 | 788 |
AbstractUIAction action = (AbstractUIAction) actionMap.get(actionId);
|
| 813 | 789 |
|
| 814 |
- if (log.isDebugEnabled()) {
|
|
| 815 |
- log.debug("update common action " + actionId);
|
|
| 816 |
- }
|
|
| 790 |
+ log.debug("update common action " + actionId);
|
|
| 817 | 791 |
|
| 818 | 792 |
action.updateAction(ui, button);
|
| 819 | 793 |
}
|
| ... | ... | @@ -968,9 +942,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 968 | 942 |
|
| 969 | 943 |
if (!"referentialListHeader".equals(propertyName) && (BooleanUtils.isTrue(noLoad) || getModel().getForm() == null)) {
|
| 970 | 944 |
|
| 971 |
- if (log.isInfoEnabled()) {
|
|
| 972 |
- log.info(String.format("Skip loading of BeanListHeader [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 973 |
- }
|
|
| 945 |
+ log.debug(String.format("Skip loading of BeanListHeader [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 974 | 946 |
data = Collections.emptyList();
|
| 975 | 947 |
|
| 976 | 948 |
} else {
|
| ... | ... | @@ -1000,9 +972,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 1000 | 972 |
|
| 1001 | 973 |
if (BooleanUtils.isTrue(noLoad) || getModel().getForm() == null) {
|
| 1002 | 974 |
|
| 1003 |
- if (log.isInfoEnabled()) {
|
|
| 1004 |
- log.info(String.format("Skip loading of BeanListHeader [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 1005 |
- }
|
|
| 975 |
+ log.debug(String.format("Skip loading of BeanListHeader [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 1006 | 976 |
data = Collections.emptyList();
|
| 1007 | 977 |
|
| 1008 | 978 |
} else {
|
| ... | ... | @@ -1031,9 +1001,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 1031 | 1001 |
|
| 1032 | 1002 |
if (BooleanUtils.isNotTrue(forceLoadComboBox) && (BooleanUtils.isTrue(noLoad) || getModel().getForm() == null)) {
|
| 1033 | 1003 |
|
| 1034 |
- if (log.isInfoEnabled()) {
|
|
| 1035 |
- log.info(String.format("Skip loading of comboBox [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 1036 |
- }
|
|
| 1004 |
+ log.debug(String.format("Skip loading of comboBox [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 1037 | 1005 |
data = Collections.emptyList();
|
| 1038 | 1006 |
|
| 1039 | 1007 |
} else {
|
| ... | ... | @@ -1053,9 +1021,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 1053 | 1021 |
|
| 1054 | 1022 |
}
|
| 1055 | 1023 |
|
| 1056 |
- if (log.isInfoEnabled()) {
|
|
| 1057 |
- log.info(String.format("comboBox [%s-%s] : %d", dtoClass.getSimpleName(), propertyName, data.size()));
|
|
| 1058 |
- }
|
|
| 1024 |
+ log.debug(String.format("comboBox [%s-%s] : %d", dtoClass.getSimpleName(), propertyName, data.size()));
|
|
| 1059 | 1025 |
|
| 1060 | 1026 |
comboBox.setData(data);
|
| 1061 | 1027 |
|
| ... | ... | @@ -1070,9 +1036,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 1070 | 1036 |
|
| 1071 | 1037 |
if (BooleanUtils.isTrue(noLoad) || getModel().getForm() == null) {
|
| 1072 | 1038 |
|
| 1073 |
- if (log.isInfoEnabled()) {
|
|
| 1074 |
- log.info(String.format("Skip loading of comboBox [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 1075 |
- }
|
|
| 1039 |
+ log.debug(String.format("Skip loading of comboBox [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName));
|
|
| 1076 | 1040 |
data = Collections.emptyList();
|
| 1077 | 1041 |
|
| 1078 | 1042 |
} else {
|
| ... | ... | @@ -1090,9 +1054,7 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 1090 | 1054 |
|
| 1091 | 1055 |
}
|
| 1092 | 1056 |
|
| 1093 |
- if (log.isInfoEnabled()) {
|
|
| 1094 |
- log.info(String.format("entity comboBox [%s-%s] : %d", dtoClass.getSimpleName(), propertyName, data.size()));
|
|
| 1095 |
- }
|
|
| 1057 |
+ log.debug(String.format("entity comboBox [%s-%s] : %d", dtoClass.getSimpleName(), propertyName, data.size()));
|
|
| 1096 | 1058 |
|
| 1097 | 1059 |
comboBox.setData(data);
|
| 1098 | 1060 |
}
|
| ... | ... | @@ -119,7 +119,7 @@ import static org.nuiton.i18n.I18n.t; |
| 119 | 119 |
|
| 120 | 120 |
/**
|
| 121 | 121 |
* To initialize ui.
|
| 122 |
- *
|
|
| 122 |
+ * <p>
|
|
| 123 | 123 |
* Created on 9/26/14.
|
| 124 | 124 |
*
|
| 125 | 125 |
* @author Tony Chemit - dev@tchemit.fr
|
| ... | ... | @@ -207,10 +207,6 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 207 | 207 |
|
| 208 | 208 |
public void initUI() {
|
| 209 | 209 |
|
| 210 |
- if (log.isDebugEnabled()) {
|
|
| 211 |
- log.debug("ui " + getClass());
|
|
| 212 |
- }
|
|
| 213 |
- |
|
| 214 | 210 |
ObserveActionMap actionMap = ObserveSwingApplicationContext.get().getActionMap();
|
| 215 | 211 |
InputMap inputMap = ObserveSwingApplicationContext.get().getMainUI().getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
|
| 216 | 212 |
// initialisation des éditeurs
|
| ... | ... | @@ -428,9 +424,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 428 | 424 |
|
| 429 | 425 |
beanList.setI18nPrefix("observe.common.");
|
| 430 | 426 |
|
| 431 |
- if (log.isInfoEnabled()) {
|
|
| 432 |
- log.info("init list for " + beanList.getBeanType());
|
|
| 433 |
- }
|
|
| 427 |
+ log.debug("init list for " + beanList.getBeanType());
|
|
| 434 | 428 |
|
| 435 | 429 |
Class dtoClass = getDtoClass(beanList);
|
| 436 | 430 |
|
| ... | ... | @@ -448,9 +442,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 448 | 442 |
beanList.getAddButton().setFocusable(false);
|
| 449 | 443 |
beanList.getRemoveButton().setFocusable(false);
|
| 450 | 444 |
|
| 451 |
- if (log.isInfoEnabled()) {
|
|
| 452 |
- log.info("init list for " + beanList.getBeanType());
|
|
| 453 |
- }
|
|
| 445 |
+ log.debug("init list for " + beanList.getBeanType());
|
|
| 454 | 446 |
|
| 455 | 447 |
Class dtoClass = getDtoClass(beanList);
|
| 456 | 448 |
|
| ... | ... | @@ -463,9 +455,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 463 | 455 |
}
|
| 464 | 456 |
|
| 465 | 457 |
protected void init(TimeEditor editor) {
|
| 466 |
- if (log.isDebugEnabled()) {
|
|
| 467 |
- log.debug("init time editor " + editor.getName());
|
|
| 468 |
- }
|
|
| 458 |
+ log.debug("init time editor " + editor.getName());
|
|
| 469 | 459 |
editor.init();
|
| 470 | 460 |
if (isAutoSelectOnFocus(editor)) {
|
| 471 | 461 |
|
| ... | ... | @@ -476,9 +466,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 476 | 466 |
}
|
| 477 | 467 |
|
| 478 | 468 |
protected void init(DateTimeEditor editor) {
|
| 479 |
- if (log.isDebugEnabled()) {
|
|
| 480 |
- log.debug("init date time editor " + editor.getName());
|
|
| 481 |
- }
|
|
| 469 |
+ log.debug("init date time editor " + editor.getName());
|
|
| 482 | 470 |
editor.init();
|
| 483 | 471 |
editor.getSliderHidor().setFocusable(false);
|
| 484 | 472 |
if (isAutoSelectOnFocus(editor)) {
|
| ... | ... | @@ -500,9 +488,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 500 | 488 |
Object oldValue = UIHelper.getProperty(editor.getModel().getBean(), editor.getModel().getPropertyDayDate());
|
| 501 | 489 |
if (!Objects.equals(oldValue, newDate)) {
|
| 502 | 490 |
editor.getDayDateEditor().commitEdit();
|
| 503 |
- if (log.isInfoEnabled()) {
|
|
| 504 |
- log.info("quit date editor, commit value: " + source.getValue());
|
|
| 505 |
- }
|
|
| 491 |
+ log.debug("quit date editor, commit value: " + source.getValue());
|
|
| 506 | 492 |
}
|
| 507 | 493 |
} catch (ParseException e1) {
|
| 508 | 494 |
// l'édition est valide donc pas de problème ici
|
| ... | ... | @@ -520,9 +506,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 520 | 506 |
}
|
| 521 | 507 |
|
| 522 | 508 |
protected void init(CoordinatesEditor editor) {
|
| 523 |
- if (log.isDebugEnabled()) {
|
|
| 524 |
- log.debug("init coordinates editor " + editor.getName());
|
|
| 525 |
- }
|
|
| 509 |
+ log.debug("init coordinates editor " + editor.getName());
|
|
| 526 | 510 |
editor.setFormat(ObserveSwingApplicationContext.get().getConfig().getCoordinateFormat());
|
| 527 | 511 |
editor.init();
|
| 528 | 512 |
editor.getDmdFormat().setFocusable(false);
|
| ... | ... | @@ -614,9 +598,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 614 | 598 |
}
|
| 615 | 599 |
|
| 616 | 600 |
protected void init(BooleanEditor editor) {
|
| 617 |
- if (log.isDebugEnabled()) {
|
|
| 618 |
- log.debug("init boolean editor " + editor.getName());
|
|
| 619 |
- }
|
|
| 601 |
+ log.debug("init boolean editor " + editor.getName());
|
|
| 620 | 602 |
final String propertyName = (String) editor.getClientProperty(CLIENT_PROPERTY_PROPERTY_NAME);
|
| 621 | 603 |
if (propertyName != null) {
|
| 622 | 604 |
editor.addItemListener(event -> {
|
| ... | ... | @@ -647,9 +629,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 647 | 629 |
}
|
| 648 | 630 |
|
| 649 | 631 |
protected void init(JCheckBox editor) {
|
| 650 |
- if (log.isDebugEnabled()) {
|
|
| 651 |
- log.debug("init simple boolean editor " + editor.getName());
|
|
| 652 |
- }
|
|
| 632 |
+ log.debug("init simple boolean editor " + editor.getName());
|
|
| 653 | 633 |
final String propertyName = (String) editor.getClientProperty(CLIENT_PROPERTY_PROPERTY_NAME);
|
| 654 | 634 |
if (propertyName != null) {
|
| 655 | 635 |
editor.addItemListener(event -> {
|
| ... | ... | @@ -661,9 +641,8 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 661 | 641 |
|
| 662 | 642 |
protected void init(JXDatePicker picker) {
|
| 663 | 643 |
|
| 664 |
- if (log.isDebugEnabled()) {
|
|
| 665 |
- log.debug("init JXDatePicker editor" + picker.getName());
|
|
| 666 |
- }picker.setLocale(ObserveSwingApplicationContext.get().getConfig().getLocale());
|
|
| 644 |
+ log.debug("init JXDatePicker editor" + picker.getName());
|
|
| 645 |
+ picker.setLocale(ObserveSwingApplicationContext.get().getConfig().getLocale());
|
|
| 667 | 646 |
JFormattedTextField editor = picker.getEditor();
|
| 668 | 647 |
editor.setEditable(true);
|
| 669 | 648 |
JXMonthView monthView = new JXMonthView();
|
| ... | ... | @@ -695,9 +674,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 695 | 674 |
if (source.isEditValid()) {
|
| 696 | 675 |
try {
|
| 697 | 676 |
picker.commitEdit();
|
| 698 |
- if (log.isInfoEnabled()) {
|
|
| 699 |
- log.info("quit date editor, commit value: " + source.getValue());
|
|
| 700 |
- }
|
|
| 677 |
+ log.debug("quit date editor, commit value: " + source.getValue());
|
|
| 701 | 678 |
} catch (ParseException e1) {
|
| 702 | 679 |
// l'édition est valide donc pas de problème ici
|
| 703 | 680 |
}
|
| ... | ... | @@ -708,9 +685,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 708 | 685 |
}
|
| 709 | 686 |
|
| 710 | 687 |
protected <B extends Enum<B>> void init(EnumEditor<B> editor) {
|
| 711 |
- if (log.isDebugEnabled()) {
|
|
| 712 |
- log.debug("init enumEditor editor " + editor.getName());
|
|
| 713 |
- }
|
|
| 688 |
+ log.debug("init enumEditor editor " + editor.getName());
|
|
| 714 | 689 |
ImmutableMap.Builder<B, String> labelsBuilder = ImmutableMap.builder();
|
| 715 | 690 |
for (B e : EnumSet.allOf(editor.getType())) {
|
| 716 | 691 |
String label = I18nEnumHelper.getLabel(e);
|
| ... | ... | @@ -748,9 +723,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 748 | 723 |
protected <D extends DataDto> void prepareDataFilterableDoubleList(Class<D> dtoClass, FilterableDoubleList<DataReference<D>> list) {
|
| 749 | 724 |
|
| 750 | 725 |
DataReferenceDecorator<D> decorator = decoratorService.getDataReferenceDecorator(dtoClass);
|
| 751 |
- if (log.isDebugEnabled()) {
|
|
| 752 |
- log.debug("Will use decorator " + decorator);
|
|
| 753 |
- }
|
|
| 726 |
+ log.debug("Will use decorator " + decorator);
|
|
| 754 | 727 |
|
| 755 | 728 |
String entityLabel = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoClass));
|
| 756 | 729 |
list.getPopupSortLabel().setText(t("observe.content.type.data", entityLabel));
|
| ... | ... | @@ -777,9 +750,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 777 | 750 |
protected <D extends ReferentialDto> void prepareReferentialFilterableDoubleList(Class<D> dtoClass, FilterableDoubleList<ReferentialReference<D>> list) {
|
| 778 | 751 |
|
| 779 | 752 |
ReferentialReferenceDecorator<D> decorator = decoratorService.getReferentialReferenceDecorator(dtoClass);
|
| 780 |
- if (log.isDebugEnabled()) {
|
|
| 781 |
- log.debug("Will use decorator " + decorator);
|
|
| 782 |
- }
|
|
| 753 |
+ log.debug("Will use decorator " + decorator);
|
|
| 783 | 754 |
|
| 784 | 755 |
String entityLabel = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoClass));
|
| 785 | 756 |
list.getPopupSortLabel().setText(t("observe.content.type.referential", entityLabel));
|
| ... | ... | @@ -806,9 +777,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 806 | 777 |
protected <D extends DataDto> void prepareDataEntityList(Class<D> dtoClass, BeanListHeader<DataReference<D>> list) {
|
| 807 | 778 |
|
| 808 | 779 |
DataReferenceDecorator<D> decorator = decoratorService.getDataReferenceDecorator(dtoClass);
|
| 809 |
- if (log.isDebugEnabled()) {
|
|
| 810 |
- log.debug("Will use decorator " + decorator);
|
|
| 811 |
- }
|
|
| 780 |
+ log.debug("Will use decorator " + decorator);
|
|
| 812 | 781 |
|
| 813 | 782 |
String entityLabel = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoClass));
|
| 814 | 783 |
list.setPopupTitleText(t("observe.content.type.data", entityLabel));
|
| ... | ... | @@ -833,9 +802,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 833 | 802 |
protected <D extends ReferentialDto> void prepareReferentialEntityList(Class<D> dtoClass, BeanListHeader<ReferentialReference<D>> list) {
|
| 834 | 803 |
|
| 835 | 804 |
ReferentialReferenceDecorator<D> decorator = decoratorService.getReferentialReferenceDecorator(dtoClass);
|
| 836 |
- if (log.isDebugEnabled()) {
|
|
| 837 |
- log.debug("Will use decorator " + decorator);
|
|
| 838 |
- }
|
|
| 805 |
+ log.debug("Will use decorator " + decorator);
|
|
| 839 | 806 |
|
| 840 | 807 |
String entityLabel = t(ObserveI18nDecoratorHelper.getTypeI18nKey(dtoClass));
|
| 841 | 808 |
list.setPopupTitleText(t("observe.content.type.referential", entityLabel));
|
| ... | ... | @@ -869,9 +836,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 869 | 836 |
|
| 870 | 837 |
ListCellRenderer<DataReference<D>> toolTipRenderer = new ComboBoxListCellRenderer<>(combobox.getRenderer());
|
| 871 | 838 |
combobox.setRenderer(toolTipRenderer);
|
| 872 |
- if (log.isDebugEnabled()) {
|
|
| 873 |
- log.debug("combo list [" + dtoClass.getName() + "] : " + comboBox.getData().size());
|
|
| 874 |
- }
|
|
| 839 |
+ log.debug("combo list [" + dtoClass.getName() + "] : " + comboBox.getData().size());
|
|
| 875 | 840 |
|
| 876 | 841 |
}
|
| 877 | 842 |
|
| ... | ... | @@ -894,9 +859,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 894 | 859 |
|
| 895 | 860 |
ListCellRenderer<ReferentialReference<D>> toolTipRenderer = new ComboBoxListCellRenderer<>(combobox.getRenderer());
|
| 896 | 861 |
combobox.setRenderer(toolTipRenderer);
|
| 897 |
- if (log.isDebugEnabled()) {
|
|
| 898 |
- log.debug("combo list [" + dtoClass.getName() + "] : " + comboBox.getData().size());
|
|
| 899 |
- }
|
|
| 862 |
+ log.debug("combo list [" + dtoClass.getName() + "] : " + comboBox.getData().size());
|
|
| 900 | 863 |
|
| 901 | 864 |
}
|
| 902 | 865 |
|
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 |
<parent>
|
| 28 | 28 |
<groupId>io.ultreia.maven</groupId>
|
| 29 | 29 |
<artifactId>pom</artifactId>
|
| 30 |
- <version>15-SNAPSHOT</version>
|
|
| 30 |
+ <version>15</version>
|
|
| 31 | 31 |
</parent>
|
| 32 | 32 |
|
| 33 | 33 |
<groupId>fr.ird.observe</groupId>
|