setLayout(new GridBagLayout());
JPanel top_panel = new JPanel();
top_panel.add(address_label);
top_panel.add(address_field);
address_field.setEditable(false);
type_field.setEditable(false);
address_field.setPreferredSize(new Dimension(80, 20));
type_field.setPreferredSize(new Dimension(120, 20));
top_panel.add(type_label);
top_panel.add(type_field);
if (add_show_root_path_button) {
_root_path = new JButton("Show path from the root") {
public Dimension getPreferredSize() {
return new Dimension(160, 20);
}
};
_root_path.addActionListener(new ShowRootPathListener());
_root_path.setFont(_root_path.getFont().deriveFont(9.0f));
_root_path.setEnabled(false);
top_panel.add(_root_path);
} else { //this is show path from the root object
_stack_location = new JButton("Show stack trace") {
public Dimension getPreferredSize() {
return new Dimension(160, 20);
}
};
_stack_location.addActionListener(new ShowStackTraceListener());
_stack_location.setFont(_stack_location.getFont().deriveFont(9.0f));
_stack_location.setEnabled(false);
top_panel.add(_stack_location);
}
add(top_panel, new GridBagConstraints(0, 0, 1, 1, 1, 1,
GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
JPanel bottom_panel = new JPanel();
JScrollPane pane = new JScrollPane() {
public Dimension getPreferredSize() {return new Dimension(100, 220);}
};
_object_list = new JList();
_object_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
_object_list.addListSelectionListener(new ObjectListSelectionListener());
pane.getViewport().setView(_object_list);
bottom_panel.setLayout(new GridBagLayout());
bottom_panel.add(pane, new GridBagConstraints(0, 0, 1, 2, 1, 1,
GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
bottom_panel.add(new JLabel("Referees"), new GridBagConstraints(1, 0, 1, 1, 1, 1,
GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
bottom_panel.add(new JLabel("References"), new GridBagConstraints(2, 0, 1, 1, 1, 1,
GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
pane = new JScrollPane() {
public Dimension getPreferredSize() {
return new Dimension(220, 200);
}
};
pane.getViewport().setView(referees);
bottom_panel.add(pane, new GridBagConstraints(1, 1, 1, 1, 1, 21,
GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
pane = new JScrollPane() {
public Dimension getPreferredSize() {
return new Dimension(220, 200);
}
};
pane.getViewport().setView(references);
bottom_panel.add(pane, new GridBagConstraints(2, 1, 1, 1, 1, 21,
GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
add(bottom_panel, new GridBagConstraints(0, 1, 1, 1, 1, 20,
GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));