in src/org/jetbrains/plugins/ipnb/editor/panels/code/IpnbCodePanel.java [176:208]
private MouseAdapter createShowOutputListener(final OnePixelSplitter splitter, final JPanel secondPanel, JLabel label) {
return new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 1) {
showOutputPanel();
}
}
@Override
public void mouseEntered(MouseEvent e) {
updateBackground(UIUtil.getListSelectionBackground());
}
@Override
public void mouseExited(MouseEvent e) {
updateBackground(IpnbEditorUtil.getBackground());
}
private void updateBackground(Color background) {
secondPanel.setBackground(background);
label.setBackground(background);
}
private void showOutputPanel() {
setOutputStateInCell(false);
updateBackground(IpnbEditorUtil.getBackground());
splitter.setFirstComponent(null);
final JPanel outputPanel = createOutputPanel();
splitter.setSecondComponent(outputPanel);
}
};
}