*/
JComponent partnerColumn = SBoxLayout.createContainer(SBoxLayout.VERTICAL, padding);
partnersOfferLabel = new JLabel("Partner's offer");
partnersOfferLabel.setAlignmentX(CENTER_ALIGNMENT);
partnerColumn.add(partnersOfferLabel);
partnerSlots = new SlotGrid(2, 2);
partnerColumn.add(partnerSlots);
partnerOfferStatus = new JLabel("Changing");
partnerOfferStatus.setAlignmentX(CENTER_ALIGNMENT);
partnerColumn.add(partnerOfferStatus);
acceptButton = new JButton("Accept");
acceptButton.setEnabled(false);
acceptButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
controller.acceptTrade();
}
});
acceptButton.setAlignmentX(RIGHT_ALIGNMENT);
partnerColumn.add(acceptButton);
slotRow.add(partnerColumn);
slotRow.add(new JSeparator(SwingConstants.VERTICAL),
SBoxLayout.constraint(SLayout.EXPAND_Y));
/*
* Create user offer's side
*/
JComponent myColumn = SBoxLayout.createContainer(SBoxLayout.VERTICAL, SBoxLayout.COMMON_PADDING);
JLabel myOfferLabel = new JLabel("My offer");
myOfferLabel.setAlignmentX(CENTER_ALIGNMENT);
myColumn.add(myOfferLabel);
mySlots = new SlotGrid(2, 2);
myColumn.add(mySlots);
slotRow.add(myColumn);
myOfferStatus = new JLabel("Changing");
myOfferStatus.setAlignmentX(CENTER_ALIGNMENT);