Added user definable number of clicks to open tables

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@81 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Jared Gould 2006-07-04 03:38:40 +00:00
parent 158d4c31ff
commit 28d4d25b6c
6 changed files with 598 additions and 524 deletions

View File

@ -33,7 +33,7 @@ public class Settings implements Serializable {
private Color increaseBorder = new Color(255, 0, 0);
private Color decreaseBorder = new Color(0, 0, 255);
private Color axisColor = new Color(255, 255, 255);
private boolean singleTableView = false;
private int tableClickCount = 2; // number of clicks to open table
public Settings() {
//center window by default
@ -157,14 +157,6 @@ public class Settings implements Serializable {
this.minColor = minColor;
}
public boolean isSingleTableView() {
return singleTableView;
}
public void setSingleTableView(boolean singleTableView) {
this.singleTableView = singleTableView;
}
public Color getHighlightColor() {
return highlightColor;
}
@ -214,4 +206,12 @@ public class Settings implements Serializable {
if (userLevel > 5) userLevel = 5;
else if (userLevel < 1) userLevel = 1;
}
public int getTableClickCount() {
return tableClickCount;
}
public void setTableClickCount(int tableClickCount) {
this.tableClickCount = tableClickCount;
}
}

View File

@ -25,7 +25,7 @@ public class RomTree extends JTree implements MouseListener {
}
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
if (e.getClickCount() == container.getSettings().getTableClickCount()) {
try {
TableTreeNode node = (TableTreeNode)this.getLastSelectedPathComponent();
container.displayTable(node.getFrame());

View File

@ -7,6 +7,9 @@
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
<Color id="Default Cursor"/>
</Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Tahoma" size="11" style="0"/>
</Property>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
@ -23,109 +26,16 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="lblEcuDef" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="ecuDefinitionFile" min="-2" pref="257" max="-2" attributes="2"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnEcuDefinitionBrowse" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="ecuDefinitionFile" min="-2" pref="257" max="-2" attributes="2"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnEcuDefinitionBrowse" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="calcConflictWarning" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="obsoleteWarning" min="-2" max="-2" attributes="1"/>
<Component id="singleTableView" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="debug" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
<Component id="lblAxis" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="lblHighlight" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="lblMin" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="lblMax" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="maxColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="minColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="highlightColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="axisColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="53" max="-2" attributes="0"/>
<Component id="lblCellSize" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="57" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="lblDecrease" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="3" pref="3" max="3" attributes="0"/>
<Component id="lblIncrease" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="increaseColor" alignment="0" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="decreaseColor" alignment="0" min="-2" pref="50" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="1">
<EmptySpace min="47" pref="47" max="47" attributes="0"/>
<Component id="lblBorders" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="btnChooseFont" alignment="0" pref="140" max="32767" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="lblFont" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="65" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="0" attributes="1">
<EmptySpace min="-2" pref="47" max="-2" attributes="0"/>
<Component id="lblBackgrounds" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="lblCellWidth" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="lblCellHeight" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="10" pref="10" max="10" attributes="0"/>
<Component id="cellWidth" min="-2" pref="50" max="-2" attributes="0"/>
</Group>
<Component id="cellHeight" min="-2" pref="50" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="reset" min="-2" max="-2" attributes="0"/>
<Component id="reset" min="-2" max="-2" attributes="1"/>
<EmptySpace pref="34" max="32767" attributes="0"/>
<Component id="btnApply" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
@ -133,6 +43,27 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="btnCancel" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jPanel1" min="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="calcConflictWarning" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="obsoleteWarning" min="-2" max="-2" attributes="1"/>
<Component id="debug" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="tableClickCount" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="lblEcuDef" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@ -148,70 +79,20 @@
<Component id="btnEcuDefinitionBrowse" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="ecuDefinitionFile" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="tableClickCount" alignment="3" min="-2" pref="18" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="obsoleteWarning" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="calcConflictWarning" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="singleTableView" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="debug" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="lblBorders" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="increaseColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
<Component id="lblIncrease" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblDecrease" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="decreaseColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="lblBackgrounds" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblMax" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="maxColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblMin" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="minColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblHighlight" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="highlightColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblAxis" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="axisColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblCellSize" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblFont" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblCellWidth" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cellWidth" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnChooseFont" alignment="3" pref="29" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblCellHeight" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cellHeight" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="8" max="32767" attributes="0"/>
<EmptySpace pref="30" max="32767" attributes="0"/>
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="btnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnOk" alignment="3" min="-2" max="-2" attributes="0"/>
@ -236,106 +117,6 @@
<Property name="text" type="java.lang.String" value="Browse"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblMax">
<Properties>
<Property name="text" type="java.lang.String" value="Maximum Value:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblMin">
<Properties>
<Property name="text" type="java.lang.String" value="Minimum Value:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblHighlight">
<Properties>
<Property name="text" type="java.lang.String" value="Highlighted Cell:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblAxis">
<Properties>
<Property name="text" type="java.lang.String" value="Axis Cell:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="maxColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="minColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="highlightColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="axisColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblIncrease">
<Properties>
<Property name="text" type="java.lang.String" value="Increased Value:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblDecrease">
<Properties>
<Property name="text" type="java.lang.String" value="Decreased Value:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblBackgrounds">
<Properties>
<Property name="text" type="java.lang.String" value="Backgrounds"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="increaseColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="obsoleteWarning">
<Properties>
<Property name="text" type="java.lang.String" value="Warn me when opening out of date ECU image revision"/>
@ -394,71 +175,332 @@
<Property name="text" type="java.lang.String" value="Apply"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="decreaseColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblBorders">
<Properties>
<Property name="text" type="java.lang.String" value="Borders"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblCellSize">
<Properties>
<Property name="text" type="java.lang.String" value="Cell Size"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblCellHeight">
<Properties>
<Property name="text" type="java.lang.String" value="Height:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblCellWidth">
<Properties>
<Property name="text" type="java.lang.String" value="Width:"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="cellWidth">
</Component>
<Component class="javax.swing.JTextField" name="cellHeight">
</Component>
<Component class="javax.swing.JCheckBox" name="singleTableView">
<Properties>
<Property name="text" type="java.lang.String" value="Open tables in place of existing tables"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
</Border>
</Property>
<Property name="enabled" type="boolean" value="false"/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[0, 0, 0, 0]"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblFont">
<Properties>
<Property name="text" type="java.lang.String" value="Font"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnChooseFont">
<Properties>
<Property name="text" type="java.lang.String" value="Choose"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="reset">
<Properties>
<Property name="text" type="java.lang.String" value="Restore Defaults"/>
</Properties>
</Component>
<Container class="javax.swing.JPanel" name="jPanel1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Data Cells"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel2" pref="152" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="lblCellHeight" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="btnChooseFont" alignment="0" pref="107" max="32767" attributes="1"/>
<Group type="102" alignment="0" attributes="0">
<Component id="cellHeight" min="-2" pref="50" max="-2" attributes="0"/>
<EmptySpace pref="57" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="lblCellWidth" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Component id="cellWidth" min="-2" pref="50" max="-2" attributes="0"/>
</Group>
<Component id="jPanel3" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="lblFont" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel2" max="32767" attributes="1"/>
<Component id="jPanel3" alignment="0" min="-2" max="-2" attributes="1"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblCellHeight" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cellHeight" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblCellWidth" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="cellWidth" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblFont" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnChooseFont" alignment="3" min="-2" pref="18" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel2">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Background"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
<Component id="lblAxis" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="lblHighlight" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="lblMin" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="lblMax" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="maxColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="minColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="highlightColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="axisColor" alignment="1" min="-2" pref="50" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="maxColor" min="-2" pref="15" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="minColor" min="-2" pref="15" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="highlightColor" min="-2" pref="15" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="axisColor" min="-2" pref="15" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="lblMax" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="lblMin" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="lblHighlight" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="lblAxis" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="lblAxis">
<Properties>
<Property name="text" type="java.lang.String" value="Axis Cell:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblHighlight">
<Properties>
<Property name="text" type="java.lang.String" value="Highlighted Cell:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblMin">
<Properties>
<Property name="text" type="java.lang.String" value="Minimum Value:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblMax">
<Properties>
<Property name="text" type="java.lang.String" value="Maximum Value:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="maxColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="minColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="highlightColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="axisColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel3">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Border"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="lblDecrease" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="3" pref="3" max="3" attributes="0"/>
<Component id="lblIncrease" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="increaseColor" alignment="0" min="-2" pref="50" max="-2" attributes="0"/>
<Component id="decreaseColor" alignment="0" min="-2" pref="50" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="increaseColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
<Component id="lblIncrease" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lblDecrease" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="decreaseColor" alignment="3" min="-2" pref="15" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="42" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="lblIncrease">
<Properties>
<Property name="text" type="java.lang.String" value="Increased Value:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="increaseColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="decreaseColor">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="ff" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
<Property name="opaque" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblDecrease">
<Properties>
<Property name="text" type="java.lang.String" value="Decreased Value:"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="lblCellHeight">
<Properties>
<Property name="text" type="java.lang.String" value="Height:"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="cellHeight">
</Component>
<Component class="javax.swing.JTextField" name="cellWidth">
</Component>
<Component class="javax.swing.JLabel" name="lblCellWidth">
<Properties>
<Property name="text" type="java.lang.String" value="Width:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="lblFont">
<Properties>
<Property name="text" type="java.lang.String" value="Font:"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnChooseFont">
<Properties>
<Property name="text" type="java.lang.String" value="Choose"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" value="click to open tables"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="tableClickCount">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="2">
<StringItem index="0" value="Single"/>
<StringItem index="1" value="Double"/>
</StringArray>
</Property>
</Properties>
</Component>
</SubComponents>
</Form>

View File

@ -36,6 +36,7 @@ public class SettingsForm extends JFrame implements MouseListener {
btnEcuDefinitionBrowse.addMouseListener(this);
btnChooseFont.addMouseListener(this);
reset.addMouseListener(this);
}
private void initSettings() {
@ -44,7 +45,6 @@ public class SettingsForm extends JFrame implements MouseListener {
obsoleteWarning.setSelected(settings.isObsoleteWarning());
calcConflictWarning.setSelected(settings.isCalcConflictWarning());
singleTableView.setSelected(settings.isSingleTableView());
debug.setSelected(settings.isDebug());
maxColor.setBackground(settings.getMaxColor());
@ -59,6 +59,12 @@ public class SettingsForm extends JFrame implements MouseListener {
btnChooseFont.setFont(settings.getTableFont());
btnChooseFont.setText(settings.getTableFont().getFontName());
if (settings.getTableClickCount() == 1) { // single click opens table
tableClickCount.setSelectedIndex(0);
} else { // double click opens table
tableClickCount.setSelectedIndex(1);
}
}
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
@ -66,77 +72,45 @@ public class SettingsForm extends JFrame implements MouseListener {
lblEcuDef = new javax.swing.JLabel();
ecuDefinitionFile = new javax.swing.JTextField();
btnEcuDefinitionBrowse = new javax.swing.JButton();
lblMax = new javax.swing.JLabel();
lblMin = new javax.swing.JLabel();
lblHighlight = new javax.swing.JLabel();
lblAxis = new javax.swing.JLabel();
maxColor = new javax.swing.JLabel();
minColor = new javax.swing.JLabel();
highlightColor = new javax.swing.JLabel();
axisColor = new javax.swing.JLabel();
lblIncrease = new javax.swing.JLabel();
lblDecrease = new javax.swing.JLabel();
lblBackgrounds = new javax.swing.JLabel();
increaseColor = new javax.swing.JLabel();
obsoleteWarning = new javax.swing.JCheckBox();
calcConflictWarning = new javax.swing.JCheckBox();
debug = new javax.swing.JCheckBox();
btnCancel = new javax.swing.JButton();
btnOk = new javax.swing.JButton();
btnApply = new javax.swing.JButton();
reset = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
lblAxis = new javax.swing.JLabel();
lblHighlight = new javax.swing.JLabel();
lblMin = new javax.swing.JLabel();
lblMax = new javax.swing.JLabel();
maxColor = new javax.swing.JLabel();
minColor = new javax.swing.JLabel();
highlightColor = new javax.swing.JLabel();
axisColor = new javax.swing.JLabel();
jPanel3 = new javax.swing.JPanel();
lblIncrease = new javax.swing.JLabel();
increaseColor = new javax.swing.JLabel();
decreaseColor = new javax.swing.JLabel();
lblBorders = new javax.swing.JLabel();
lblCellSize = new javax.swing.JLabel();
lblDecrease = new javax.swing.JLabel();
lblCellHeight = new javax.swing.JLabel();
lblCellWidth = new javax.swing.JLabel();
cellWidth = new javax.swing.JTextField();
cellHeight = new javax.swing.JTextField();
singleTableView = new javax.swing.JCheckBox();
cellWidth = new javax.swing.JTextField();
lblCellWidth = new javax.swing.JLabel();
lblFont = new javax.swing.JLabel();
btnChooseFont = new javax.swing.JButton();
reset = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
tableClickCount = new javax.swing.JComboBox();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Enginuity Settings");
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setFont(new java.awt.Font("Tahoma", 0, 11));
lblEcuDef.setText("ECU Definition File:");
btnEcuDefinitionBrowse.setText("Browse");
lblMax.setText("Maximum Value:");
lblMin.setText("Minimum Value:");
lblHighlight.setText("Highlighted Cell:");
lblAxis.setText("Axis Cell:");
maxColor.setBackground(new java.awt.Color(255, 0, 0));
maxColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
maxColor.setOpaque(true);
minColor.setBackground(new java.awt.Color(255, 0, 0));
minColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
minColor.setOpaque(true);
highlightColor.setBackground(new java.awt.Color(255, 0, 0));
highlightColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
highlightColor.setOpaque(true);
axisColor.setBackground(new java.awt.Color(255, 0, 0));
axisColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
axisColor.setOpaque(true);
lblIncrease.setText("Increased Value:");
lblDecrease.setText("Decreased Value:");
lblBackgrounds.setText("Backgrounds");
increaseColor.setBackground(new java.awt.Color(255, 0, 0));
increaseColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
increaseColor.setOpaque(true);
obsoleteWarning.setText("Warn me when opening out of date ECU image revision");
obsoleteWarning.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
obsoleteWarning.setMargin(new java.awt.Insets(0, 0, 0, 0));
@ -159,28 +133,169 @@ public class SettingsForm extends JFrame implements MouseListener {
btnApply.setMnemonic('A');
btnApply.setText("Apply");
reset.setText("Restore Defaults");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Data Cells"));
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Background"));
lblAxis.setText("Axis Cell:");
lblHighlight.setText("Highlighted Cell:");
lblMin.setText("Minimum Value:");
lblMax.setText("Maximum Value:");
maxColor.setBackground(new java.awt.Color(255, 0, 0));
maxColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
maxColor.setOpaque(true);
minColor.setBackground(new java.awt.Color(255, 0, 0));
minColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
minColor.setOpaque(true);
highlightColor.setBackground(new java.awt.Color(255, 0, 0));
highlightColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
highlightColor.setOpaque(true);
axisColor.setBackground(new java.awt.Color(255, 0, 0));
axisColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
axisColor.setOpaque(true);
org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(lblAxis)
.add(lblHighlight)
.add(lblMin))
.add(lblMax))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel2Layout.createSequentialGroup()
.add(lblMax)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(lblMin)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(lblHighlight)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(lblAxis))
);
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Border"));
lblIncrease.setText("Increased Value:");
increaseColor.setBackground(new java.awt.Color(255, 0, 0));
increaseColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
increaseColor.setOpaque(true);
decreaseColor.setBackground(new java.awt.Color(255, 0, 0));
decreaseColor.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
decreaseColor.setOpaque(true);
lblBorders.setText("Borders");
lblDecrease.setText("Decreased Value:");
lblCellSize.setText("Cell Size");
org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createSequentialGroup()
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(lblDecrease)
.add(jPanel3Layout.createSequentialGroup()
.add(3, 3, 3)
.add(lblIncrease)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createSequentialGroup()
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblIncrease))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblDecrease)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(42, Short.MAX_VALUE))
);
lblCellHeight.setText("Height:");
lblCellWidth.setText("Width:");
singleTableView.setText("Open tables in place of existing tables");
singleTableView.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
singleTableView.setEnabled(false);
singleTableView.setMargin(new java.awt.Insets(0, 0, 0, 0));
lblFont.setText("Font");
lblFont.setText("Font:");
btnChooseFont.setText("Choose");
reset.setText("Restore Defaults");
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
.add(jPanel1Layout.createSequentialGroup()
.add(lblCellHeight)
.add(10, 10, 10)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(btnChooseFont, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
.add(jPanel1Layout.createSequentialGroup()
.add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 57, Short.MAX_VALUE)))))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(lblCellWidth)
.add(10, 10, 10)
.add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jPanel1Layout.createSequentialGroup()
.add(lblFont)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblCellHeight)
.add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblCellWidth)
.add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblFont)
.add(btnChooseFont, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
);
jLabel1.setText("click to open tables");
tableClickCount.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Single", "Double" }));
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
@ -190,77 +305,11 @@ public class SettingsForm extends JFrame implements MouseListener {
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(10, 10, 10)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(lblEcuDef)
.add(layout.createSequentialGroup()
.add(ecuDefinitionFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 257, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnEcuDefinitionBrowse))))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(calcConflictWarning)
.add(obsoleteWarning)
.add(singleTableView)
.add(debug)))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(lblAxis)
.add(lblHighlight)
.add(lblMin))
.add(lblMax))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createSequentialGroup()
.add(53, 53, 53)
.add(lblCellSize)))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(57, 57, 57)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(lblDecrease)
.add(layout.createSequentialGroup()
.add(3, 3, 3)
.add(lblIncrease)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createSequentialGroup()
.add(47, 47, 47)
.add(lblBorders))
.add(btnChooseFont, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(lblFont)
.add(65, 65, 65))))
.add(layout.createSequentialGroup()
.add(47, 47, 47)
.add(lblBackgrounds))))
.add(layout.createSequentialGroup()
.add(20, 20, 20)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(lblCellWidth)
.add(lblCellHeight))
.add(ecuDefinitionFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 257, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(layout.createSequentialGroup()
.add(10, 10, 10)
.add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(btnEcuDefinitionBrowse)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(reset)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 34, Short.MAX_VALUE)
@ -268,7 +317,23 @@ public class SettingsForm extends JFrame implements MouseListener {
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnOk)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnCancel)))
.add(btnCancel))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(calcConflictWarning)
.add(obsoleteWarning)
.add(debug)
.add(layout.createSequentialGroup()
.add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel1))))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(lblEcuDef)))
.addContainerGap())
);
layout.setVerticalGroup(
@ -280,58 +345,19 @@ public class SettingsForm extends JFrame implements MouseListener {
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnEcuDefinitionBrowse)
.add(ecuDefinitionFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(27, 27, 27)
.add(28, 28, 28)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel1)
.add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(obsoleteWarning)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(calcConflictWarning)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(singleTableView)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(debug)
.add(31, 31, 31)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(lblBorders)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblIncrease))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblDecrease)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(layout.createSequentialGroup()
.add(lblBackgrounds)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblMax)
.add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblMin)
.add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblHighlight)
.add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblAxis)
.add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(29, 29, 29)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblCellSize)
.add(lblFont))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblCellWidth)
.add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(btnChooseFont, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblCellHeight)
.add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 30, Short.MAX_VALUE)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(34, 34, 34)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnCancel)
.add(btnOk)
@ -437,7 +463,6 @@ public class SettingsForm extends JFrame implements MouseListener {
settings.setObsoleteWarning(obsoleteWarning.isSelected());
settings.setCalcConflictWarning(calcConflictWarning.isSelected());
settings.setSingleTableView(singleTableView.isSelected());
settings.setDebug(debug.isSelected());
settings.setMaxColor(maxColor.getBackground());
@ -452,6 +477,12 @@ public class SettingsForm extends JFrame implements MouseListener {
settings.setTableFont(btnChooseFont.getFont());
if (tableClickCount.getSelectedIndex() == 0) { // single click opens table
settings.setTableClickCount(1);
} else { // double click opens table
settings.setTableClickCount(2);
}
parent.setSettings(settings);
}
@ -475,11 +506,12 @@ public class SettingsForm extends JFrame implements MouseListener {
private javax.swing.JTextField ecuDefinitionFile;
private javax.swing.JLabel highlightColor;
private javax.swing.JLabel increaseColor;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JLabel lblAxis;
private javax.swing.JLabel lblBackgrounds;
private javax.swing.JLabel lblBorders;
private javax.swing.JLabel lblCellHeight;
private javax.swing.JLabel lblCellSize;
private javax.swing.JLabel lblCellWidth;
private javax.swing.JLabel lblDecrease;
private javax.swing.JLabel lblEcuDef;
@ -492,7 +524,7 @@ public class SettingsForm extends JFrame implements MouseListener {
private javax.swing.JLabel minColor;
private javax.swing.JCheckBox obsoleteWarning;
private javax.swing.JButton reset;
private javax.swing.JCheckBox singleTableView;
private javax.swing.JComboBox tableClickCount;
// End of variables declaration//GEN-END:variables
}

View File

@ -119,6 +119,11 @@ public class DOMSettingsBuilder {
userLevel.setAttribute("value", settings.getUserLevel()+"");
options.appendChild(userLevel);
// table click count
IIOMetadataNode tableClickCount = new IIOMetadataNode("tableclickcount");
tableClickCount.setAttribute("value", settings.getTableClickCount()+"");
options.appendChild(tableClickCount);
return options;
}
@ -179,11 +184,6 @@ public class DOMSettingsBuilder {
tableDisplay.appendChild(colors);
// single table view
IIOMetadataNode singleTable = new IIOMetadataNode("singletableview");
singleTable.setAttribute("value", settings.isSingleTableView()+"");
tableDisplay.appendChild(singleTable);
return tableDisplay;
}
}

View File

@ -117,6 +117,10 @@ public class DOMSettingsUnmarshaller {
} else if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("userlevel")) {
settings.setUserLevel(unmarshallAttribute(n, "value", 4));
} else if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("tableclickcount")) {
settings.setTableClickCount(unmarshallAttribute(n, "value", 2));
}
}
return settings;
@ -140,10 +144,6 @@ public class DOMSettingsUnmarshaller {
} else if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("colors")) {
settings = unmarshallColors(n, settings);
} else if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equalsIgnoreCase("singletableview")) {
settings.setDebug(unmarshallAttribute(n, "value", true));
}
}
return settings;