Examples of HIGConstraints


Examples of cz.autel.dmi.HIGConstraints

    JPanel mainPanel = new JPanel();
    HIGLayout higLayout = new HIGLayout(new int[] { 0, 30, 0 }, new int[] {10, 30, 0, 0, 20, 50});
    higLayout.setColumnWeight(3, 1);
    higLayout.setRowWeight(3, 1);
    HIGConstraints constraints = new HIGConstraints();
    sideImage = new JLabel();
    titleLabel = new JLabel();
    descriptionLabel = new JBreakingLabel();
    titleLabel.setForeground(Color.black);
    titleLabel.setFont(headingFont);
    mainPanel.setLayout(higLayout);
    mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
    mainPanel.add(sideImage, constraints.rcwh(1,1,1,6, "rlt"));
    mainPanel.add(titleLabel, constraints.rcwh(2,3,1,1, "lt"));
    mainPanel.add(componentPanel, constraints.rc(4,3, "lrb"));
    mainPanel.add(descriptionLabel, constraints.rc(3,3));
    mainPanel.add(lowerPanel, constraints.rcwh(6,1,3,1));
    getContentPane().add(mainPanel, BorderLayout.CENTER);
    getRootPane().setDefaultButton(nextButton);
    setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);

    addWindowListener(new WindowAdapter() {
View Full Code Here

Examples of cz.autel.dmi.HIGConstraints

      heights[i * 4 + 3] = 0; // label
    }
    heights[childCount * 4 + 1] = heights[0] = 30; // upper + lower spacing

    HIGLayout layout = new HIGLayout(new int[] { 0, 0, 0 }, heights);
    HIGConstraints constraints = new HIGConstraints();
    layout.setColumnWeight(1, 1);
    layout.setColumnWeight(3, 1);
    layout.setRowWeight(0, 1);
    layout.setRowWeight(childCount * 4 + 2, 1);
    panel.setLayout(layout);
    panel.removeAll();

    for (int i = 0; i < childCount; i++) {
      JButton button = (JButton) getChild(i).getRealWidget();
      String text = button.getText();
      button.setText(null);
      panel.add(button, constraints.rc(i * 4 + 2, 2));
      JLabel label = new JLabel(text);
      label.setForeground(Color.white);
      panel.add(label, constraints.rcwh(i * 4 + 4, 1, 3, 1, ""));
    }
    isConstructed = true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.