Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
v1_0_0
Browse files Browse the repository at this point in the history
  • Loading branch information
seimsel committed Jun 10, 2014
1 parent 82b88ed commit 96c3110
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
Binary file not shown.
Binary file modified bin/ch/fhnw/ht/eit/p2/impedancepro/InputPanel$ValuePanel.class
Binary file not shown.
Binary file modified bin/ch/fhnw/ht/eit/p2/impedancepro/InputPanel.class
Binary file not shown.
40 changes: 30 additions & 10 deletions src/ch/fhnw/ht/eit/p2/impedancepro/InputPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,37 @@ public void setTopology(int topology) {
valuePanel.lbTolerance2Unit.setVisible(false);
break;
}

if (topology == SourceLoadNetwork.Z) {
valuePanel.tfValue2.setRange(-1e21, 1e21);
} else {
valuePanel.tfValue2.setRange(1e-21, 1e21);

switch (topology) {
default:
case SourceLoadNetwork.R:
valuePanel.tfValue1.setRange(1e-6, 1e3);
valuePanel.tfValue2.setRange(0, 0);
break;
case SourceLoadNetwork.R_PAR_C:
valuePanel.tfValue1.setRange(1e-3, 1e6);
valuePanel.tfValue2.setRange(1e-15, 1e-6);
break;
case SourceLoadNetwork.R_SER_C:
valuePanel.tfValue1.setRange(1e-6, 1e3);
valuePanel.tfValue2.setRange(1e-15, 1e-6);
break;
case SourceLoadNetwork.R_PAR_L:
valuePanel.tfValue1.setRange(1e-3, 1e6);
valuePanel.tfValue2.setRange(1e-15, 1e-3);
break;
case SourceLoadNetwork.R_SER_L:
valuePanel.tfValue1.setRange(1e-6, 1e3);
valuePanel.tfValue2.setRange(1e-15, 1e-4);
break;
case SourceLoadNetwork.Z:
valuePanel.tfValue1.setRange(1e-6, 1e3);
valuePanel.tfValue2.setRange(-1e3, 1e3);
break;
}

valuePanel.tfTolerance1.setRange(0, 99);
valuePanel.tfTolerance2.setRange(0, 99);

this.topology = topology;
}
Expand Down Expand Up @@ -264,11 +289,6 @@ public ValuePanel() {
tfTolerance1.addActionListener(InputPanel.this);
tfTolerance2.addActionListener(InputPanel.this);

tfValue1.setRange(1e-21, 1e21);
tfValue2.setRange(1e-21, 1e21);
tfTolerance1.setRange(0, 99);
tfTolerance2.setRange(0, 99);

add(lbValue1);
add(tfValue1);
add(lbValue1Unit);
Expand Down

0 comments on commit 96c3110

Please sign in to comment.