Commit 5c5bb77b authored by Eric Seigne's avatar Eric Seigne
Browse files

version 1.7.0 : fin de l'implémentation de la table format HTLM

parent 8a1128f7
......@@ -6,6 +6,11 @@ This soft could be build with maven (on linux: `apt-get install maven`)
Source code is available here: https://framagit.org/mvplan-dev/mvplan
## IDE used
IDE used was netbeans (signs in forms files, "org.netbeans.modules.form.forminfo.JPanelFormInfo") ... but that's not our favorite IDE so it could change in some times :-)
## Translations
Translations can be done online here thanks to framasoft zanata service: https://trad.framasoft.org/project/view/mvplan?dswid=-449
......
......@@ -9,14 +9,14 @@
<parent>
<groupId>mvplan</groupId>
<artifactId>mvplan-parent</artifactId>
<version>1.7-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>mvplan</groupId>
<artifactId>mvplan_core</artifactId>
<version>1.7-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>jgoodies</groupId>
......
......@@ -106,14 +106,15 @@ public class GasDialog extends JDialog
fieldPanel.add(inputHe);
fieldPanel.add(labelMod);
fieldPanel.add(inputMod);
fieldPanel.setPreferredSize(new Dimension(80,100));
fieldPanel.setPreferredSize(new Dimension(240,140));
//sliderPanel
sliderPanel.setLayout(new GridLayout(2,1));
sliderPanel.add(labelPpO2);
sliderPanel.add(ppO2Slider);
sliderPanel.setPreferredSize(new Dimension(200,80));
sliderPanel.setPreferredSize(new Dimension(240,120));
ppO2Slider.setMajorTickSpacing(20);
ppO2Slider.setMinorTickSpacing(5);
ppO2Slider.setPaintTicks(true);
......@@ -180,7 +181,7 @@ public class GasDialog extends JDialog
getRootPane().setDefaultButton(okButton);
pack();
setResizable(false);
setResizable(true);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setLocationRelativeTo(frame);
setVisible(true);
......
......@@ -137,7 +137,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
gfPanel.add(gfLow);
gfPanel.add(new JLabel(MvplanInstance.getMvplan().getResource("mvplan.gui.PrefsDialog.gfHighLabel.text")));
gfPanel.add(gfHigh);
gfPanel.setPreferredSize(new Dimension(200,100));
gfPanel.setPreferredSize(new Dimension(280,100));
// Stop Panel
Border stopBorder = BorderFactory.createEtchedBorder();
......@@ -165,7 +165,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
stopPanel.add(lastStopDepth);
stopPanel.add(new JLabel(MvplanInstance.getMvplan().getResource("mvplan.gui.PrefsDialog.timeLabel.text")));
stopPanel.add(stopTimeIncrement);
stopPanel.setPreferredSize(new Dimension(200,100));
stopPanel.setPreferredSize(new Dimension(280,100));
// Dive Panel
Border diveBorder = BorderFactory.createEtchedBorder();
......@@ -195,7 +195,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
divePanel.add(descentRate);
divePanel.add(new JLabel(MvplanInstance.getMvplan().getResource("mvplan.gui.PrefsDialog.altitudeLabel.text")));
divePanel.add(altitude);
divePanel.setPreferredSize(new Dimension(200,100));
divePanel.setPreferredSize(new Dimension(280,100));
// Options Panel
Border optionsBorder = BorderFactory.createEtchedBorder();
......@@ -228,7 +228,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
optionsPanel.add(extendedOutputCB);
optionsPanel.add(mvMultilevelModeCB);
optionsPanel.add(cmbModel);
optionsPanel.setPreferredSize(new Dimension(200,140));
optionsPanel.setPreferredSize(new Dimension(280,140));
// Gas Panel
Border gasBorder = BorderFactory.createEtchedBorder();
......@@ -248,7 +248,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
gasPanel.add(diveRMV);
gasPanel.add(new JLabel(MvplanInstance.getMvplan().getResource("mvplan.gui.PrefsDialog.decoRMV.text")));
gasPanel.add(decoRMV);
gasPanel.setPreferredSize(new Dimension(200,80));
gasPanel.setPreferredSize(new Dimension(280,80));
// Units panel
Border unitsBorder = BorderFactory.createEtchedBorder();
......@@ -294,7 +294,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
buttonPanel.add(message, new GridBagConstraints(0,0,1,1,1.0,1.0,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0),0,0));
buttonPanel.add(okButton, new GridBagConstraints(1,0,1,1,0.1,1.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0,10,0,10),0,0));
buttonPanel.add(cancelButton, new GridBagConstraints(2,0,1,1,0.1,1.0,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0,10,0,10),0,0));
buttonPanel.setPreferredSize(new Dimension(200,25));
buttonPanel.setPreferredSize(new Dimension(400,25));
cancelButton.addActionListener(this);
okButton.addActionListener(this);
......@@ -343,7 +343,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(limits, "LIMITS");
getRootPane().getActionMap().put("LIMITS",limitsAction);
setResizable(false);
setResizable(true);
pack();
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setLocationRelativeTo(frame);
......
......@@ -4,7 +4,7 @@
<Properties>
<Property name="name" type="java.lang.String" value="" noResource="true"/>
<Property name="size" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 0]"/>
<Dimension value="[400, 200]"/>
</Property>
</Properties>
<SyntheticProperties>
......@@ -20,7 +20,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-120,0,0,3,32"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,7,0,0,4,60"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
......
......@@ -132,7 +132,7 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
cancelButton = new javax.swing.JButton();
setName(""); // NOI18N
setSize(new java.awt.Dimension(0, 0));
setSize(new java.awt.Dimension(400, 200));
getContentPane().setLayout(new java.awt.GridBagLayout());
infoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.segmentLabel.text")));
......
......@@ -9,7 +9,7 @@
<parent>
<groupId>mvplan</groupId>
<artifactId>mvplan-parent</artifactId>
<version>1.7-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
......
......@@ -75,7 +75,15 @@ public class TextProfilePrinter extends ProfilePrinter <StringBuffer>{
* Prints an extended dive table to the textArea
*/
private void doPrintExtendedTable() {
textArea.append("<html>");
textArea.append("<style>body {\n" +
" font-size: " + MvplanInstance.getPrefs().getFontSize() + "pt;\n" +
"}\n" +
"table { border: 1px black solid; background-color: black;}\n" +
"td, th { background-color: white; }\n" +
"</style>");
if(profile.getIsRepetitiveDive()) {
// Print repetitive dive heading
textArea.append('\n'+mvplan.getResource("mvplan.gui.text.ProfilePrinter.repetitiveDive.text")+"\n\n"+mvplan.getAppName()+'\n'+
......@@ -97,11 +105,15 @@ public class TextProfilePrinter extends ProfilePrinter <StringBuffer>{
textArea.append("\n");
printAltitude();
textArea.append("========================================================="+'\n');
textArea.append("<table cellpadding=\"4\">"+'\n');
textArea.append("<tr><th>Phase</th><th>Profondeur</th><th>Durée</th><th>Temps Total</th><th>Gaz</th><th>SP</th><th>END</th><th>M-Value</th><th>Compartiment directeur</th><th>GF</th></tr>\n");
//textArea.append("========================================================="+'\n');
for(SegmentAbstract s : profile.getProfile()) {
textArea.append(s.toStringLong()+'\n');
}
doGasUsage();
textArea.append("</table>"+'\n');
doGasUsage();
textArea.append("</html>");
}
/*
......@@ -172,6 +184,7 @@ public class TextProfilePrinter extends ProfilePrinter <StringBuffer>{
}else{
textArea.append(" "+MvplanInstance.getPrefs().getDepthShortString()+" "+mvplan.getResource("mvplan.gui.text.ProfilePrinter.heading.text")+'\n');
}
/*
if (ocMode){
textArea.append("========================"+'\n');
// "- 120 00:00 000 88/88
......@@ -179,6 +192,7 @@ public class TextProfilePrinter extends ProfilePrinter <StringBuffer>{
textArea.append("=============================="+'\n');
// "- 120 00:00 000 88/88 1.30
}
*/
textArea.append("<table cellpadding=\"4\">"+'\n');
textArea.append("<tr><th>Phase</th><th>Profondeur</th><th>Durée</th><th>Temps Total</th><th>Gaz</th><th>SP</th></tr>\n");
......
......@@ -18,7 +18,7 @@ public class MvplanInstance {
public static final int MINOR_VERSION = 7;
public static final int PATCH_VERSION = 0;
public static final String VERSION_STATUS = "TEST"; // Application status
public static final String BUILD_DATE = "02-10-2019"; // Application
public static final String BUILD_DATE = "21-10-2019"; // Application
// release date
public static Version mvplanVersion; // App version. See Version Class
private static IMvplan mvplan;
......
......@@ -94,7 +94,7 @@ public class SegmentAscDec extends SegmentAbstract
if (super.type == ASCENT) s="ASC "; else s="DESC";
return String.format("%1$4s:%2$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+" for %3$02d:%4$02d [%5$3.0f] on %6$s, SP: %7$3.1f, END:%8$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString(),
return String.format("<tr><td>%1$4s</td><td>%2$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+"</td><td>%3$02d:%4$02d</td><td>%5$3.0f</td><td>%6$s</td><td>%7$3.1f</td><td>%8$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+"</td><td></td><td></td><td></td></tr>",
s, depth, timeMins, timeSeconds , runTime, gas.toString(), setpoint, getEnd());
}
......
......@@ -85,7 +85,7 @@ public class SegmentDeco extends SegmentAbstract
timeMins=(int)time;
timeSeconds = (int)((time - (double)timeMins)*60.0);
return String.format("DECO:%1$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+" for %2$02d:%3$02d [%4$3.0f] on %5$s, SP: %6$3.1f, END:%7$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+" M-Value: %8$02.0f%% [%9$02d], GF: %10$02.0f%%",
return String.format("<tr><td>DECO</td><td>%1$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+"</td><td>%2$02d:%3$02d</td><td>%4$3.0f</td><td>%5$s</td><td>%6$3.1f</td><td>%7$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+"</td><td>%8$02.0f%%</td><td>%9$02d</td><td>%10$02.0f%%</td></tr>",
depth, timeMins, timeSeconds, runTime, gas.toString(), setpoint, getEnd(), mvMax*100, controlCompartment, gfUsed*100);
}
......
......@@ -78,7 +78,7 @@ public class SegmentDive extends SegmentAbstract
timeMins=(int)time;
timeSeconds = (int)((time - (double)timeMins)*60.0);
return String.format("DIVE:%1$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+" for %2$02d:%3$02d [%4$3.0f] on %5$s, SP: %6$3.1f, END:%7$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString(),
return String.format("<tr><td>DIVE</td><td>%1$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+"</td><td>%2$02d:%3$02d</td><td>%4$3.0f</td><td>%5$s</td><td>%6$3.1f</td><td>%7$3.0f"+MvplanInstance.getMvplan().getPrefs().getDepthShortString()+"</td><td></td><td></td><td></td></tr>",
depth, timeMins, timeSeconds, runTime, gas.toString(), setpoint, getEnd());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment