From c44920edd2437ed05a5386b3c440011ebc03454d Mon Sep 17 00:00:00 2001 From: romanman Date: Mon, 2 Jun 2014 18:24:10 +0300 Subject: [PATCH] ProgramPlayDialog draft GUI improved --- .../src/main/java/org/ethereum/gui/ProgramPlayDialog.java | 7 ++++--- ethereumj-core/src/main/java/org/ethereum/vm/Program.java | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ethereumj-core/src/main/java/org/ethereum/gui/ProgramPlayDialog.java b/ethereumj-core/src/main/java/org/ethereum/gui/ProgramPlayDialog.java index 9a123997..0b2be4f0 100644 --- a/ethereumj-core/src/main/java/org/ethereum/gui/ProgramPlayDialog.java +++ b/ethereumj-core/src/main/java/org/ethereum/gui/ProgramPlayDialog.java @@ -65,21 +65,22 @@ public class ProgramPlayDialog extends JPanel implements ActionListener, ChangeL stepSlider.setPaintLabels(true); stepSlider.setBorder( BorderFactory.createEmptyBorder(0, 0, 10, 0)); - Font font = new Font("Serif", Font.ITALIC, 15); + Font font = new Font("Courier New", Font.PLAIN, 10); stepSlider.setFont(font); stepSlider.addChangeListener(this); //Create the label that displays the animation. - add(stepSlider); int i = stepSlider.getValue(); console = new JTextArea(outputList.get(i)); console.setFont(new Font("Courier New", Font.PLAIN, 13)); - console.setForeground(Color.GRAY); + console.setForeground(new Color(143, 170, 220)); + console.setBackground(Color.BLACK); add(console); + add(stepSlider); this.setPreferredSize(new Dimension(600, 300)); diff --git a/ethereumj-core/src/main/java/org/ethereum/vm/Program.java b/ethereumj-core/src/main/java/org/ethereum/vm/Program.java index 41e82497..2e56c4f4 100644 --- a/ethereumj-core/src/main/java/org/ethereum/vm/Program.java +++ b/ethereumj-core/src/main/java/org/ethereum/vm/Program.java @@ -210,7 +210,9 @@ public class Program { logger.debug(" -- STORAGE -- {}\n", storageData); - StringBuilder global = new StringBuilder(); + StringBuilder global = new StringBuilder("\n"); + if (stackData.length() > 0) stackData.append("\n"); + global.append(" -- OPS -- ").append(opsString).append("\n"); global.append(" -- STACK -- ").append(stackData).append("\n"); global.append(" -- MEMORY -- ").append(memoryData).append("\n");