Skip to content

Commit

Permalink
Added Clear operation
Browse files Browse the repository at this point in the history
  • Loading branch information
M4444 committed May 20, 2018
1 parent 5777995 commit f9a8276
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Binary file modified dist/C41C.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions src/c41c/Window.form
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,9 @@
<Insets value="[2, 2, 2, 2]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="BUTTON_ClearActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="BUTTON_CE">
<Properties>
Expand Down
14 changes: 14 additions & 0 deletions src/c41c/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
BUTTON_CC.setText("C");
BUTTON_CC.setToolTipText("");
BUTTON_CC.setMargin(new java.awt.Insets(2, 2, 2, 2));
BUTTON_CC.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
BUTTON_ClearActionPerformed(evt);
}
});

BUTTON_CE.setText("CE");
BUTTON_CE.setToolTipText("");
Expand Down Expand Up @@ -1567,6 +1572,15 @@ private void BUTTON_MRActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR
refreshTextArea();
}//GEN-LAST:event_BUTTON_MRActionPerformed

private void BUTTON_ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BUTTON_ClearActionPerformed
Operands[0] = BigInteger.ZERO;
Operands[1] = BigInteger.ZERO;
performOperation();
changeAllBits(Operands[Active]);

refreshTextArea();
}//GEN-LAST:event_BUTTON_ClearActionPerformed

private void testTextArea() {
long start=System.currentTimeMillis();

Expand Down

0 comments on commit f9a8276

Please sign in to comment.