Package javax.swing

Examples of javax.swing.GroupLayout$SpringDelta


    private CloudComputerPanel unassignedPanel;
    private Map<CloudComputer, CloudComputerPanel> computerToPanelMap;
    private Map<CloudProcess, CloudComputerPanel> processToPanelMap;

    public CloudBalancingPanel() {
        GroupLayout layout = new GroupLayout(this);
        setLayout(layout);
        JPanel headerPanel = createHeaderPanel();
        JPanel computersPanel = createComputersPanel();
        layout.setHorizontalGroup(layout.createParallelGroup()
                .addComponent(headerPanel).addComponent(computersPanel));
        layout.setVerticalGroup(layout.createSequentialGroup()
                .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                        GroupLayout.PREFERRED_SIZE)
                .addComponent(computersPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                        GroupLayout.PREFERRED_SIZE));
    }
View Full Code Here


        public MrProcessAssignmentListDialog() {
            setModal(true);
            setTitle(getMachineLabel());
            JPanel contentPanel = new JPanel();
            GroupLayout layout = new GroupLayout(contentPanel);
            contentPanel.setLayout(layout);
            JPanel assignmentsPanel = createAssignmentsPanel();
            JScrollPane contentScrollPane = new JScrollPane(assignmentsPanel);
            contentScrollPane.setPreferredSize(new Dimension(800, 200));
            contentScrollPane.getVerticalScrollBar().setUnitIncrement(20);
View Full Code Here

    /**
     * create the content of the demo frame
     */
    public LabelDemo() {
      super();
      final GroupLayout groupLayout = new GroupLayout(this);
      this.setLayout(groupLayout);
      groupLayout.setAutoCreateGaps(true);
      groupLayout.setAutoCreateContainerGaps(true);

      // Create the other labels
      this.label = new JLabel("Placeholder");

      // Create tool tips
      this.label.setToolTipText("The computed average of the last 10 triples");

      final JLabel textLabel = new JLabel(
          "The computed average of the last 10 triples: ");

      final JButton okButton = new JButton("Ok");
      okButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent ae) {
          TestStream.this.frame.dispose();
          TestStream.this.loop = false;
        }
      });

      okButton.setSize(okButton.getPreferredSize());

      // Add the labels.
      groupLayout.setHorizontalGroup(groupLayout.createSequentialGroup()
          .addGroup(
              groupLayout.createParallelGroup().addComponent(
                  textLabel).addComponent(this.label)
                  .addComponent(okButton)));

      groupLayout.setVerticalGroup(groupLayout.createSequentialGroup()
          .addComponent(textLabel).addComponent(this.label).addComponent(
              okButton));

    }
View Full Code Here

                } else if ((scriptPanel == p)) {
                    toReplace = scriptLastSharedPanelPlaceHolder;
                } else {
                    throw new RuntimeException("Unknown target JPanel");
                }
                GroupLayout oldLayout = (GroupLayout) sharedPanel.getParent().getLayout();
                oldLayout.replace(sharedPanel, sharedPanelPlaceHolder);
                GroupLayout newLayout = (GroupLayout) p.getLayout();
                newLayout.replace(toReplace, sharedPanel);
                oldLayout.replace(sharedPanelPlaceHolder, toReplace);
                if ((toReplace.getParent() == taskPanel)) {
                    taskLastSharedPanelPlaceHolder = toReplace;
                } else if ((toReplace.getParent() == manualControlPanel)) {
                    manualLastSharedPanelPlaceHolder = toReplace;
View Full Code Here

        if (null == tI) {
            label = statusMessageLabel;
        } else {
            label = tI.getStatusDisplayer();
        }
        GroupLayout layout = (GroupLayout) visibleStatusLabel.getParent().getLayout();
        layout.replace(visibleStatusLabel, label);
        visibleStatusLabel = label;
    }
