Package games.stendhal.client.gui

Examples of games.stendhal.client.gui.SlotGrid


     */
    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);
View Full Code Here

TOP

Related Classes of games.stendhal.client.gui.SlotGrid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.