MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / showLog

Method showLog

CodenameOne/src/com/codename1/io/Log.java:354–375  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352 ///
353 /// this method is an outdated method that's no longer supported
354 public static void showLog() {
355 try {
356 String text = getLogContent();
357 TextArea area = new TextArea(text, 5, 20);
358 Form f = new Form("Log");
359 f.setScrollable(false);
360 final Form current = Display.getInstance().getCurrent();
361 Command back = new Command("Back") {
362 @Override
363 public void actionPerformed(ActionEvent ev) {
364 current.show();
365 }
366 };
367 f.addCommand(back);
368 f.setBackCommand(back);
369 f.setLayout(new BorderLayout());
370 f.addComponent(BorderLayout.CENTER, area);
371 f.show();
372 } catch (Exception ex) {
373 ex.printStackTrace();
374 }
375 }
376
377 /// Returns the singleton instance of the log
378 ///

Callers 1

invokeStatic9Method · 0.80

Calls 10

getLogContentMethod · 0.95
setScrollableMethod · 0.95
getInstanceMethod · 0.95
addCommandMethod · 0.95
setBackCommandMethod · 0.95
setLayoutMethod · 0.95
addComponentMethod · 0.95
showMethod · 0.95
getCurrentMethod · 0.45
printStackTraceMethod · 0.45

Tested by

no test coverage detected