Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
de1c054b
by Tony CHEMIT at 2017-07-26T11:50:52+02:00
6 changed files:
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jaxx
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/ObserveMainUI.jcss
- 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/ContentUIManager.java
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUI.jcss
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java
Changes:
| ... | ... | @@ -95,7 +95,7 @@ |
| 95 | 95 |
org.jdesktop.swingx.JXTitledPanel
|
| 96 | 96 |
|
| 97 | 97 |
java.util.Locale
|
| 98 |
- |
|
| 98 |
+ java.awt.Dimension
|
|
| 99 | 99 |
javax.swing.BoxLayout
|
| 100 | 100 |
javax.swing.JComponent
|
| 101 | 101 |
javax.swing.UIManager
|
| ... | ... | @@ -452,6 +452,10 @@ JSplitPane { |
| 452 | 452 |
//enabled: {!model.isBusy()};
|
| 453 | 453 |
}
|
| 454 | 454 |
|
| 455 |
+#emptySelection {
|
|
| 456 |
+ preferredSize:{new Dimension(200,400)};
|
|
| 457 |
+}
|
|
| 458 |
+ |
|
| 455 | 459 |
#emptySelectionLabel {
|
| 456 | 460 |
horizontalAlignment : {JLabel.CENTER};
|
| 457 | 461 |
verticalAlignment : {JLabel.CENTER};
|
| ... | ... | @@ -349,6 +349,9 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 349 | 349 |
|
| 350 | 350 |
grabFocusOnform();
|
| 351 | 351 |
|
| 352 |
+ // we want to see the hole form on screen
|
|
| 353 |
+ ui.setMinimumSize(ui.getPreferredSize());
|
|
| 354 |
+ |
|
| 352 | 355 |
}
|
| 353 | 356 |
|
| 354 | 357 |
/**
|
| ... | ... | @@ -123,8 +123,9 @@ public class ContentUIManager { |
| 123 | 123 |
UIHelper.handlingError(e);
|
| 124 | 124 |
} finally {
|
| 125 | 125 |
|
| 126 |
- // on affiche l'ui quoi qu'il arrive ?
|
|
| 127 | 126 |
getLayout().show(getLayoutContent(), constraints);
|
| 127 |
+ |
|
| 128 |
+ getMainUI().getSplitpane2().setDividerLocation(getMainUI().getSplitpane2().getMinimumDividerLocation()+25);
|
|
| 128 | 129 |
}
|
| 129 | 130 |
|
| 130 | 131 |
}
|
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 |
#emptyLabel {
|
| 40 | 40 |
text: {getEmptyListMessage()};
|
| 41 | 41 |
horizontalAlignment: center;
|
| 42 |
- //enabled:false;
|
|
| 42 |
+ preferredSize:{new Dimension(200,400)};
|
|
| 43 | 43 |
}
|
| 44 | 44 |
|
| 45 | 45 |
#listHeader {
|
| ... | ... | @@ -43,6 +43,7 @@ import javax.swing.Icon; |
| 43 | 43 |
import javax.swing.JLabel;
|
| 44 | 44 |
import javax.swing.JList;
|
| 45 | 45 |
import javax.swing.ListCellRenderer;
|
| 46 |
+import javax.swing.ScrollPaneConstants;
|
|
| 46 | 47 |
import javax.swing.SwingUtilities;
|
| 47 | 48 |
import org.apache.commons.collections4.CollectionUtils;
|
| 48 | 49 |
import org.apache.commons.logging.Log;
|
| ... | ... | @@ -178,6 +179,10 @@ public abstract class ContentListUIHandler<E extends IdDto, C extends DataDto, U |
| 178 | 179 |
getUi().getListSelectionModel().clearSelection();
|
| 179 | 180 |
if (!getModel().isEmpty()) {
|
| 180 | 181 |
getUi().getListSelectionModel().setSelectionInterval(0, 0);
|
| 182 |
+ getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
|
|
| 183 |
+ } else {
|
|
| 184 |
+ |
|
| 185 |
+getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
|
|
| 181 | 186 |
}
|
| 182 | 187 |
});
|
| 183 | 188 |
|