|
|
@ -134,8 +134,7 @@ public class DesignerLogHandler { |
|
|
|
private UIMenuItem clear; |
|
|
|
private UIMenuItem clear; |
|
|
|
|
|
|
|
|
|
|
|
private LogHandlerArea() { |
|
|
|
private LogHandlerArea() { |
|
|
|
jTextArea = new JTextPane(); |
|
|
|
jTextArea = initLogJTextArea(); |
|
|
|
|
|
|
|
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
UIScrollPane js = new UIScrollPane(jTextArea); |
|
|
|
UIScrollPane js = new UIScrollPane(jTextArea); |
|
|
|
this.add(js, BorderLayout.CENTER); |
|
|
|
this.add(js, BorderLayout.CENTER); |
|
|
@ -190,6 +189,23 @@ public class DesignerLogHandler { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JTextPane initLogJTextArea() { |
|
|
|
|
|
|
|
JTextPane resultPane = new JTextPane(); |
|
|
|
|
|
|
|
InputMap inputMap = resultPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); |
|
|
|
|
|
|
|
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER), "copy"); |
|
|
|
|
|
|
|
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_L, DEFAULT_MODIFIER), "clear"); |
|
|
|
|
|
|
|
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER), "select-all"); |
|
|
|
|
|
|
|
ActionMap actionMap = resultPane.getActionMap(); |
|
|
|
|
|
|
|
actionMap.put("clear", new AbstractAction() { |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
|
|
|
resultPane.setText(""); |
|
|
|
|
|
|
|
caption.clearMessage(); |
|
|
|
|
|
|
|
DesignerLogImpl.getInstance().clear(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return resultPane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void printStackTrace(LogRecordTimeProvider logRecordTime) { |
|
|
|
public void printStackTrace(LogRecordTimeProvider logRecordTime) { |
|
|
|
LogRecord logRecord = logRecordTime.getLogRecord(); |
|
|
|
LogRecord logRecord = logRecordTime.getLogRecord(); |
|
|
|
Date date = logRecordTime.getDate(); |
|
|
|
Date date = logRecordTime.getDate(); |
|
|
@ -299,6 +315,4 @@ public class DesignerLogHandler { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |