This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-scxml.git
The following commit(s) were added to refs/heads/master by this push:
new 3f0664d Fix formatting
3f0664d is described below
commit 3f0664d4820e8e5f4adf1f0625343ce94345cd70
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Aug 22 10:11:28 2023 -0400
Fix formatting
---
.../apache/commons/scxml2/env/StopWatchDisplay.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/test/java/org/apache/commons/scxml2/env/StopWatchDisplay.java
b/src/test/java/org/apache/commons/scxml2/env/StopWatchDisplay.java
index 190eb0b..315aa74 100644
--- a/src/test/java/org/apache/commons/scxml2/env/StopWatchDisplay.java
+++ b/src/test/java/org/apache/commons/scxml2/env/StopWatchDisplay.java
@@ -85,10 +85,8 @@ public class StopWatchDisplay extends JFrame
}
private void setupUI() {
- final URL imageURL = this.getClass().getClassLoader().
- getResource("org/apache/commons/scxml2/env/stopwatch.gif");
- final URL iconURL = this.getClass().getClassLoader().
- getResource("org/apache/commons/scxml2/env/stopwatchicon.gif");
+ final URL imageURL =
this.getClass().getClassLoader().getResource("org/apache/commons/scxml2/env/stopwatch.gif");
+ final URL iconURL =
this.getClass().getClassLoader().getResource("org/apache/commons/scxml2/env/stopwatchicon.gif");
final Toolkit kit = Toolkit.getDefaultToolkit();
watchImage = kit.createImage(imageURL);
final Image watchIcon = kit.createImage(iconURL);
@@ -105,20 +103,18 @@ public class StopWatchDisplay extends JFrame
split.setEnabled(false);
panel.add(split, BorderLayout.LINE_END);
pack();
- setLocation(200,200);
+ setLocation(200, 200);
setIconImage(watchIcon);
setResizable(false);
- setSize(300,125);
+ setSize(300, 125);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
final Timer displayTimer = new Timer();
displayTimer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
- display.setText(DISPLAY_PREFIX + stopWatch.getDisplay()
- + DISPLAY_SUFFIX);
- state.setText(STATE_PREFIX + stopWatch.getCurrentState()
- + STATE_SUFFIX);
+ display.setText(DISPLAY_PREFIX + stopWatch.getDisplay() +
DISPLAY_SUFFIX);
+ state.setText(STATE_PREFIX + stopWatch.getCurrentState() +
STATE_SUFFIX);
}
}, 100, 100);
}
@@ -136,8 +132,8 @@ public class StopWatchDisplay extends JFrame
class WatchPanel extends JPanel {
@Override
public void paintComponent(final Graphics g) {
- if(watchImage != null) {
-
g.drawImage(watchImage,0,0,this.getWidth(),this.getHeight(),this);
+ if (watchImage != null) {
+ g.drawImage(watchImage, 0, 0, this.getWidth(),
this.getHeight(), this);
}
}
}