Commit 1ec74ab9 authored by Eric Seigne's avatar Eric Seigne
Browse files

change font size

parent 8e384ba2
......@@ -17,7 +17,7 @@
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
......@@ -38,49 +38,49 @@ import java.util.List;
import java.util.Iterator;
public class TableGeneratorDialog extends JDialog implements FocusListener {
private int[] modifiers; // Dive time modifiers to be returned
private boolean returnResult;
private TableGeneratorModel mp;
/** Creates new form TableGeneratorDialog */
public TableGeneratorDialog(Frame parentFrame, TableGeneratorModel multiProfile) {
public TableGeneratorDialog(Frame parentFrame, TableGeneratorModel multiProfile) {
super(parentFrame,MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.title"),true);
mp=multiProfile; // Store multiprofile
initComponents();
//infoLabel.setText(MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.infoLabel.text"));
modifiers = mp.getModifiers();
modifiers = mp.getModifiers();
// Set ESCAPE key to close dialog
KeyStroke escape = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
Action escapeAction = new AbstractAction(){
public void actionPerformed(ActionEvent e){
dispose();
}
};
};
getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escape, "ESCAPE");
getRootPane().getActionMap().put("ESCAPE",escapeAction);
getRootPane().getActionMap().put("ESCAPE",escapeAction);
pack();
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setLocationRelativeTo(parentFrame);
getRootPane().setDefaultButton(okButton);
//setVisible(true);
//setVisible(true);
}
public boolean showDialog() {
int cs = mp.getControlSegmentIndex();
//String str;
List<SegmentAbstract> knownSegments, modifiableSegments=new ArrayList<SegmentAbstract>();
if (cs>=0) {
if (cs>=0) {
// New multi segment code
for (SegmentAbstract s :mp.getKnownSegments()){
if(s.getTime()>0.0)
// Add to arraylist, but reverse order so it comes up on in spinner
modifiableSegments.add(0,s);
modifiableSegments.add(0,s);
}
// Set spinner model to array of Segment objects
segmentSpinner.setModel(new SpinnerListModel(modifiableSegments.toArray()));
// Set spinner model to array of Segment objects
segmentSpinner.setModel(new SpinnerListModel(modifiableSegments.toArray()));
// Tweek spinner text field
((JSpinner.DefaultEditor)segmentSpinner.getEditor()).getTextField().setFocusable(false);
((JSpinner.DefaultEditor)segmentSpinner.getEditor()).getTextField().setHorizontalAlignment(JTextField.CENTER);
......@@ -88,7 +88,7 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
segmentSpinner.setValue(mp.getControlSegment());
} else {
//infoField.setText(MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.noSegments.text"));
segmentSpinner.setModel(new SpinnerListModel(new String [] {MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.noSegments.text")}));
segmentSpinner.setModel(new SpinnerListModel(new String [] {MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.noSegments.text")}));
//segmentSpinner.setEnabled(false);
okButton.setEnabled(false);
}
......@@ -99,10 +99,10 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
modifierField3.setText(String.valueOf(modifiers[3]));
modifierField4.setText(String.valueOf(modifiers[4]));
setVisible(true);
return returnResult;
return returnResult;
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
......@@ -133,13 +133,13 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
setResizable(false);
getContentPane().setLayout(new java.awt.GridBagLayout());
infoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.segmentLabel.text"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 10))); // NOI18N
infoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.segmentLabel.text"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 16))); // NOI18N
infoPanel.setToolTipText(MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.segmentTip.text"));
infoPanel.setMinimumSize(new java.awt.Dimension(230, 45));
infoPanel.setPreferredSize(new java.awt.Dimension(320, 70));
infoPanel.setMinimumSize(new java.awt.Dimension(320, 30));
infoPanel.setPreferredSize(new java.awt.Dimension(480, 80));
infoPanel.setLayout(new java.awt.GridBagLayout());
segmentSpinner.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
segmentSpinner.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
segmentSpinner.setToolTipText(MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.segmentTip.text"));
segmentSpinner.setMinimumSize(new java.awt.Dimension(300, 18));
segmentSpinner.setPreferredSize(new java.awt.Dimension(210, 25));
......@@ -158,12 +158,12 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 10);
getContentPane().add(infoPanel, gridBagConstraints);
inputPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.modifierLabel.text"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 10))); // NOI18N
inputPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.modifierLabel.text"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 16))); // NOI18N
inputPanel.setToolTipText(MvplanInstance.getMvplan().getResource("mvplan.gui.TableGeneratorDialog.modifierTip.text"));
inputPanel.setPreferredSize(new java.awt.Dimension(270, 70));
inputPanel.setPreferredSize(new java.awt.Dimension(270, 80));
inputPanel.setLayout(new java.awt.GridBagLayout());
jPanel1.setPreferredSize(new java.awt.Dimension(250, 29));
jPanel1.setPreferredSize(new java.awt.Dimension(250, 40));
modifierField0.setColumns(3);
modifierField0.setEditable(false);
......@@ -239,18 +239,18 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
*/
public void focusGained(FocusEvent e) {
JTextField tf = (JTextField)(e.getComponent());
tf.selectAll();
tf.selectAll();
}
/**
* Handles focus lost events. Takes no action but is required to complete the interface.
* @param e Event
* @param e Event
*/
public void focusLost(FocusEvent e) {}
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
// Take modifiers and fill modifier array
// Take modifiers and fill modifier array
if(modifiers.length == 5) {
try {
// Note that modifiers[] is a reference to an array in the prefs Object. So this updates it directly
......@@ -272,7 +272,7 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
if(Mvplan.DEBUG>0) System.err.println("TablegeneratorDialog: corrected modifier error.");
}
}
if(Mvplan.DEBUG>0) System.out.println("TablegeneratorDialog: selected segment"+segmentSpinner.getValue().toString());
mp.setControlSegmentIndex(segmentSpinner.getValue());
returnResult= true;
......@@ -284,7 +284,7 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
setVisible(false);
}//GEN-LAST:event_cancelButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel buttonPanel;
private javax.swing.JButton cancelButton;
......@@ -299,5 +299,5 @@ public class TableGeneratorDialog extends JDialog implements FocusListener {
private javax.swing.JButton okButton;
private javax.swing.JSpinner segmentSpinner;
// End of variables declaration//GEN-END:variables
}
......@@ -9,20 +9,20 @@ import mvplan.prefs.Prefs;
import mvplan.util.Version;
/**
*
*
* @author Maciej Kaniewski
*/
public class MvplanInstance {
public static final String NAME = "MV-Plan"; // Application name
public static final int MAJOR_VERSION = 1; // Application version codes
public static final int MINOR_VERSION = 6;
public static final int PATCH_VERSION = 0;
public static final int PATCH_VERSION = 1;
public static final String VERSION_STATUS = "TEST"; // Application status
public static final String BUILD_DATE = "17-04-2012"; // Application
public static final String BUILD_DATE = "10-09-2019"; // Application
// release date
public static Version mvplanVersion; // App version. See Version Class
public static Version mvplanVersion; // App version. See Version Class
private static IMvplan mvplan;
static{
mvplanVersion=new Version(MAJOR_VERSION,MINOR_VERSION,PATCH_VERSION,VERSION_STATUS,BUILD_DATE);
}
......
<mvplan.util.Version>
<majorVersion>1</majorVersion>
<minorVersion>6</minorVersion>
<patchVersion>0</patchVersion>
<patchVersion>1</patchVersion>
<statusString>TEST</statusString>
<dateString>17-04-2012</dateString>
</mvplan.util.Version>
\ No newline at end of file
<dateString>10-09-2019</dateString>
</mvplan.util.Version>
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