View Full Code Here

                    //additionalPlayers - array that holds the additional players, null if empty
                   
               
            }
        });
        GroupLayout groupLayout = new GroupLayout(this);
        groupLayout.setHorizontalGroup(
          groupLayout.createParallelGroup(Alignment.TRAILING)
            .addGroup(groupLayout.createSequentialGroup()
              .addContainerGap(477, Short.MAX_VALUE)
              .addComponent(nextButton, GroupLayout.PREFERRED_SIZE, 117, GroupLayout.PREFERRED_SIZE)
              .addContainerGap())
            .addGroup(Alignment.LEADING, groupLayout.createSequentialGroup()
              .addGap(265)
              .addComponent(gameTitleLabel)
              .addContainerGap(264, Short.MAX_VALUE))
            .addGroup(Alignment.LEADING, groupLayout.createSequentialGroup()
              .addGap(109)
              .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
                .addComponent(addMembersLabel)
                .addComponent(professionTextField)
                .addComponent(enterNameLabel))
              .addGap(18)
              .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                .addComponent(additionalMembersList, GroupLayout.PREFERRED_SIZE, 134, GroupLayout.PREFERRED_SIZE)
                .addComponent(addButton, GroupLayout.PREFERRED_SIZE, 117, GroupLayout.PREFERRED_SIZE)
                .addComponent(professionList, GroupLayout.PREFERRED_SIZE, 134, GroupLayout.PREFERRED_SIZE)
                .addComponent(enterNameTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
              .addContainerGap(173, Short.MAX_VALUE))
        );
        groupLayout.setVerticalGroup(
          groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup()
              .addContainerGap()
              .addComponent(gameTitleLabel, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)
              .addGap(18)
              .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
                .addComponent(enterNameTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                .addComponent(enterNameLabel))
              .addGap(10)
              .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
                .addComponent(addButton)
                .addComponent(addMembersLabel))
              .addGap(4)
              .addComponent(additionalMembersList, GroupLayout.PREFERRED_SIZE, 115, GroupLayout.PREFERRED_SIZE)
              .addPreferredGap(ComponentPlacement.UNRELATED)
              .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
                .addComponent(professionList, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE)
                .addComponent(professionTextField))
              .addGap(41)
              .addComponent(nextButton)
              .addContainerGap())
View Full Code Here

                cd.previous(myCD);
            }
        });
       
        JLabel lblNewLabel = new JLabel("Rations and Pace");
        GroupLayout groupLayout = new GroupLayout(this);
        groupLayout.setHorizontalGroup(
            groupLayout.createParallelGroup(Alignment.LEADING)
                .addGroup(groupLayout.createSequentialGroup()
                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                        .addGroup(groupLayout.createSequentialGroup()
                            .addContainerGap(268, Short.MAX_VALUE)
                            .addComponent(backButton)
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addComponent(nextButton2))
                        .addGroup(groupLayout.createSequentialGroup()
                            .addGap(238)
                            .addComponent(lblNewLabel))
                        .addGroup(groupLayout.createSequentialGroup()
                            .addGap(190)
                            .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
                                .addGroup(groupLayout.createSequentialGroup()
                                    .addComponent(paceLabel)
                                    .addPreferredGap(ComponentPlacement.UNRELATED)
                                    .addComponent(paceList, GroupLayout.PREFERRED_SIZE, 118, GroupLayout.PREFERRED_SIZE))
                                .addGroup(groupLayout.createSequentialGroup()
                                    .addComponent(rationsLabel)
                                    .addPreferredGap(ComponentPlacement.UNRELATED)
                                    .addComponent(rationsList, GroupLayout.PREFERRED_SIZE, 118, GroupLayout.PREFERRED_SIZE)))))
                    .addContainerGap())
        );
        groupLayout.setVerticalGroup(
            groupLayout.createParallelGroup(Alignment.TRAILING)
                .addGroup(groupLayout.createSequentialGroup()
                    .addGap(33)
                    .addComponent(lblNewLabel)
                    .addGap(49)
                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                        .addComponent(paceLabel)
                        .addComponent(paceList, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE))
                    .addGap(54)
                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                        .addGroup(groupLayout.createSequentialGroup()
                            .addComponent(rationsList, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
                                .addComponent(nextButton2)
                                .addComponent(backButton)))
                        .addComponent(rationsLabel))
                    .addContainerGap())
        );
        groupLayout.linkSize(SwingConstants.HORIZONTAL, new Component[] {rationsList, paceList});
        groupLayout.linkSize(SwingConstants.HORIZONTAL, new Component[] {nextButton2, backButton, lblNewLabel});
        setLayout(groupLayout);
    }
