~puzzleduck/adbassist/trunk

« back to all changes in this revision

Viewing changes to src/com/puzzleduck/adbassist/ADBdevices.java

  • Committer: PuZZleDucK
  • Date: 2012-08-12 10:50:11 UTC
  • Revision ID: puzzleduck-20120812105011-h4j527lwwb4munn3
ok.. fixed up utility UI... debug is still ugly, but non functional anyhow untill i can get background processing going

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        
265
265
//        fsTree.connect(new TreeView.RowExpanded() {
266
266
//        });
267
 
                        
268
 
        
269
 
 
270
 
                //TODO: 
271
 
                //TODO: 
272
 
                //TODO: 
273
 
                //TODO: 
274
 
                //TODO: 
275
 
                
276
 
                
277
 
                
278
 
 
279
 
                
280
 
                
281
 
 
282
 
//              VSeparator vSeparator2 = new VSeparator();
283
 
//              newDeviceTable.attach(vSeparator2,3,4,0,7);
284
 
                
 
267
                //TODO: 
 
268
 
 
269
                
 
270
 
 
271
 
 
272
                JPanel utilityPanel = new JPanel();
 
273
                setupBoxLayout(utilityPanel);
 
274
                newDeviceTable.add(utilityPanel);
285
275
                //push install/uninstall
286
276
                JLabel pushInstallSystemLabel = new JLabel("Install application to device:");
287
 
                newDeviceTable.add(pushInstallSystemLabel);
 
277
                utilityPanel.add(pushInstallSystemLabel);
288
278
//              FileChooserButton appFileWidget = new FileChooserButton("Select .apk to install", FileChooserAction.OPEN);
289
279
                JButton appFileWidget = new JButton("Select .apk to install-nf sorry");
290
280
//              FileFilter apkFilter = new FileFilter("Android Application (APK)");
292
282
//              appFileWidget.addFilter(apkFilter); //filter .apk
293
283
                
294
284
                appFileWidget.addActionListener(new ADBinstall());
295
 
                newDeviceTable.add(appFileWidget);  //on use ... getFilename() 
296
 
 
297
 
                
 
285
                utilityPanel.add(appFileWidget);  //on use ... getFilename() 
 
286
 
 
287
//              pushAllPanel.add(pushAppPanel, BorderLayout.NORTH);
 
288
                
 
289
                
 
290
 
 
291
//              JPanel pushPanel = new JPanel();
 
292
//              setupBorderLayout(pushPanel);
298
293
                JLabel pushSystemLabel = new JLabel("Push file to device:");
299
 
                newDeviceTable.add(pushSystemLabel);
 
294
                utilityPanel.add(pushSystemLabel, BorderLayout.CENTER);
300
295
                JButton filePushWidget = new JButton("Select file to push-nf");
301
296
                filePushWidget.addActionListener(new ADBpush());
302
 
                newDeviceTable.add(filePushWidget);  //on use ... getFilename() 
 
297
                utilityPanel.add(filePushWidget, BorderLayout.SOUTH);  //on use ... getFilename() 
 
298
                
 
299
//              pushAllPanel.add(pushPanel, BorderLayout.SOUTH);
303
300
                
304
301
 
305
302
//              VSeparator vSeparator3 = new VSeparator();
319
316
                rebootRecoveryButton = new JButton("Recovery");
320
317
                
321
318
                JLabel rebootLabel = new JLabel("Reboot Device:\n"+ deviceName);
322
 
                newDeviceTable.add(rebootLabel);
323
 
                newDeviceTable.add(rebootButton);
324
 
                newDeviceTable.add(rebootBootloaderButton);
325
 
                newDeviceTable.add(rebootRecoveryButton);
 
319
                utilityPanel.add(rebootLabel);
 
320
                utilityPanel.add(rebootButton);
 
321
                utilityPanel.add(rebootBootloaderButton);
 
322
                utilityPanel.add(rebootRecoveryButton);
326
323
 
327
324
//              rebootButton.connect(new ADBreboot());
328
325
//              rebootRecoveryButton.connect(new ADBreboot());
340
337
 
341
338
//              final TextBuffer debugBuffer = new TextBuffer();
342
339
//              final TextBuffer debugBuffer = new TextBuffer();
343
 
                JScrollPane debugScroll = new JScrollPane();
 
340
//              JScrollPane debugScroll = new JScrollPane();
344
341
//              debugScroll.setPolicy(PolicyType.NEVER, PolicyType.ALWAYS);
345
342
                final JTextArea debugText = new JTextArea(); 
346
 
                debugScroll.add(debugText);
 
343
//              debugScroll.add(debugText);
347
344
                JLabel debugLabel = new JLabel("Debug output for "+ deviceName +":");
348
345
                newDeviceTable.add(debugLabel);
349
 
                newDeviceTable.add(debugScroll);
 
346
                newDeviceTable.add(debugText);
350
347
                debugText.setText("Sample debug text\nNot functional at the moment\nnext version maybe...");
351
348
 
352
349
                Runtime.getRuntime().addShutdownHook(new Thread(new Runnable()
384
381
 
385
382
                
386
383
        }
 
384
        private void setupBoxLayout(JPanel newPanel) {
 
385
 
 
386
 
 
387
                BoxLayout thisLayout = new BoxLayout(newPanel, BoxLayout.PAGE_AXIS);
 
388
                newPanel.setLayout(thisLayout);
 
389
                newPanel.setBackground(new Color(255,90,90));//grey
 
390
                newPanel.setBorder(BorderFactory.createLineBorder(Color.black));
 
391
 
 
392
                
 
393
        }
387
394
 
388
395
 
389
396