...
 
Commits (7)
......@@ -12,7 +12,7 @@
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
<packaging>pom</packaging>
<name>Quadrige3 :: Core</name>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -44,7 +44,7 @@
# Please fill the missing licenses for dependencies :
#
#
#Fri Mar 13 09:32:56 CET 2020
#Tue Apr 07 17:28:24 CEST 2020
com.oracle--ojdbc7--12.1.0.2.0=OTN license
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
dom4j--dom4j--1.6.1=BSD License
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-core-client</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-core-server</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-core-shared</artifactId>
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-mda</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-magicdraw-plugin</artifactId>
......
......@@ -14,7 +14,7 @@
# Please fill the missing licenses for dependencies :
#
#
#Fri Mar 13 09:32:20 CET 2020
#Tue Apr 07 17:27:33 CEST 2020
com.nomagic--javax_jmi-1_0-fr--17.0.2=
com.nomagic--md--17.0.2=
com.nomagic--md_api--17.0.2=
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-mda-client-hsqldb</artifactId>
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-mda-server-oracle</artifactId>
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-mda</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-mda-server-pgsql</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-synchro-server</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-synchro</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-test-shared</artifactId>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>quadrige3-core</artifactId>
<groupId>fr.ifremer.quadrige3</groupId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-ui-swing-common</artifactId>
......
......@@ -48,10 +48,8 @@ import java.net.URL;
import java.net.URLConnection;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.*;
import java.util.stream.Collectors;
import static org.nuiton.i18n.I18n.t;
......@@ -241,30 +239,23 @@ public class ApplicationUIUtil extends org.nuiton.jaxx.application.swing.util.Ap
private static String formatHtmlText(String text) {
BufferedReader st = new BufferedReader(new StringReader(text));
StringBuilder buf = new StringBuilder();
try (BufferedReader st = new BufferedReader(new StringReader(text))) {
try {
String str;
while ((str = st.readLine()) != null) {
if (str.equalsIgnoreCase(HTML_BR2)) {
str = HTML_BR;
buf.append(str);
} else {
buf.append(escapeHtmlString(str));
}
if (!str.equalsIgnoreCase(HTML_BR)) {
buf.append(HTML_BR);
}
// Try with stream
return st.lines().filter(Objects::nonNull)
.map(line -> {
if (line.equalsIgnoreCase(HTML_BR2) || line.equalsIgnoreCase(HTML_BR)) {
return HTML_BR;
} else {
return escapeHtmlString(line);
}
})
.collect(Collectors.joining(HTML_BR));
}
} catch (IOException e) {
// ignore it
LOG.warn("Problem formatting string to html", e);
return text;
}
return buf.toString();
}
private static String escapeHtmlString(String str) {
......@@ -389,10 +380,10 @@ public class ApplicationUIUtil extends org.nuiton.jaxx.application.swing.util.Ap
public static void setComponentTreeBackground(Component component, Color color) {
if (component instanceof JTable
|| component instanceof JTextComponent
|| component instanceof JComboBox
|| component instanceof JButton
|| component instanceof JToggleButton
|| component instanceof JTextComponent
|| component instanceof JComboBox
|| component instanceof JButton
|| component instanceof JToggleButton
) {
return;
}
......@@ -514,16 +505,16 @@ public class ApplicationUIUtil extends org.nuiton.jaxx.application.swing.util.Ap
BufferedImage cursorImage = new BufferedImage(bestDimension.width, bestDimension.height, BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics2D = cursorImage.createGraphics();
graphics2D.drawImage(imageIcon.getImage(),
(bestDimension.width - imageIcon.getIconWidth()) / 2,
(bestDimension.height - imageIcon.getIconHeight()) / 2,
imageIcon.getIconWidth(),
imageIcon.getIconHeight(),
null);
(bestDimension.width - imageIcon.getIconWidth()) / 2,
(bestDimension.height - imageIcon.getIconHeight()) / 2,
imageIcon.getIconWidth(),
imageIcon.getIconHeight(),
null);
return toolkit.createCustomCursor(
cursorImage,
new Point(bestDimension.width / 2, bestDimension.height / 2),
actionIconName);
cursorImage,
new Point(bestDimension.width / 2, bestDimension.height / 2),
actionIconName);
}
}
......@@ -80,15 +80,15 @@ public class ExtendedComboBoxHandler<O> extends BeanFilterableComboBoxHandler<O>
super.init(decorator, data);
ui.getCombobox().getEditor().getEditorComponent().setFocusTraversalKeysEnabled(false);
ui.getCombobox().getEditor().getEditorComponent().addKeyListener(new KeyAdapter() {
getEditorComponent().setFocusTraversalKeysEnabled(false);
getEditorComponent().addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(final KeyEvent e) {
if (KeyEvent.VK_TAB == e.getKeyCode()) {
// simulate ENTER key action when TAB key pressed
Component editor = ui.getCombobox().getEditor().getEditorComponent();
Component editor = getEditorComponent();
KeyEvent enterEvent = new KeyEvent(editor, KeyEvent.KEY_PRESSED, e.getWhen() + 1, 0, KeyEvent.VK_ENTER, '\r');
editor.dispatchEvent(enterEvent);
enterEvent = new KeyEvent(editor, KeyEvent.KEY_RELEASED, e.getWhen() + 2, 0, KeyEvent.VK_ENTER, '\r');
......@@ -115,7 +115,7 @@ public class ExtendedComboBoxHandler<O> extends BeanFilterableComboBoxHandler<O>
}
});
ui.getCombobox().addFocusListener(this);
ui.getCombobox().getEditor().getEditorComponent().addFocusListener(this);
getEditorComponent().addFocusListener(this);
ui.addPropertyChangeListener(BeanFilterableComboBox.PROPERTY_SELECTED_ITEM, evt -> resetCaretPosition());
......@@ -128,7 +128,14 @@ public class ExtendedComboBoxHandler<O> extends BeanFilterableComboBoxHandler<O>
/** {@inheritDoc} */
@Override
protected void setSelectedItem(O oldValue, O newValue) {
super.setSelectedItem(oldValue, newValue);
if (newValue == null) {
// Force reset the selected item in combobox model (Mantis #51731)
getEditorComponent().setText("");
}
resetCaretPosition();
}
......@@ -147,8 +154,11 @@ public class ExtendedComboBoxHandler<O> extends BeanFilterableComboBoxHandler<O>
* <p>resetCaretPosition.</p>
*/
protected void resetCaretPosition() {
JTextComponent editor = (JTextComponent) ui.getCombobox().getEditor().getEditorComponent();
editor.moveCaretPosition(0);
getEditorComponent().moveCaretPosition(0);
}
protected JTextComponent getEditorComponent() {
return (JTextComponent) ui.getCombobox().getEditor().getEditorComponent();
}
private void initActionButton() {
......
......@@ -89,11 +89,11 @@ public abstract class AbstractTableUIHandler<R extends AbstractRowUIModel<?, ?>,
/**
* Constant <code>DEFAULT_ROW_HEIGHT=24</code>
*/
private static final int DEFAULT_ROW_HEIGHT = 24;
public static final int DEFAULT_ROW_HEIGHT = 24;
/**
* Minimun width of a column
*/
private static final int DEFAULT_MIN_COLUMN_WIDTH = 80;
public static final int DEFAULT_MIN_COLUMN_WIDTH = 80;
/**
* Logger.
*/
......
......@@ -23,9 +23,9 @@ package fr.ifremer.quadrige3.ui.swing.table;
* #L%
*/
import org.jdesktop.swingx.JXTableHeader;
import javax.swing.BorderFactory;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
......@@ -80,12 +80,14 @@ public class SwingTableHeader extends JXTableHeader {
for (int i = 0; i < getColumnModel().getColumnCount(); i++) {
// calculate text height
TableColumn column = getColumnModel().getColumn(i);
JTextPane pane = new JTextPane();
pane.setBorder(BorderFactory.createEmptyBorder(4,5,4,5));
pane.setEditorKit(new HTMLEditorKit());
pane.setSize(new Dimension(getColumnModel().getColumn(i).getWidth(), 1000));
pane.setSize(new Dimension(column.getWidth(), 1000));
pane.setOpaque(true);
pane.setFont(table.getFont());
pane.setText((String) getColumnModel().getColumn(i).getHeaderValue());
pane.setText((String) column.getHeaderValue());
height = Math.max(height, pane.getPreferredSize().height);
}
pref.height = height;
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer.quadrige3</groupId>
<artifactId>quadrige3-core</artifactId>
<version>3.6.13</version>
<version>3.6.14</version>
</parent>
<artifactId>quadrige3-ui-updater</artifactId>
......
......@@ -29,6 +29,15 @@
</properties>
<body>
<release version="3.6.14" date="2020-04-07" description="Stable Release">
<action dev="ludovic.pecquot@e-is.pro" type="fix" issue="51731">
Force a combobox selected value when underlying value is null
</action>
<action dev="ludovic.pecquot@e-is.pro" type="fix">
Minor refactoring
</action>
</release>
<release version="3.6.13" date="2020-03-13" description="Stable Release">
<action dev="ludovic.pecquot@e-is.pro" type="fix" issue="51493">
Fix bad FixedSwingTable behavior
......
......@@ -5,7 +5,8 @@ Les versions des outils actuellement en production sont <span style="background:
|Quadrige3-Core|Oracle Schema|HSQLDB Schema|ReefDb |DALI |Quadrige²|
|--------------|-------------|-------------|------------|-----|---------|
|3.6.13 |3.2.0 |3.2.0 | |5.1.3| |
|3.6.14 |3.2.0 |3.2.0 |3.9.9 | | |
|3.6.13 |3.2.0 |3.2.0 |3.9.7,3.9.8 |5.1.3| |
|3.6.12 |3.2.0 |3.2.0 | |5.1.2| |
|3.6.11 |3.2.0 |3.2.0 |3.9.6 | | |
|3.6.10 |3.2.0 |3.2.0 |3.9.4,3.9.5 | | |
......
......@@ -5,7 +5,8 @@ Tools versions currently in operation are <span style="background:yellow">**high
|Quadrige3-Core|Oracle Schema|HSQLDB Schema|ReefDb |DALI |Quadrige²|
|--------------|-------------|-------------|------------|-----|---------|
|3.6.13 |3.2.0 |3.2.0 | |5.1.3| |
|3.6.14 |3.2.0 |3.2.0 |3.9.9 | | |
|3.6.13 |3.2.0 |3.2.0 |3.9.7,3.9.8 |5.1.3| |
|3.6.12 |3.2.0 |3.2.0 | |5.1.2| |
|3.6.11 |3.2.0 |3.2.0 |3.9.6 | | |
|3.6.10 |3.2.0 |3.2.0 |3.9.4,3.9.5 | | |
......