Skip to content

Commit 51c5d27

Browse files
committed
stats
1 parent 3fd367d commit 51c5d27

5 files changed

Lines changed: 33 additions & 17 deletions

File tree

src/com/embege/androidcontroller/DeviceSelector.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import javax.swing.BorderFactory;
1414
import javax.swing.JButton;
1515
import javax.swing.JComboBox;
16+
import javax.swing.JComponent;
1617
import javax.swing.JList;
1718
import javax.swing.JPanel;
1819

@@ -24,6 +25,7 @@ public class DeviceSelector extends JPanel {
2425

2526
public DeviceSelector() {
2627
setBorder(BorderFactory.createTitledBorder("List of devices"));
28+
setAlignmentX(JComponent.LEFT_ALIGNMENT);
2729

2830
list = new JComboBox();
2931
add(list);

src/com/embege/androidcontroller/DrawPanel.java

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ static void getFrameBuffer() {
5252
*/
5353
p.waitFor();
5454

55+
56+
5557
}
5658
catch (IOException e)
5759
{
@@ -172,24 +174,27 @@ public void run()
172174
readThread.start();
173175
stop = false;
174176

175-
// convertThread = new Thread("convertThread")
176-
// {
177-
// public void run() {
178-
// while (true)
179-
// {
180-
// if (lastConvert < lastRead)
181-
// {
182-
// lastConvert++;
183-
// }
184-
// else
185-
// {
186-
// Thread.yield();
187-
// }
188-
// }
189-
// };
190-
//
191-
// };
177+
convertThread = new Thread("convertThread")
178+
{
179+
public void run() {
180+
while (true)
181+
{
182+
if (lastConvert < lastRead)
183+
{
184+
fb2bi();
185+
186+
self.repaint();
187+
188+
lastConvert++;
189+
}
190+
else
191+
{
192+
Thread.yield();
193+
}
194+
}
195+
};
192196

197+
};
193198
// convertThread.start();
194199

195200
}

src/com/embege/androidcontroller/Log.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.awt.Font;
66

77
import javax.swing.BorderFactory;
8+
import javax.swing.JComponent;
89
import javax.swing.JPanel;
910
import javax.swing.JScrollPane;
1011
import javax.swing.JTextArea;
@@ -25,6 +26,8 @@ private Log() {
2526
setBorder(BorderFactory.createTitledBorder("Log"));
2627
setPreferredSize(new Dimension(300, 110));
2728
setLayout(new BorderLayout());
29+
setAlignmentX(JComponent.LEFT_ALIGNMENT);
30+
2831
// setMinimumSize(new Dimension(100, 100));
2932
// setMaximumSize(new Dimension(10000, 200));
3033

src/com/embege/androidcontroller/SDKPath.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import javax.swing.BorderFactory;
88
import javax.swing.BoxLayout;
99
import javax.swing.JButton;
10+
import javax.swing.JComponent;
1011
import javax.swing.JFileChooser;
1112
import javax.swing.JLabel;
1213
import javax.swing.JPanel;
@@ -26,10 +27,13 @@ public class SDKPath extends JPanel {
2627

2728
public SDKPath()
2829
{
30+
setAlignmentX(JComponent.LEFT_ALIGNMENT);
2931
setBorder(BorderFactory.createTitledBorder("Path to adb"));
3032
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
3133

3234
tf = (JTextField) add (new JTextField(PATH2ADB) );
35+
tf.setColumns(180);
36+
tf.setMaximumSize( tf.getPreferredSize() );
3337

3438
JButton bu = (JButton) add(new JButton("Browse"));
3539
bu.addActionListener(new ActionListener() {

src/com/embege/androidcontroller/Stats.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import javax.swing.BorderFactory;
44
import javax.swing.BoxLayout;
5+
import javax.swing.JComponent;
56
import javax.swing.JLabel;
67
import javax.swing.JPanel;
78

@@ -17,6 +18,7 @@ public class Stats extends JPanel {
1718
public Stats() {
1819
setBorder(BorderFactory.createTitledBorder("Stats"));
1920
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
21+
setAlignmentX(JComponent.LEFT_ALIGNMENT);
2022

2123
jlRead = (JLabel) add ( new JLabel("Reading: "+DrawPanel.lastRead) );
2224
jlConv = (JLabel) add ( new JLabel("Converting: "+DrawPanel.lastConvert) );

0 commit comments

Comments
 (0)