Package org.dyno.visual.swing.layouts

Examples of org.dyno.visual.swing.layouts.Leading


    for (int i = 0; i < count; i++) {
      JComponent widget = (JComponent) container.getComponent(i);
      int gap = style.getContainerGap(widget, SwingConstants.EAST, container);
      Rectangle bounds = widget.getBounds();
      Spring spring = new Spring(gap, gap);
      Leading horizontal = new Leading(bounds.x, bounds.width, spring);
      gap = style.getContainerGap(widget, SwingConstants.SOUTH, container);
      spring = new Spring(gap, gap);
      Leading vertical = new Leading(bounds.y, bounds.height, spring);
      Constraints constraints = new Constraints(horizontal, vertical);
      comps.put(widget, constraints);
      array.add(widget);
    }
    container.removeAll();
View Full Code Here


  public void adjustLayout(Component widget) {
    GroupLayout layout = (GroupLayout) container.getLayout();
    Constraints constraints = layout.getConstraints(widget);
    Alignment horizontal = constraints.getHorizontal();
    if (horizontal instanceof Leading) {
      Leading leading = (Leading) horizontal;
      if (leading.getSize() == Alignment.PREFERRED) {
        int now_width = widget.getWidth();
        int pref_width = widget.getPreferredSize().width;
        int delta_width = pref_width - now_width;
        if (delta_width != 0) {
          adjustHorizontalLeadingBy(widget, delta_width);
          container.doLayout();
          container.validate();
        }
      } else {
        int delta_width = leading.getSize() - widget.getWidth();
        if (delta_width != 0) {
          adjustHorizontalLeadingBy(widget, delta_width);
          container.doLayout();
          container.validate();
        }
      }
    } else if (horizontal instanceof Trailing) {
      Trailing trailing = (Trailing) horizontal;
      if (trailing.getSize() == Alignment.PREFERRED) {
        int now_width = widget.getWidth();
        int pref_width = widget.getPreferredSize().width;
        int delta_width = pref_width - now_width;
        if (delta_width != 0) {
          adjustHorizontalTrailingBy(widget, delta_width);
          container.doLayout();
          container.validate();
        }
      } else {
        int delta_width = trailing.getSize() - widget.getWidth();
        if (delta_width != 0) {
          adjustHorizontalTrailingBy(widget, delta_width);
          container.doLayout();
          container.validate();
        }
      }
    }

    Alignment vertical = constraints.getVertical();
    if (vertical instanceof Leading) {
      Leading leading = (Leading) vertical;
      if (leading.getSize() == Alignment.PREFERRED) {
        int now_height = widget.getHeight();
        int pref_height = widget.getPreferredSize().height;
        int delta_height = pref_height - now_height;
        if (delta_height != 0) {
          adjustVerticalLeadingBy(widget, delta_height);
          container.doLayout();
          container.validate();
        }
      } else {
        int delta_height = leading.getSize() - widget.getHeight();
        if (delta_height != 0) {
          adjustVerticalLeadingBy(widget, delta_height);
          container.doLayout();
          container.validate();
        }
View Full Code Here

      if (target != widget) {
        if (isBottomRelatedTo((JComponent) target, (JComponent) widget)) {
          Constraints constraints = layout.getConstraints(target);
          Alignment vertical = constraints.getVertical();
          if (vertical instanceof Leading) {
            Leading leading = (Leading) vertical;
            leading.setLeading(leading.getLeading() + delta_height);
            adjustVerticalLeadingBy(target, delta_height);
          } else if (vertical instanceof Bilateral) {
            Bilateral spring = (Bilateral) vertical;
            spring.setLeading(spring.getLeading() + delta_height);
          }
View Full Code Here

      if (target != widget) {
        if (isRightRelatedTo((JComponent) target, (JComponent) widget)) {
          Constraints constraints = layout.getConstraints(target);
          Alignment horizontal = constraints.getHorizontal();
          if (horizontal instanceof Leading) {
            Leading leading = (Leading) horizontal;
            leading.setLeading(leading.getLeading() + delta_width);
            adjustHorizontalLeadingBy(target, delta_width);
          } else if (horizontal instanceof Bilateral) {
            Bilateral spring = (Bilateral) horizontal;
            spring.setLeading(spring.getLeading() + delta_width);
          }
View Full Code Here

    initComponents();
  }

  private void initComponents() {
    setLayout(new GroupLayout());
    add(getNameLabel(), new Constraints(new Leading(19, 10, 10), new Leading(14, 10, 10)));
    add(getNameTextField(), new Constraints(new Leading(19, 168, 10, 10), new Leading(34, 12, 12)));
    add(getSiteIdLabel(), new Constraints(new Leading(202, 10, 10), new Leading(14, 10, 10)));
    add(getSiteIdTextField(), new Constraints(new Leading(202, 145, 10, 10), new Leading(34, 10, 10)));
    add(getKeyLabel(), new Constraints(new Leading(378, 10, 10), new Leading(14, 12, 12)));
    add(getKeyTextField(), new Constraints(new Leading(378, 253, 10, 10), new Leading(34, 10, 10)));
    add(getOrderNumberLabel(), new Constraints(new Leading(19, 10, 10), new Leading(70, 12, 12)));
    add(getOrderNumberTextField(), new Constraints(new Leading(19, 104, 10, 10), new Leading(90, 12, 12)));
    add(getAmountLabel(), new Constraints(new Leading(161, 10, 10), new Leading(70, 12, 12)));
    add(getAmountTextField(), new Constraints(new Leading(161, 101, 10, 10), new Leading(90, 12, 12)));
    add(getPanLabel(), new Constraints(new Leading(301, 10, 10), new Leading(70, 12, 12)));
    add(getPanTextField(), new Constraints(new Leading(301, 205, 10, 10), new Leading(90, 12, 12)));
    add(getExpDateTextField(), new Constraints(new Leading(528, 96, 10, 10), new Leading(90, 12, 12)));
    add(getExpDateLabel(), new Constraints(new Leading(528, 10, 10), new Leading(70, 12, 12)));
    add(getCardHolderLabel(), new Constraints(new Leading(19, 12, 12), new Leading(126, 12, 12)));
    add(getCardHolderTextField(), new Constraints(new Leading(19, 170, 12, 12), new Leading(146, 10, 10)));
    add(getAvsStreetAddressLabel(), new Constraints(new Leading(19, 10, 10), new Leading(182, 10, 10)));
    add(getAvsStreetAddressTextField(), new Constraints(new Leading(19, 220, 10, 10), new Leading(202, 10, 10)));
    add(getAvsZipCodeLabel(), new Constraints(new Leading(281, 10, 10), new Leading(182, 10, 10)));
    add(getAvsZipCodeTextField(), new Constraints(new Leading(282, 144, 10, 10), new Leading(202, 12, 12)));
    add(getCvCodeLabel(), new Constraints(new Leading(19, 12, 12), new Leading(238, 10, 10)));
    add(getCvCodeTextField(), new Constraints(new Leading(19, 123, 10, 10), new Leading(258, 12, 12)));
    add(getIssueKeyedSaleButton(), new Constraints(new Leading(31, 10, 10), new Leading(307, 10, 10)));
    add(getIssueKeyedRefundButton(), new Constraints(new Leading(187, 12, 12), new Leading(307, 12, 12)));
    add(getIssueBatchButton(), new Constraints(new Leading(356, 10, 10), new Leading(307, 12, 12)));
    add(getIssueVoidButton(), new Constraints(new Leading(492, 10, 10), new Leading(307, 12, 12)));
    add(getReferenceIdLabel(), new Constraints(new Leading(19, 12, 12), new Leading(367, 10, 10)));
    add(getReferenceIdTextField(), new Constraints(new Leading(19, 114, 10, 10), new Leading(387, 10, 10)));
    add(getOutOrderNumberLabel(), new Constraints(new Leading(187, 10, 10), new Leading(367, 12, 12)));
    add(getOutOrderNumberTextField(), new Constraints(new Leading(187, 123, 10, 10), new Leading(387, 10, 10)));
    add(getTxDateTextField(), new Constraints(new Leading(351, 129, 10, 10), new Leading(387, 10, 10)));
    add(getTxDateLabel(), new Constraints(new Leading(351, 12, 12), new Leading(367, 12, 12)));
    add(getTxCountLabel(), new Constraints(new Leading(537, 10, 10), new Leading(367, 12, 12)));
    add(getTxCountTextField(), new Constraints(new Leading(537, 80, 10, 10), new Leading(387, 18, 12, 12)));
    add(getApprovalStatusLabel(), new Constraints(new Leading(19, 12, 12), new Leading(423, 10, 10)));
    add(getApprovalStatusTextField(), new Constraints(new Leading(19, 139, 12, 12), new Leading(443, 10, 10)));
    add(getAuthCodeLabel(), new Constraints(new Leading(182, 10, 10), new Leading(423, 12, 12)));
    add(getAuthCodeTextField(), new Constraints(new Leading(181, 131, 10, 10), new Leading(443, 10, 10)));
    add(getOutCardHolderLabel(), new Constraints(new Leading(351, 12, 12), new Leading(423, 12, 12)));
    add(getOutCardHolderTextField(), new Constraints(new Leading(349, 158, 10, 10), new Leading(443, 12, 12)));
    add(getOutAmountLabel(), new Constraints(new Leading(19, 12, 12), new Leading(479, 10, 10)));
    add(getOutAmountTextField(), new Constraints(new Leading(19, 118, 12, 12), new Leading(499, 10, 10)));
    add(getTypeLabel(), new Constraints(new Leading(182, 12, 12), new Leading(479, 12, 12)));
    add(getTypeTextField(), new Constraints(new Leading(182, 86, 12, 12), new Leading(499, 12, 12)));
    add(getCardNumberLabel(), new Constraints(new Leading(310, 10, 10), new Leading(479, 12, 12)));
    add(getCardNumberTextField(), new Constraints(new Leading(310, 236, 12, 12), new Leading(499, 12, 12)));
    add(getCardTypeLabel(), new Constraints(new Leading(19, 12, 12), new Leading(535, 10, 10)));
    add(getCardTypeTextField(), new Constraints(new Leading(19, 127, 10, 10), new Leading(555, 12, 12)));
    add(getAvsResponseLabel(), new Constraints(new Leading(179, 10, 10), new Leading(535, 12, 12)));
    add(getAvsResponseTextField(), new Constraints(new Leading(179, 84, 12, 12), new Leading(555, 10, 10)));
    add(getCvResponseLabel(), new Constraints(new Leading(299, 12, 12), new Leading(535, 12, 12)));
    add(getCvResponseTextField(), new Constraints(new Leading(301, 84, 12, 12), new Leading(555, 10, 10)));
    add(getPosEntryTypeLabel(), new Constraints(new Leading(431, 10, 10), new Leading(535, 12, 12)));
    add(getAllowDuplicatesCheckBox(), new Constraints(new Leading(238, 8, 8), new Leading(261, 8, 8)));
    add(getReferenceCodeTextField(), new Constraints(new Leading(488, 230, 10, 10), new Leading(263, 12, 12)));
    add(getReferenceCodeLabel(), new Constraints(new Leading(490, 10, 10), new Leading(239, 10, 10)));
    add(getHFrameSeparator(), new Constraints(new Leading(12, 701, 10, 10), new Leading(350, 10, 12, 12)));
    add(getVVoidSeparator(), new Constraints(new Leading(475, 238, 12, 12), new Leading(220, 130, 10, 10)));
    add(getHVoidSeparator(), new Constraints(new Leading(475, 238, 12, 12), new Leading(220, 11, 10, 10)));
    add(getPosEntryTypeTextField(), new Constraints(new Leading(479, 118, 12, 12), new Leading(557, 12, 12)));
    setSize(723, 626);
  }
View Full Code Here

  }

  private void initComponents() {
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    setLayout(new GroupLayout());
    add(getJLabel0(), new Constraints(new Leading(12, 12, 12), new Leading(12, 12, 12)));
    add(getJTextField0(), new Constraints(new Bilateral(123, 82, 4), new Leading(10, 12, 12)));
    add(getBrowseOldRoot(), new Constraints(new Trailing(12, 129, 129), new Leading(8, 12, 12)));
    add(getJLabel1(), new Constraints(new Leading(12, 100, 100), new Leading(38, 12, 12)));
    add(getJTextField1(), new Constraints(new Bilateral(123, 82, 6), new Leading(35, 12, 12)));
    add(getBrowseNewRoot(), new Constraints(new Trailing(12, 131, 131), new Leading(34, 12, 12)));
    add(getExecuteDiffCount(), new Constraints(new Trailing(12, 12, 12), new Leading(63, 12, 12)));
    add(getJScrollPane0(), new Constraints(new Bilateral(12, 12, 23), new Bilateral(90, 12, 23)));
    setSize(475, 258);
  }
View Full Code Here

  }
 
  public void buildCells() {
    int horiz = 5, vert = 5, size = 35, min = 10;
    int row_incr = 0, col_incr = 0;
    Leading leading_h, leading_v;
    for (int row = 0; row < 9; row++) {
      row_incr = 0;
      if (row % 3 == 0) {
        row_incr = COLUMN_ROW_SPLIT_PIXELS;
      }
      for (int col = 0; col < 9; col++) {
        col_incr = COLUMN_ROW_SPLIT_PIXELS;
        if (col % 3 == 0) {
          col_incr = 1;
        }
        JTextField text_field = this.buildTextField();
        this.fields[row][col] = text_field;
        leading_h = new Leading(horiz + (col * size) + col_incr, size, min, min);
        leading_v = new Leading(vert + (row * size) + row_incr, size, min, min);
        add(text_field, new Constraints(leading_h, leading_v));
      }
    }
  }
View Full Code Here

  private void initComponents() {
    setTitle("VoPSI - Voice Application over PSI Network");
    setResizable(false);
    setLayout(new GroupLayout());
    add(getLblCallee(), new Constraints(new Leading(12, 12, 12),
        new Leading(54, 12, 12)));
    add(getLblCaller(), new Constraints(new Leading(12, 12, 12),
        new Leading(16, 12, 12)));
    add(getJTextField1(), new Constraints(new Leading(125, 186, 12, 12),
        new Leading(50, 26, 12, 12)));
    add(getJTextField0(), new Constraints(new Leading(125, 186, 10, 10),
        new Leading(12, 26, 12, 12)));
    add(getJScrollPane0(), new Constraints(new Bilateral(12, 12, 22),
        new Bilateral(94, 12, 22)));
    add(getJButton1(), new Constraints(new Leading(370, 102, 12, 12),
        new Leading(15, 40, 37)));
    add(getJButton0(), new Constraints(new Leading(370, 102, 12, 12),
        new Leading(50, 12, 12)));
    setSize(500, 356);
    setDefaultCloseOperation(VoPSI_App.EXIT_ON_CLOSE);

    try {
      this.setIconImage(ImageIO.read(this.getClass().getResourceAsStream(
View Full Code Here

TOP

Related Classes of org.dyno.visual.swing.layouts.Leading

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.