View Full Code Here

        myCD.add(new TakingMoveFrame(myControl, myCD, "Event"), "takeMove");
        cd.last(myCD);
       
      }
    });
    GroupLayout groupLayout = new GroupLayout(this);
    groupLayout.setHorizontalGroup(
      groupLayout.createParallelGroup(Alignment.LEADING)
        .addGroup(groupLayout.createSequentialGroup()
          .addContainerGap(114, Short.MAX_VALUE)
          .addComponent(eventPicture)
          .addGap(120))
        .addGroup(groupLayout.createSequentialGroup()
          .addGap(50)
          .addComponent(lblBigJlabelDescribing, GroupLayout.PREFERRED_SIZE, 352, GroupLayout.PREFERRED_SIZE)
          .addContainerGap(32, Short.MAX_VALUE))
        .addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
          .addContainerGap(326, Short.MAX_VALUE)
          .addComponent(btnNewButton)
          .addGap(19))
    );
    groupLayout.setVerticalGroup(
      groupLayout.createParallelGroup(Alignment.LEADING)
        .addGroup(groupLayout.createSequentialGroup()
          .addGap(138)
          .addComponent(eventPicture)
          .addGap(28)
          .addComponent(lblBigJlabelDescribing, GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE)
          .addPreferredGap(ComponentPlacement.RELATED)
View Full Code Here

        clothingTextField.getDocument().addDocumentListener(this);
        ammunitionTextField.getDocument().addDocumentListener(this);
        fCapacitorTextField.getDocument().addDocumentListener(this);
        hullPartsTextField.getDocument().addDocumentListener(this);
        fuelCellsTextField.getDocument().addDocumentListener(this);
        GroupLayout groupLayout = new GroupLayout(this);
        groupLayout.setHorizontalGroup(
          groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup()
              .addContainerGap()
              .addComponent(storePanel, GroupLayout.DEFAULT_SIZE, 588, Short.MAX_VALUE)
              .addContainerGap())
        );
        groupLayout.setVerticalGroup(
          groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup()
              .addContainerGap()
              .addComponent(storePanel, GroupLayout.DEFAULT_SIZE, 411, Short.MAX_VALUE)
              .addContainerGap())
        );
        storePanel.setLayout(null);
View Full Code Here

                cd.last(myCD);
        }
    });
   

    GroupLayout groupLayout = new GroupLayout(this);
    groupLayout.setHorizontalGroup(
        groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup()
                .addGap(68)
                .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                    .addGroup(groupLayout.createSequentialGroup()
                        .addComponent(takeTurnButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(117))
                    .addGroup(groupLayout.createSequentialGroup()
                        .addComponent(btnInventory)
                        .addPreferredGap(ComponentPlacement.RELATED)))
                .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                    .addComponent(changePaceRationsButton, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE)
                    .addComponent(turnStatusLabel, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
                    .addComponent(foodStatusLabel, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
                    .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING, false)
                        .addComponent(currentLocationStatusLabel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(paceStatusLabel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(rationsStatusLabel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(distanceStatusLabel, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)))
                .addGap(93))
            .addGroup(Alignment.LEADING, groupLayout.createSequentialGroup()
          .addContainerGap()
          .addComponent(panel, GroupLayout.DEFAULT_SIZE, 588, Short.MAX_VALUE)
          .addContainerGap())
            .addGroup(groupLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(separator, GroupLayout.DEFAULT_SIZE, 494, Short.MAX_VALUE)
                .addContainerGap())
    );
    groupLayout.setVerticalGroup(
        groupLayout.createParallelGroup(Alignment.TRAILING)
            .addGroup(groupLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panel, GroupLayout.PREFERRED_SIZE, 178, GroupLayout.PREFERRED_SIZE)
          .addPreferredGap(ComponentPlacement.RELATED)
                .addComponent(separator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(ComponentPlacement.RELATED)
                .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                    .addGroup(groupLayout.createSequentialGroup()
                        .addGap(8)
                        .addComponent(turnStatusLabel, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
                        .addGap(11)
                        .addComponent(foodStatusLabel, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
                        .addGap(11)
                        .addComponent(distanceStatusLabel, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
                        .addGap(11)
                        .addComponent(rationsStatusLabel, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(ComponentPlacement.RELATED, 101, Short.MAX_VALUE)
                        .addComponent(paceStatusLabel, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
                        .addGap(11)
                        .addComponent(currentLocationStatusLabel, GroupLayout.PREFERRED_SIZE, 14, GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(ComponentPlacement.UNRELATED)
                        .addComponent(changePaceRationsButton, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE)
                        .addGap(16))
                    .addGroup(groupLayout.createSequentialGroup()
                        .addPreferredGap(ComponentPlacement.RELATED, 131, Short.MAX_VALUE)
                        .addComponent(takeTurnButton, GroupLayout.PREFERRED_SIZE, 46, GroupLayout.PREFERRED_SIZE)
                        .addGap(52)
                        .addComponent(btnInventory)
                        .addGap(27))))
    );
    groupLayout.linkSize(SwingConstants.HORIZONTAL, new Component[] {turnStatusLabel, foodStatusLabel, distanceStatusLabel, rationsStatusLabel, paceStatusLabel, currentLocationStatusLabel, changePaceRationsButton});
        setLayout(groupLayout);
  }
View Full Code Here

TOP

Related Classes of javax.swing.GroupLayout$SpringDelta

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.