Examples of HIGLayout


Examples of cz.autel.dmi.HIGLayout

    try {
      for (int i = 0; i < horizCount; i++)
        h[i] = Integer.parseInt(horiz.nextToken());
      for (int i = 0; i < vertCount; i++)
        v[i] = Integer.parseInt(vert.nextToken());
      HIGLayout layout = new HIGLayout(h, v);

      if (!layoutNode.getAttribute("hweights").equals("")) {
        StringTokenizer hweights = new StringTokenizer(layoutNode.getAttribute("hweights"), ",");
        int hweightsCount = hweights.countTokens();

        for (int i = 0; i < hweightsCount; i++) {
          layout.setColumnWeight(i + 1, Integer.parseInt(hweights.nextToken()));
        }
      }
      if (!layoutNode.getAttribute("vweights").equals("")) {
        StringTokenizer vweights = new StringTokenizer(layoutNode.getAttribute("vweights"), ",");
        int vweightsCount = vweights.countTokens();

        for (int i = 0; i < vweightsCount; i++) {
          layout.setRowWeight(i + 1, Integer.parseInt(vweights.nextToken()));
        }
      }
      return layout;
    } catch (NumberFormatException e) {
      throw new GUIException("Invalid layout data", e);
View Full Code Here

Examples of cz.autel.dmi.HIGLayout

  public void recreateLayout() throws GUIException {
    LayoutManager manager = panel.getLayout();
    if (manager instanceof HIGLayout && !(this instanceof Group)) {
      /* Recreate the hig layout. Why is this needed? */
      HIGLayout layout = (HIGLayout) manager;
      HIGLayout newLayout = new HIGLayout(layout.getWidths(), layout.getHeights());
      for (int i=1; i<layout.getColumnWeights().length; i++)
        newLayout.setColumnWeight(i, layout.getColumnWeights()[i]);
      for (int i=1; i<layout.getRowWeights().length; i++)
        newLayout.setRowWeight(i, layout.getRowWeights()[i]);
      panel.setLayout(newLayout);
    }
    revalidate();
  }
View Full Code Here

Examples of cz.autel.dmi.HIGLayout

    label = new Label(this, null);

    if (!(parent instanceof Group)) {
      /* If the parent is a Group, let it handle the layout */
      HIGLayout layout = new HIGLayout(width, heights);
      layout.setColumnWeight(3, 1);
      setProperty("layout", layout);
      super.addChild(label, constraints.rc(1, 1));
    }
  }
View Full Code Here

Examples of cz.autel.dmi.HIGLayout

    lowerPanel.add(Box.createVerticalStrut(5));
    lowerPanel.add(buttonPanel);
    lowerPanel.add(Box.createVerticalStrut(10));

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

Examples of cz.autel.dmi.HIGLayout

      heights[i * 4 + 2] = LFConstants.COMPONENT_SPACING; // button-label spacing
      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();
View Full Code Here

Examples of cz.autel.dmi.HIGLayout

      heights[widgets.size() * 2 - 1] = buttons.size() > 0 ? CONTENT_BUTTON_SPACING : 0;
      if (buttons.size() > 0)
        heights[heights.length-1] = 3; // hack to fix annoying cut-off buttons occuring in some dialogs
    }

    HIGLayout layout = new HIGLayout(widths, heights);
    layout.setRowWeight(widgets.size() * 2, 1);
    layout.setColumnWeight(3, 1);
    panel.setLayout(layout);
 
    for (int i = 0; i < widgets.size(); i++) {
      Widget widget = (Widget) widgets.get(i);
      if (widget instanceof LabeledWidget) {
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.