Example usage for com.jgoodies.forms.layout CellConstraints BOTTOM

List of usage examples for com.jgoodies.forms.layout CellConstraints BOTTOM

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout CellConstraints BOTTOM.

Prototype

Alignment BOTTOM

To view the source code for com.jgoodies.forms.layout CellConstraints BOTTOM.

Click Source Link

Document

Put the component in the bottom.

Usage

From source file:ai.aitia.meme.utils.FormsUtils.java

License:Open Source License

/**
 * Returns a DefaultFormBuilder containing the specified components and layout.
 * @param cols This parameter corresponds to the <code>encodedColumnSpecs</code> 
 *   parameter of FormLayout's ctor. Besides the encoding defined by FormLayout, 
 *   the following extensions are also available: the characters defined in the 
 *   global <code>{@link #gapLength}</code> variable (hereafter: gap-characters) 
 *   can be used to insert gap-columns. Gap columns must not appear in the 
 *   cell-specification (explained below) and they're automatically included in
 *   column spans. // w w w  . jav  a  2s. c om
 *   Consecutive gap-characters are coalesced into 1 gap column by calculating
 *   their cumulated pixel size.
 * @param rows A string describing general builder settings + cell-specification 
 *   + row/colum spans + row heights + row groups. See the examples. 
 *   The digits and underscores specify which component goes into which cell(s) 
 *   of the layout grid (cell-specification). There can be at most one character 
 *   for every (non-gap) column specified by <code>cols</code>. Rows must be 
 *   separated by the '|' character. Only underscores, digits and letters are 
 *   allowed in the cell-specification (space isn't). Underscore means that a 
 *   cell is empty. A digit/letter character refers to a component in the varargs 
 *   list: '0'..'9', 'A'..'Z', 'a'..'z' (in this order) denote the first 62 
 *   components of the <code>args</code> list. Repeating the same digit specifies
 *   the component's column span (and row span, if repeated in consecutive rows
 *   in the same columns, like '3' in the example).<br> 
 *   After the cell-specification, but before the newline ('|') character
 *   the row height and row grouping can also be specified. It must begin 
 *   with a space to separate it from the cell-specification. The row
 *   height can be a gap-character (for constant heights only) or a string
 *   that is interpreted by RowSpec.decodeSpecs(). If omitted, the height 
 *   spec. of the most recent row is inherited. Content rows inherit the 
 *   height of the previous content row, gap rows inherit the height of 
 *   the previous gap row. A row is a gap row if its cell-specification is
 *   omitted.<br> 
 *   Row grouping forces equal heights to every member of the group. It  
 *   can be specified by "grp?" strings using any character in place of
 *   '?' (except space and '|'. In the example 'grp1' uses '1'). Rows 
 *   using the same grouping character will be in the same group.
 *   By default there're no groups.
 *    <br>
 *   General builder-settings can be specified at the beginning of the 
 *   string, enclosed in square brackets ([..]). (No space is allowed
 *   after the closing ']'). This is intended for future extensions, too. 
 *   The list of available settings is described at the {@link Prop} 
 *   enumeration. Note that setting names are case-sensitive, and should 
 *   be separated by commas.
 * @param args List of components. Besides java.awt.Component objects,
 *   the caller may use plain strings and instances of the {@link Separator}
 *   class. Plain strings are used to create labels (with mnemonic-expansion). 
 *   Separator objects will create and add separators to the form. 
 *   Any of these objects may be followed optionally by a {@link CellConstraints},
 *   a {@link CellConstraints.Alignment} or a {@link CellInsets} object, 
 *   which overrides the cell's default alignment, can extend its row/column 
 *   span and adjust its insets.<br>
 *   If the first element of <code>args</code> is a java.util.Map object,
 *   it is treated as an additional mapping for gap-characters. This 
 *   overrides the default global mapping. Note that gap-characters can 
 *   help you to set up uniform spacing on your forms. For example, if
 *   you use "-" as normal column-gap and "~" as normal row-gap, fine-tuning
 *   the sizes of these gaps later is as easy as changing the mapping for "-"
 *   and "~" &mdash; there's no need to update all the dlu sizes in all layouts.
 * @see   
 *   Example1: <pre>
  *       build("6dlu, p, 6dlu, 50dlu, 6dlu", 
  *                "_0_1_ pref| 6dlu|" + 
 *                "_2_33 pref:grow(0.5) grp1||" +
 *                "_4_33 grp1",
 *                component0, component1, component2, component3,
 *                component4, cellConstraintsForComponent4).getPanel()
 * </pre>
 *   The same exaple with gap-characters: <pre>
  *       build("~ p ~ 50dlu, 6dlu", 
  *                "01_ pref|~|" + 
 *                "233 pref:grow(0.5) grp1||" +
 *                "433 grp1",
 *                component0, component1, component2, component3,
 *                component4, cellConstraintsForComponent4).getPanel()
 * </pre>
 *   Example3 (only the second argument): <pre>
 *       "[LineGapSize=6dlu, ParagraphGapSize=20dlu]_0_1||_2_3||_4_5"
 * </pre>
 *  Note: this method can be used with no components and empty cell-specification,
 *  too. In this case only a {@link DefaultFormBuilder} is created, configured 
 *  and returned. Its operations can then be used to append components to the form.
 */
@SuppressWarnings("unchecked")
public static DefaultFormBuilder build(String cols, String rows, Object... args) {
    Context ctx = new Context();

    // Parse column widths
    //
    int firstArg = 0;
    if (args.length > 0 && args[0] instanceof java.util.Map) {
        ctx.localGapSpec = (java.util.Map<Character, String>) args[0];
        firstArg += 1;
    }
    StringBuilder colstmp = new StringBuilder();
    ctx.contentCol = parseColumnWidths(colstmp, cols, ctx.localGapSpec, 0);

    // Parse the list of components (may include individual cell-constraints)
    //
    ctx.components = new ArrayList<Rec>(args.length);
    for (int i = firstArg; i < args.length; ++i) {
        Rec r = new Rec(args[i]);
        if (i + 1 < args.length) {
            if (args[i + 1] instanceof CellConstraints) {
                r.cc = (CellConstraints) args[++i];
                r.useAlignment = true;
            } else if (args[i + 1] instanceof CellConstraints.Alignment) {
                CellConstraints.Alignment a = (CellConstraints.Alignment) args[++i];
                if (a == CellConstraints.BOTTOM || a == CellConstraints.TOP)
                    r.cc = new CellConstraints(1, 1, CellConstraints.DEFAULT, a);
                else if (a == CellConstraints.LEFT || a == CellConstraints.RIGHT)
                    r.cc = new CellConstraints(1, 1, a, CellConstraints.DEFAULT);
                else if (a == CellConstraints.CENTER || a == CellConstraints.FILL)
                    r.cc = new CellConstraints(1, 1, a, a);
                r.useAlignment = (r.cc != null);
            } else if (args[i + 1] instanceof CellInsets) {
                CellInsets ci = ((CellInsets) args[++i]);
                r.cc = ci.cc;
                r.useAlignment = ci.useAlignment;
                r.useInsets = true;
                //}
                //else if (args[i+1] == null) {   // this would allow superfluous 'null' values
                //   i += 1;
            }
        }
        ctx.components.add(r);
    }

    // Parse general settings (but don't apply yet) 
    //
    EnumMap<Prop, Object> props = null;
    int i = rows.indexOf(']');
    if (i >= 0) {
        String defaults = rows.substring(0, i);
        rows = rows.substring(++i);
        i = defaults.indexOf('[');
        ctx.input = defaults.substring(++i);
        props = Prop.parseGeneralSettings(ctx);
    }

    // Parse cell-specification, row heights and row groups
    //
    String cells[] = rows.split("\\|", -1);
    StringBuilder rowstmp = new StringBuilder();
    java.util.HashMap<Character, int[]> rowGroups = new HashMap<Character, int[]>();
    String lastContentRowHeight = "p", lastGapRowHeight = null;
    int rowcnt = 0;
    for (i = 0; i < cells.length; ++i) {
        rowcnt += 1;
        // See if it begins with a gap-character
        String g = (cells[i].length() > 0) ? getGap(cells[i].charAt(0), ctx.localGapSpec) : null;
        if (g != null)
            cells[i] = ' ' + cells[i];
        int j = cells[i].indexOf(' ');
        boolean gapRow = (j == 0) || (cells[i].length() == 0);
        String rh = null;
        if (j >= 0) {
            String tmp[] = cells[i].substring(j + 1).split("\\s"); // expect height and grouping specifications 
            cells[i] = cells[i].substring(0, j);
            ArrayList<String> gaps = new ArrayList<String>();
            for (j = 0; j < tmp.length; ++j) {
                if (tmp[j].length() == 0)
                    continue;
                if (tmp[j].length() == 4 && tmp[j].toLowerCase().startsWith("grp")) {
                    Character groupch = tmp[j].charAt(3);
                    rowGroups.put(groupch, appendIntArray(rowGroups.get(groupch), rowcnt));
                } else {
                    rh = tmp[j];
                    for (int k = 0, n = tmp[j].length(); k < n
                            && addGap(gaps, getGap(tmp[j].charAt(k), ctx.localGapSpec)); ++k)
                        ;
                }
            }
            if (!gaps.isEmpty()) {
                StringBuilder sb = new StringBuilder();
                flushGaps(gaps, sb, false);
                rh = sb.substring(0, sb.length() - 1);
            }
        }
        if (rh == null) {
            if (gapRow && lastGapRowHeight == null) {
                ctx.b = new DefaultFormBuilder(new FormLayout(colstmp.toString(), ""));
                Prop.setBuilder(props, ctx);
                lastGapRowHeight = parseableRowSpec(ctx.b.getLineGapSpec());
            }
            rh = gapRow ? lastGapRowHeight : lastContentRowHeight;
        } else {
            if (gapRow)
                lastGapRowHeight = rh;
            else
                lastContentRowHeight = rh;
        }
        if (i > 0)
            rowstmp.append(',');
        rowstmp.append(rh);
    }

    // Create builder
    //
    FormLayout fml = new FormLayout(colstmp.toString(), rowstmp.toString());
    ctx.b = new DefaultFormBuilder(fml, debuggable());

    // Apply builder settings (e.g. column groups)
    //
    Prop.setBuilder(props, ctx);
    props = null;

    // Set row groups
    //
    if (!rowGroups.isEmpty()) {
        int[][] tmp = new int[rowGroups.size()][]; // ???
        i = 0;
        for (int[] a : rowGroups.values())
            tmp[i++] = a;
        fml.setRowGroups(tmp);
    }
    rowGroups = null;

    JLabel lastLabel = null;
    java.util.HashSet<Character> done = new java.util.HashSet<Character>(ctx.components.size());
    int h = cells.length;
    for (int y = 0; y < cells.length; ++y) {
        int w = cells[y].length();
        int first = -1;
        for (int x = 0; x < w; ++x) {
            char ch = cells[y].charAt(x);
            if (ch == '_' || done.contains(ch))
                continue;
            int idx = intValue(ch);

            Rec rec;
            try {
                rec = ctx.components.get(idx);
            } catch (IndexOutOfBoundsException e) {
                throw new IndexOutOfBoundsException(
                        String.format("build() cells=\"%s\" ch=%c rows=\"%s\"", cells[y], ch, rows));
            }
            CellConstraints cc = (rec.cc == null) ? new CellConstraints() : (CellConstraints) rec.cc.clone();

            int sx = cc.gridWidth, sy = cc.gridHeight; // span x, span y
            while (x + sx < w && cells[y].charAt(x + sx) == ch)
                sx += 1;
            while (y + sy < h && ((x < cells[y + sy].length() && cells[y + sy].charAt(x) == ch)
                    || (cells[y + sy].length() == 0 && y + sy + 1 < h && x < cells[y + sy + 1].length()
                            && cells[y + sy + 1].charAt(x) == ch))) {
                sy += 1;
            }
            int colSpan = ctx.contentCol[x + sx - 1] - ctx.contentCol[x] + 1;
            ctx.b.setBounds(ctx.contentCol[x] + 1, ctx.b.getRow(), colSpan, sy);
            ctx.b.setLeadingColumnOffset(first & ctx.contentCol[x]); // 0 vagy x (itt nem kell a +1)
            first = 0;
            x += (sx - 1);

            Object comp = ctx.components.get(idx).component;
            if (comp instanceof Component) {
                ctx.b.append((Component) comp, colSpan);
                if (comp instanceof JLabel)
                    lastLabel = (JLabel) comp;
                else {
                    if (lastLabel != null)
                        lastLabel.setLabelFor((Component) comp);
                    lastLabel = null;
                }
            } else if (comp instanceof Separator) {
                comp = ctx.b.appendSeparator(comp.toString());
                lastLabel = null;
            } else {
                comp = lastLabel = ctx.b.getComponentFactory().createLabel(comp.toString());
                ctx.b.append(lastLabel, colSpan);
            }
            if (rec.useAlignment || rec.useInsets) {
                CellConstraints cc2 = fml.getConstraints((Component) comp);
                cc2.insets = cc.insets;
                cc2.hAlign = cc.hAlign;
                cc2.vAlign = cc.vAlign;
                fml.setConstraints((Component) comp, cc2);
            }

            done.add(ch);
        }
        lastLabel = null;
        ctx.b.nextLine();
    }
    return ctx.b;
}

From source file:com.aw.swing.mvp.ui.painter.ErrorBorderPainter.java

License:Open Source License

public void paintError(List components) {
    clearError(components);//from  ww  w. j a v  a 2 s . c o  m
    for (Iterator iterator = components.iterator(); iterator.hasNext();) {
        BindingComponent bindingComponent = (BindingComponent) iterator.next();
        JLabel label = (JLabel) ((JComponent) bindingComponent.getJComponent())
                .getClientProperty(BindingComponent.ATTR_ICONO);
        if (label != null) {
            return;
        }
        logger.debug("creating icon for " + bindingComponent.getFieldName());
        JComponent feedbackComponent = createFeedbackComponent();
        if (feedbackComponent == null) {
            return;
        }
        Container container = bindingComponent.getJComponent().getParent();
        // GMC Todo  ver q pasa cuando no se envia null ->  Ver como manejar este caso para los diferentes layouts       
        //            container.add(feedbackComponent, null);
        CellConstraints cc = new CellConstraints();
        container.add(feedbackComponent, cc.xy(1, 1));
        Point overlayPosition = getFeedbackComponentOrigin(feedbackComponent, bindingComponent.getJComponent());
        overlayPosition.translate(-3, +2);
        feedbackComponent.setLocation(overlayPosition);

        FormLayout layout = ((FormLayout) container.getLayout());
        CellConstraints cc1 = layout.getConstraints(bindingComponent.getJComponent());

        container.add(feedbackComponent,
                cc1.xy(cc1.gridX - 1, cc1.gridY + 1, CellConstraints.RIGHT, CellConstraints.BOTTOM));

        bindingComponent.getJComponent().putClientProperty(BindingComponent.ATTR_ICONO, feedbackComponent);
    }
}

From source file:com.floreantpos.ui.dialog.DiscountListDialog.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL/* w  ww.  java2  s . c  o m*/
 */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    contentPane.add(panel1,
            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_SOUTH, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null,
                    null, 0, false));
    final Spacer spacer1 = new Spacer();
    panel1.add(spacer1,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
    panel1.add(panel2,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    btnDeleteSelected = new PosButton();
    btnDeleteSelected.setIcon(IconFactory.getIcon("/ui_icons/", "delete.png")); //$NON-NLS-1$ //$NON-NLS-2$
    btnDeleteSelected.setPreferredSize(new Dimension(140, 50));
    btnDeleteSelected.setText(Messages.getString("DiscountListDialog.5")); //$NON-NLS-1$
    panel2.add(btnDeleteSelected);
    buttonOK = new PosButton();
    buttonOK.setIcon(IconFactory.getIcon("/ui_icons/", "finish.png")); //$NON-NLS-1$ //$NON-NLS-2$
    buttonOK.setPreferredSize(new Dimension(120, 50));
    buttonOK.setText(com.floreantpos.POSConstants.OK);
    panel2.add(buttonOK);
    buttonCancel = new PosButton();
    buttonCancel.setIcon(IconFactory.getIcon("/ui_icons/", "cancel.png")); //$NON-NLS-1$ //$NON-NLS-2$
    buttonCancel.setPreferredSize(new Dimension(120, 50));
    buttonCancel.setText(com.floreantpos.POSConstants.CANCEL);
    panel2.add(buttonCancel);
    final JPanel panel3 = new JPanel();
    panel3.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
    contentPane.add(panel3,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
                    new Dimension(458, 310), null, 0, false));
    final JScrollPane scrollPane1 = new JScrollPane();
    panel3.add(scrollPane1,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null,
                    null, 0, false));
    tableDiscounts = new JTable();
    scrollPane1.setViewportView(tableDiscounts);
    final JPanel panel4 = new JPanel();
    panel4.setLayout(new FormLayout("fill:p:grow", "center:d:grow,top:4dlu:noGrow,center:d:grow")); //$NON-NLS-1$ //$NON-NLS-2$
    panel3.add(panel4,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null,
                    null, 0, false));
    btnScrollUp = new PosButton();
    btnScrollUp.setIcon(IconFactory.getIcon("/ui_icons/", "up.png")); //$NON-NLS-1$ //$NON-NLS-2$
    btnScrollUp.setPreferredSize(new Dimension(50, 50));
    btnScrollUp.setText(""); //$NON-NLS-1$
    CellConstraints cc = new CellConstraints();
    panel4.add(btnScrollUp, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.BOTTOM));
    btnScrollDown = new PosButton();
    btnScrollDown.setIcon(IconFactory.getIcon("/ui_icons/", "down.png")); //$NON-NLS-1$ //$NON-NLS-2$
    btnScrollDown.setPreferredSize(new Dimension(50, 50));
    btnScrollDown.setText(""); //$NON-NLS-1$
    panel4.add(btnScrollDown, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.TOP));
}

From source file:com.salas.bb.dialogs.DirectFeedPropertiesDialog.java

License:Open Source License

/**
 * Creates blog starz tab./*from  w ww  .ja v a2s.  c  o m*/
 *
 * @return tab.
 */
private Component createBlogStarzTab() {
    ScoresCalculator calc = GlobalModel.SINGLETON.getScoreCalculator();
    double activity = calc.calcActivity(feed);
    double inlinks = calc.calcInlinksScore(feed);
    double views = calc.calcFeedViewsScore(feed);
    double clickthroughs = calc.calcClickthroughsScore(feed);
    blogStarzScore = calc.calcBlogStarzScore(feed);
    rating = feed.getRating();

    StarzPreferences prefs = GlobalModel.SINGLETON.getStarzPreferences();
    int activityWeight = prefs.getActivityWeight();
    int inlinksWeight = prefs.getInlinksWeight();
    int viewsWeight = prefs.getFeedViewsWeight();
    int clickthroughsWeight = prefs.getClickthroughsWeight();

    String msg = feed.getTextualInboundLinks();

    lbFinalScore = new JLabel();
    lbFinalScore.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    lbFinalScore.addMouseListener(new FinalScoreStarzListener());
    updateFinalScoreIcon();

    JLabel lbTechnoratiInlinks = new JLabel(msg);
    JLabel lbActivity = new JLabel(
            MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"),
                    DECIMAL_FORMAT.format(activity), activityWeight));
    JLabel lbInLinks = new JLabel(
            MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"),
                    DECIMAL_FORMAT.format(inlinks), inlinksWeight));
    JLabel lbViews = new JLabel(
            MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"),
                    DECIMAL_FORMAT.format(views), viewsWeight));
    JLabel lbClickthroughs = new JLabel(
            MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"),
                    DECIMAL_FORMAT.format(clickthroughs), clickthroughsWeight));
    JLabel lbRecommendation = new JLabel(FeedFormatter.getStarzIcon(blogStarzScore, true));

    BBFormBuilder builder = new BBFormBuilder("pref, 4dlu, pref, 4dlu, pref:grow");
    builder.setDefaultDialogBorder();

    builder.append(Strings.message("show.feed.properties.tab.blogstarz.technorati.inlinks"),
            lbTechnoratiInlinks, 3);
    builder.append(Strings.message("show.feed.properties.tab.blogstarz.activity"), lbActivity, 3);
    builder.append(Strings.message("show.feed.properties.tab.blogstarz.inlinks"), lbInLinks, 3);
    builder.append(Strings.message("show.feed.properties.tab.blogstarz.views"), lbViews, 3);
    builder.append(Strings.message("show.feed.properties.tab.blogstarz.clickthroughs"), lbClickthroughs, 3);
    builder.append(Strings.message("show.feed.properties.tab.blogstarz.recommendation"), 1);
    builder.append(lbRecommendation, 1, CellConstraints.LEFT, CellConstraints.CENTER);
    builder.appendUnrelatedComponentsGapRow(2);
    builder.append(Strings.message("show.feed.properties.tab.blogstarz.final.rating"), 1);
    builder.append(lbFinalScore, 1, CellConstraints.LEFT, CellConstraints.CENTER);
    builder.append(new JButton(new RevertAction()), 1, CellConstraints.RIGHT, CellConstraints.CENTER);
    builder.appendRow("pref:grow");
    builder.append(
            ComponentsFactory
                    .createWrappedMultilineLabel(Strings.message("show.feed.properties.tab.blogstarz.notes")),
            5, CellConstraints.FILL, CellConstraints.BOTTOM);

    return builder.getPanel();
}

From source file:com.salas.bb.twitter.TweetThisDialog.java

License:Open Source License

/**
 * Body to show when feature is available.
 *
 * @return panel./*from  w w  w  .  ja  v a2 s.com*/
 */
private BBFormBuilder buildAvailableBody() {
    initComponents();

    BBFormBuilder builder = new BBFormBuilder("pref, 10dlu, 20dlu:grow, 2dlu, pref");

    // Build shifted label
    builder.append(Strings.message("tweetthis.your.message"), 1, CellConstraints.LEFT, CellConstraints.BOTTOM);
    builder.append(lbCharsLeft, 1, CellConstraints.LEFT, CellConstraints.BOTTOM);
    builder.append(new JLabel(IconSource.getIcon(ResourceID.ICON_TWITTER)));
    builder.append(spMessage, 5);

    return builder;
}

From source file:com.salas.bb.utils.uif.HeaderPanelExt.java

License:Open Source License

/**
 * Builds the panel./*w w w .j  a  v a  2s . co m*/
 */
private void build() {
    setLayout(new FormLayout(COLUMNS, ROWS));
    CellConstraints cc = new CellConstraints();
    add(buildCenterComponent(), cc.xy(1, 1));
    add(buildBottomComponent(), cc.xy(1, 2, CellConstraints.FILL, CellConstraints.BOTTOM));
}

From source file:com.tcay.slalom.UI.RaceTimingUI.java

License:Open Source License

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL//w w  w  . j  a  va  2 s. c o  m
 */
private void $$$setupUI$$$() {
    createUIComponents();
    mainPanel = new JPanel();
    mainPanel.setLayout(new GridLayoutManager(6, 1, new Insets(0, 0, 0, 0), -1, -1));
    selectRacerPanel = new JPanel();
    selectRacerPanel.setLayout(new FormLayout(
            "fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:267px:noGrow,left:12dlu:noGrow,fill:max(d;4px):noGrow,left:51dlu:noGrow,fill:85px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow",
            "top:29px:grow,top:6dlu:noGrow,center:32px:noGrow"));
    selectRacerPanel.setToolTipText(
            "Start list contains all boats that are registered and have not yet compoleted the current run in progress");
    mainPanel.add(selectRacerPanel,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
                    new Dimension(658, 84), null, 0, false));
    selectRacerPanel.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), "Start List"));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new BorderLayout(0, 0));
    CellConstraints cc = new CellConstraints();
    selectRacerPanel.add(panel1, cc.xy(7, 1));
    newRunButton = new JButton();
    newRunButton.setBackground(Color.pink);
    newRunButton.setOpaque(true);
    newRunButton.setText("New Run");
    newRunButton.setToolTipText("Select next run e.g. second runs");
    panel1.add(newRunButton, BorderLayout.NORTH);
    reRunButton = new JButton();
    reRunButton.setBackground(Color.pink);
    reRunButton.setOpaque(true);
    reRunButton.setText("Re-Run");
    reRunButton.setToolTipText("Select a boat to do a Re-run, this Re-Run will replace their existing run ");
    selectRacerPanel.add(reRunButton, cc.xy(7, 3));
    startListSelectRacerReadyButton = new JButton();
    startListSelectRacerReadyButton.setBackground(Color.green);
    startListSelectRacerReadyButton.setOpaque(true);
    startListSelectRacerReadyButton.setText("Select Racer");
    startListSelectRacerReadyButton.setToolTipText(
            "put selected boat from the start list into the starting block (replaces boat currently in starting block)");
    startListSelectRacerReadyButton.setVerticalAlignment(3);
    selectRacerPanel.add(startListSelectRacerReadyButton,
            cc.xy(5, 3, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    startListComboBox.setBackground(Color.green);
    startListComboBox.setOpaque(true);
    startListComboBox.setToolTipText("List of all boats that have not yet started the current run");
    selectRacerPanel.add(startListComboBox, cc.xy(3, 3, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    final JLabel label1 = new JLabel();
    label1.setText("Boats that have not started this run");
    selectRacerPanel.add(label1, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    adjustButton = new JButton();
    adjustButton.setBackground(new Color(-1178868));
    adjustButton.setOpaque(true);
    adjustButton.setText("Adjust");
    selectRacerPanel.add(adjustButton, cc.xy(9, 3));
    startPanel = new JPanel();
    startPanel.setLayout(new FormLayout(
            "fill:53px:noGrow,left:4dlu:noGrow,fill:219px:noGrow,left:12dlu:noGrow,fill:118px:noGrow,left:52dlu:noGrow,fill:85px:noGrow",
            "center:30px:noGrow,top:7dlu:noGrow,center:max(d;4px):noGrow"));
    startPanel.setToolTipText("Starting block is the boat that is about to begin racing");
    mainPanel.add(startPanel,
            new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    startPanel.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), "Starting Block"));
    startButton = new JButton();
    startButton.setBackground(Color.green);
    startButton.setOpaque(true);
    startButton.setText("Start");
    startButton.setToolTipText("Start timer for this boat");
    startPanel.add(startButton, cc.xy(5, 1));
    DNSButton = new JButton();
    DNSButton.setBackground(Color.pink);
    DNSButton.setOpaque(true);
    DNSButton.setText("DNS");
    DNSButton.setToolTipText("Mark boat as DID NOT START");
    startPanel.add(DNSButton, cc.xy(7, 1));
    waitingForAFinishLabel = new JLabel();
    waitingForAFinishLabel.setForeground(Color.red);
    waitingForAFinishLabel.setText("Waiting for a finish or DNF");
    startPanel.add(waitingForAFinishLabel, cc.xyw(5, 3, 2));
    jRacerInStartGateLabel = new JLabel();
    startPanel.add(jRacerInStartGateLabel, cc.xy(3, 1));
    startPanel.add(bibLabel, cc.xy(1, 1));
    spacerForLayoutManager = new JLabel();
    startPanel.add(spacerForLayoutManager, cc.xy(3, 3));
    finishPanel = new JPanel();
    finishPanel.setLayout(new FormLayout(
            "fill:134px:noGrow,left:4dlu:noGrow,fill:48px:noGrow,left:8dlu:noGrow,fill:179px:noGrow,left:5dlu:noGrow,fill:117px:noGrow,fill:14px:noGrow,fill:85px:noGrow,left:28dlu:noGrow,fill:max(d;4px):noGrow",
            "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow"));
    finishPanel.setToolTipText("Finish Line shows all boats currently started and on the course");
    mainPanel.add(finishPanel,
            new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
                    new Dimension(634, 155), null, 0, false));
    finishPanel.setBorder(
            BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black), "Finish Line"));
    finishPanel.add(innerFinishPanel1, cc.xyw(1, 1, 10));
    finishPanel.add(innerFinishPanel2, cc.xyw(1, 3, 10));
    finishPanel.add(innerFinishPanel3, cc.xyw(1, 5, 10));
    final Spacer spacer1 = new Spacer();
    mainPanel.add(spacer1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
            GridConstraints.FILL_VERTICAL, 1, 1, null, null, null, 0, false));
    final Spacer spacer2 = new Spacer();
    mainPanel.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
            GridConstraints.FILL_VERTICAL, 1, 1, null, null, null, 0, false));
    statusBarPanel = new JPanel();
    statusBarPanel.setLayout(new FormLayout("fill:d:grow", "center:d:grow"));
    mainPanel.add(statusBarPanel,
            new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1,
                    new Dimension(-1, 20), new Dimension(-1, 20), null, 0, false));
}

From source file:de.dal33t.powerfolder.ui.information.folder.files.versions.FileVersionsPanel.java

License:Open Source License

private Component createButtonPanel() {
    FormLayout layout = new FormLayout("pref, fill:0:grow, pref", "pref");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();

    builder.add(new JButton(restoreAction), cc.xy(1, 1));
    builder.add(currentVersionPanel, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    return builder.getPanel();
}

From source file:de.dal33t.powerfolder.ui.MainFrame.java

License:Open Source License

private void configureUi() {

    // Display the title pane.
    uiComponent.getRootPane().putClientProperty("Synthetica.titlePane.enabled", Boolean.FALSE);
    uiComponent.getRootPane().updateUI();

    FormLayout layout = new FormLayout("fill:pref:grow, pref, 3dlu, pref", "pref, pref, fill:0:grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    CellConstraints cc = new CellConstraints();

    builder.add(logoLabel, cc.xyw(1, 1, 3));

    ButtonBarBuilder b = new ButtonBarBuilder();
    b.addFixed(minusButton);//from  w w  w .  ja v a2s . c o  m
    b.addFixed(plusButton);
    b.addFixed(closeButton);
    builder.add(b.getPanel(), cc.xywh(4, 1, 1, 1, "right, top"));

    builder.add(inlineInfoLabel, cc.xy(2, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
    builder.add(inlineInfoCloseButton, cc.xy(4, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM));

    builder.add(centralPanel, cc.xyw(1, 3, 4));

    builder.add(createMiniPanel(), cc.xyw(1, 2, 4));

    uiComponent.getContentPane().removeAll();
    uiComponent.getContentPane().add(builder.getPanel());
    uiComponent.setResizable(true);

    Controller c = getController();

    // Pack elements and set to default size.
    uiComponent.pack();
    uiComponent.setSize(uiComponent.getWidth(), UIConstants.MAIN_FRAME_DEFAULT_HEIGHT);

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] devices = ge.getScreenDevices();

    int x = (int) ((devices[0].getDisplayMode().getWidth() - uiComponent.getWidth()) / 2.0);
    int y = (int) ((devices[0].getDisplayMode().getHeight() - uiComponent.getHeight()) / 2.0);
    uiComponent.setLocation(x, y);

    configureInlineInfo();
    updateMainStatus(SyncStatusEvent.NOT_STARTED);
    updateNoticesLabel();
}

From source file:demo.MainScreen.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Travis Holt
    watch = new StopWatch();
    TeamTitleLabel = new JLabel();
    FilterItemLabel = new JLabel();
    separator1 = new JSeparator();
    panel2 = new JPanel();
    comboBox1 = new JComboBox();
    textField1 = new JTextField();
    startTiming = new JButton();
    beingTimed = false;// w  ww .ja v a  2 s.c o m
    panel1 = new JPanel();
    DockButton_Jacket = new JButton();
    DockButton_CShirt = new JButton();
    DockButton_TShirt = new JButton();
    DockButton_TTop = new JButton();
    DockButton_Dress = new JButton();
    DockButton_Pants = new JButton();
    DockButton_Uwear = new JButton();
    DockLabel_Jacket = new JLabel();
    DockLabel_CShirt = new JLabel();
    DockLabel_TShirt = new JLabel();
    DockLabel_TTop = new JLabel();
    DockLabel_Dress = new JLabel();
    DockLabel_Pants = new JLabel();
    DockLabel_UWear = new JLabel();
    separator2 = new JSeparator();
    Frame_ShirtFilter = new JInternalFrame();
    Label_Options = new JLabel();
    vSpacer2 = new JPanel(null);
    Label_SizeSelection = new JLabel();
    splitPane2 = new JSplitPane();
    Label_SizeStatus = new JLabel();
    SizeButton_Clear = new JButton();
    ColorPalette_Clear = new JButton();
    panel6 = new JPanel();
    SizeButton_XS = new JButton();
    SizeButton_S = new JButton();
    SizeButton_M = new JButton();
    SizeButton_L = new JButton();
    SizeButton_XL = new JButton();
    vSpacer1 = new JPanel(null);
    Label_ColorSelection = new JLabel();
    splitPane1 = new JSplitPane();
    Label_ColorStatus = new JButton();
    ColorButton_Clear = new JButton();
    colorPalette = new JPanel();
    Button_Black = new JButton();
    Button_Pink = new JButton();
    Button_Blue = new JButton();
    Button_Green = new JButton();
    ButtonLightBlue = new JButton();
    Button_Red = new JButton();
    Button_Purple = new JButton();
    Button_Grey = new JButton();
    Button_Yellow = new JButton();
    Button_White = new JButton();
    vSpacer3 = new JPanel(null);
    Label_PriceSelection = new JLabel();
    splitPane3 = new JSplitPane();
    Label_PriceStatus = new JLabel();
    PriceButton_Clear = new JButton();
    panel8 = new JPanel();
    bPrice26_50 = new JButton();
    bPrice51_75 = new JButton();
    bPrice76_100 = new JButton();
    bprice101_125 = new JButton();
    DesignB = new JInternalFrame();
    label1 = new JLabel();
    label2 = new JLabel();
    sizeButtonPanel = new JPanel();
    Toggle_XS = new JToggleButton();
    Toggle_S = new JToggleButton();
    Toggle_M = new JToggleButton();
    Toggle_L = new JToggleButton();
    Toggle_XL = new JToggleButton();
    vSpacer4 = new JPanel(null);
    colorLabelPalette = new JLabel();
    panel4 = new JPanel();
    primaryColorChooser = new ColorChooser();
    vSpacer5 = new JPanel(null);
    priceRangeLabel = new JLabel();
    rangeMinLabel = new JTextField();
    rangeSlider1 = new RangeSlider();
    rangeMaxLabel = new JTextField();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle("Fashion Sensible");
    Container contentPane = getContentPane();
    contentPane.setLayout(
            new FormLayout("default, $lcgap, 195dlu, $lcgap, default, $lcgap, 149dlu, $lcgap, default",
                    "7*(default, $lgap), 253dlu, 2*($lgap, default)"));

    //---- TeamTitleLabel ----
    TeamTitleLabel.setText("Fashion Sensible");
    TeamTitleLabel.setFont(new Font("Dialog", Font.PLAIN, 16));
    contentPane.add(TeamTitleLabel, cc.xywh(5, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

    //---- FilterItemLabel ----
    FilterItemLabel.setText("Filtering Items");
    contentPane.add(FilterItemLabel, cc.xywh(5, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
    contentPane.add(separator1, cc.xy(5, 7));

    //======== panel2 ========
    {

        // JFormDesigner evaluation mark
        panel2.setBorder(new javax.swing.border.CompoundBorder(
                new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                        "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                        javax.swing.border.TitledBorder.BOTTOM,
                        new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                panel2.getBorder()));
        panel2.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent e) {
                if ("border".equals(e.getPropertyName()))
                    throw new RuntimeException();
            }
        });

        panel2.setLayout(new FormLayout("51dlu, $lcgap, 54dlu", "default, $lgap, default"));

        //---- comboBox1 ----
        comboBox1.setModel(new DefaultComboBoxModel(new String[] { "<Design>", "Design A", "Design B" }));
        comboBox1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                comboBox1ActionPerformed(e);
            }
        });
        panel2.add(comboBox1, cc.xy(1, 1));
        panel2.add(textField1, cc.xy(3, 1));

        //---- button1 ----
        startTiming.setText("Start");
        startTiming.setBackground(Color.green);
        startTiming.addMouseListener(new MouseListener() {
            public void mouseReleased(MouseEvent e) {
            }

            public void mousePressed(MouseEvent e) {
            }

            public void mouseExited(MouseEvent e) {
            }

            public void mouseEntered(MouseEvent e) {
            }

            public void mouseClicked(MouseEvent e) {
                if (!beingTimed) {
                    resetDesigns(false);
                    tasksRun++;
                    beingTimed = true;
                    watch.start();
                    System.out.println("***Task #" + tasksRun);
                    startTiming.setText("Stop");
                    startTiming.setBackground(Color.red);
                } else {
                    beingTimed = false;
                    watch.stop();
                    resetDesigns(true);
                    System.out.println("Time Taken: " + watch.getElapsedTimeSecs() + " seconds");
                    System.out.println("***End of Task #" + tasksRun + "\n");
                    startTiming.setBackground(Color.green);
                    startTiming.setText("Start");
                }
            }
        });
        panel2.add(startTiming, cc.xy(1, 3));
    }
    contentPane.add(panel2, cc.xywh(3, 9, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

    //======== panel1 ========
    {
        panel1.setLayout(new FormLayout("6*(default, $lcgap), default", "2*(default)"));

        //---- DockButton_Jacket ----
        DockButton_Jacket.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Jackets.png")));
        DockButton_Jacket.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                DockButton_JacketMouseClicked(e);
            }
        });
        panel1.add(DockButton_Jacket, cc.xy(1, 1));

        //---- DockButton_CShirt ----
        DockButton_CShirt
                .setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/CollaredShirts.png")));
        DockButton_CShirt.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                DockButton_CShirtMouseClicked(e);
            }
        });
        panel1.add(DockButton_CShirt, cc.xy(3, 1));

        //---- DockButton_TShirt ----
        DockButton_TShirt.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Shirt.png")));
        DockButton_TShirt.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                DockButton_TShirtMouseClicked(e);
            }
        });
        panel1.add(DockButton_TShirt, cc.xy(5, 1));

        //---- DockButton_TTop ----
        DockButton_TTop.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/TankTop.png")));
        DockButton_TTop.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                DockButton_TTopMouseClicked(e);
            }
        });
        panel1.add(DockButton_TTop, cc.xy(7, 1));

        //---- DockButton_Dress ----
        DockButton_Dress.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Dresses.png")));
        DockButton_Dress.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                DockButton_DressMouseClicked(e);
            }
        });
        panel1.add(DockButton_Dress, cc.xy(9, 1));

        //---- DockButton_Pants ----
        DockButton_Pants.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Pants.png")));
        DockButton_Pants.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                DockButton_PantsMouseClicked(e);
            }
        });
        panel1.add(DockButton_Pants, cc.xy(11, 1));

        //---- DockButton_Uwear ----
        DockButton_Uwear.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/underwear.png")));
        DockButton_Uwear.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                DockButton_UwearMouseClicked(e);
            }
        });
        panel1.add(DockButton_Uwear, cc.xy(13, 1));

        //---- DockLabel_Jacket ----
        DockLabel_Jacket.setText("Jackets");
        DockLabel_Jacket.setEnabled(false);
        panel1.add(DockLabel_Jacket, cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- DockLabel_CShirt ----
        DockLabel_CShirt.setText("Collared Shirts");
        DockLabel_CShirt.setEnabled(false);
        panel1.add(DockLabel_CShirt, cc.xywh(3, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- DockLabel_TShirt ----
        DockLabel_TShirt.setText("T-Shirts");
        DockLabel_TShirt.setEnabled(false);
        panel1.add(DockLabel_TShirt, cc.xywh(5, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- DockLabel_TTop ----
        DockLabel_TTop.setText("Tank Tops");
        DockLabel_TTop.setEnabled(false);
        panel1.add(DockLabel_TTop, cc.xywh(7, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- DockLabel_Dress ----
        DockLabel_Dress.setText("Dresses");
        DockLabel_Dress.setEnabled(false);
        panel1.add(DockLabel_Dress, cc.xywh(9, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- DockLabel_Pants ----
        DockLabel_Pants.setText("Pants");
        DockLabel_Pants.setEnabled(false);
        panel1.add(DockLabel_Pants, cc.xywh(11, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));

        //---- DockLabel_UWear ----
        DockLabel_UWear.setText("Underwear");
        DockLabel_UWear.setEnabled(false);
        panel1.add(DockLabel_UWear, cc.xywh(13, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));
    }
    contentPane.add(panel1, cc.xy(5, 9));
    contentPane.add(separator2, cc.xy(5, 11));

    //======== Frame_ShirtFilter ========
    {
        Frame_ShirtFilter.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
        Frame_ShirtFilter.setTitle("Design A");
        Container Frame_ShirtFilterContentPane = Frame_ShirtFilter.getContentPane();
        Frame_ShirtFilterContentPane.setLayout(new FormLayout("default, $lcgap, 85dlu, $lcgap, default",
                "default, $lgap, [8dlu,default], 2*($lgap, default), $lgap, 10dlu, 2*($lgap, default), $lgap, 11dlu, 3*($lgap, default)"));

        //---- Label_Options ----
        Label_Options.setText("Options");
        Label_Options.setFont(new Font("Dialog", Font.BOLD, 14));
        Frame_ShirtFilterContentPane.add(Label_Options, cc.xy(3, 1));
        Frame_ShirtFilterContentPane.add(vSpacer2, cc.xy(3, 3));

        //---- Label_SizeSelection ----
        Label_SizeSelection.setText("Size:");
        Frame_ShirtFilterContentPane.add(Label_SizeSelection, cc.xy(1, 5));

        //======== splitPane2 ========
        {

            //---- Label_SizeStatus ----
            Label_SizeStatus.setText("--");
            splitPane2.setLeftComponent(Label_SizeStatus);

            //---- SizeButton_Clear ----
            SizeButton_Clear.setText("Clear");
            SizeButton_Clear.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    coverFlow().resetSizes(true);
                    Label_SizeStatus.setText("--");
                }
            });
            splitPane2.setRightComponent(SizeButton_Clear);
        }
        Frame_ShirtFilterContentPane.add(splitPane2,
                cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

        //======== panel6 ========
        {
            panel6.setLayout(new FormLayout("[16dlu,min], [16dlu,default], 3*([16dlu,min])", "default"));

            //---- SizeButton_XS ----
            SizeButton_XS.setText("XS");
            SizeButton_XS.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    SizeButton_XSMouseClicked(e);
                }
            });
            panel6.add(SizeButton_XS, cc.xy(1, 1));

            //---- SizeButton_S ----
            SizeButton_S.setText("S");
            SizeButton_S.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    SizeButton_SMouseClicked(e);
                }
            });
            panel6.add(SizeButton_S, cc.xy(2, 1));

            //---- SizeButton_M ----
            SizeButton_M.setText("M");
            SizeButton_M.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    SizeButton_MMouseClicked(e);
                }
            });
            panel6.add(SizeButton_M, cc.xy(3, 1));

            //---- SizeButton_L ----
            SizeButton_L.setText("L");
            SizeButton_L.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    SizeButton_LMouseClicked(e);
                }
            });
            panel6.add(SizeButton_L, cc.xy(4, 1));

            //---- SizeButton_XL ----
            SizeButton_XL.setText("XL");
            SizeButton_XL.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    SizeButton_XLMouseClicked(e);
                }
            });
            panel6.add(SizeButton_XL, cc.xy(5, 1));
        }
        Frame_ShirtFilterContentPane.add(panel6,
                cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));
        Frame_ShirtFilterContentPane.add(vSpacer1, cc.xy(3, 9));

        //---- Label_ColorSelection ----
        Label_ColorSelection.setText("Color:");
        Frame_ShirtFilterContentPane.add(Label_ColorSelection, cc.xy(1, 11));

        //======== splitPane1 ========
        {

            //---- Label_ColorStatus ----
            Label_ColorStatus.setText("   ");
            Label_ColorStatus.setEnabled(false);
            splitPane1.setLeftComponent(Label_ColorStatus);

            //---- ColorButton_Clear ----
            ColorButton_Clear.setText("Clear");
            ColorButton_Clear.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {

                    ColorButton_ClearMouseClicked(e);
                }
            });
            splitPane1.setRightComponent(ColorButton_Clear);
        }
        Frame_ShirtFilterContentPane.add(splitPane1,
                cc.xywh(3, 11, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

        //======== panel7 ========
        {
            colorPalette.setLayout(new FormLayout("9*(default)", "2*(default)"));

            //---- Button_Black ----
            Button_Black.setText(" ");
            Button_Black.setBackground(Color.black);
            Button_Black.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_BlackMouseClicked(e);
                }
            });
            colorPalette.add(Button_Black, cc.xy(1, 1));

            //---- Button_White ----
            Button_White.setText(" ");
            Button_White.setBackground(Color.white);
            Button_White.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_WhiteMouseClicked(e);
                }
            });
            colorPalette.add(Button_White, cc.xy(1, 2));

            //---- Button_Red ----
            Button_Red.setText(" ");
            Button_Red.setBackground(Color.red);
            Button_Red.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_RedMouseClicked(e);
                }
            });
            colorPalette.add(Button_Red, cc.xy(3, 1));

            //---- Button_Pink ----
            Button_Pink.setText(" ");
            Button_Pink.setBackground(new Color(255, 31, 229));
            Button_Pink.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    ButtonPinkButtonClicked(e);
                }
            });
            colorPalette.add(Button_Pink, cc.xy(2, 2));

            //---- Button_Purple ----
            Button_Purple.setText(" ");
            Button_Purple.setBackground(new Color(94, 61, 155));
            Button_Purple.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_PurpleMouseClicked(e);
                }
            });
            colorPalette.add(Button_Purple, cc.xy(5, 2));

            //---- Button_Yellow ----
            Button_Yellow.setText(" ");
            Button_Yellow.setBackground(Color.yellow);
            Button_Yellow.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_YellowMouseClicked(e);
                }
            });
            colorPalette.add(Button_Yellow, cc.xy(3, 2));

            //---- Button_Green ----
            Button_Green.setText(" ");
            Button_Green.setBackground(new Color(54, 127, 31));
            Button_Green.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_GreenMouseClicked(e);
                }
            });
            colorPalette.add(Button_Green, cc.xy(4, 1));

            //---- Button Light Blue ----
            ButtonLightBlue.setText(" ");
            ButtonLightBlue.setBackground(new Color(111, 247, 255));
            ButtonLightBlue.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    ButtonLightBlue(e);
                }
            });
            colorPalette.add(ButtonLightBlue, cc.xy(4, 2));

            //---- Button_Blue ----
            Button_Blue.setText(" ");
            Button_Blue.setBackground(Color.blue);
            Button_Blue.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_BlueMouseClicked(e);
                }
            });
            colorPalette.add(Button_Blue, cc.xy(5, 1));

            Button_Grey.setText(" ");
            Button_Grey.setBackground(new Color(198, 198, 198));
            Button_Grey.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    Button_GreyMouseClicked(e);
                }
            });
            colorPalette.add(Button_Grey, cc.xy(2, 1));

        }
        Frame_ShirtFilterContentPane.add(colorPalette, cc.xy(3, 13));
        Frame_ShirtFilterContentPane.add(vSpacer3, cc.xy(3, 15));

        //---- Label_PriceSelection ----
        Label_PriceSelection.setText("Price:");
        Frame_ShirtFilterContentPane.add(Label_PriceSelection, cc.xy(1, 17));

        //======== splitPane3 ========
        {

            //---- Label_PriceStatus ----

            Label_PriceStatus.setText("------------");
            splitPane3.setLeftComponent(Label_PriceStatus);

            //---- PriceButton_Clear ----
            PriceButton_Clear.setText("Clear");
            PriceButton_Clear.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    PriceButton_ClearMouseClicked(e);
                }
            });
            splitPane3.setRightComponent(PriceButton_Clear);
        }
        Frame_ShirtFilterContentPane.add(splitPane3,
                cc.xywh(3, 17, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));

        //======== panel8 ========
        {
            panel8.setLayout(new FormLayout("default", "3*(default, $lgap), default"));

            //---- Button_Price25_49 ----
            bPrice26_50.setText("$26-$50");
            bPrice26_50.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    setPrice26_50(e);
                }
            });
            panel8.add(bPrice26_50, cc.xy(1, 1));

            //---- Button_Price51_75 ----
            bPrice51_75.setText("$51-$75");
            bPrice51_75.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    setPrice51_75(e);
                }
            });
            panel8.add(bPrice51_75, cc.xy(1, 3));

            //---- Button_Price 76-100----
            bPrice76_100.setText("$76-$100");
            bPrice76_100.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    setPrice76_100(e);
                }
            });
            panel8.add(bPrice76_100, cc.xy(1, 5));

            //---- Button_PriceMore100 ----
            bprice101_125.setText("$101-$125");
            bprice101_125.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    setPrice101_125(e);
                }
            });
            panel8.add(bprice101_125, cc.xy(1, 7));
        }
        Frame_ShirtFilterContentPane.add(panel8, cc.xy(3, 19));
    }
    contentPane.add(Frame_ShirtFilter, cc.xywh(3, 13, 1, 5));

    //======== internalFrame1 ========
    {
        DesignB.setTitle("Design B");
        Container internalFrame1ContentPane = DesignB.getContentPane();
        internalFrame1ContentPane.setLayout(new FormLayout(
                "2*(default, $lcgap), 20dlu, $lcgap, default, $lcgap, 22dlu, 4*($lcgap, default)",
                "4*(default, $lgap), 47dlu, 2*($lgap, default), $lgap, 26dlu, 10*($lgap, default)"));

        //---- label1 ----
        label1.setText("Options");
        internalFrame1ContentPane.add(label1, cc.xy(3, 3));

        //---- label2 ----
        label2.setText("Size");
        internalFrame1ContentPane.add(label2, cc.xy(3, 5));

        //======== Size Toggle Panel ========
        {
            sizeButtonPanel.setLayout(new FormLayout("16dlu, 4*([16dlu,default])", "default"));

            //---- Toggle_XS ----
            Toggle_XS.setText("XS");
            Toggle_XS.addMouseListener(new MouseListener() {
                public void mouseReleased(MouseEvent e) {
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseClicked(MouseEvent e) {
                    if (Toggle_XS.getSelectedObjects() != null) {
                        coverFlow().addFilterSize("XS");
                    } else {
                        coverFlow().removeFilterSize("XS");
                    }
                }
            });
            sizeButtonPanel.add(Toggle_XS, cc.xy(1, 1));

            //---- Toggle_S ----
            Toggle_S.setText("S");
            Toggle_S.addMouseListener(new MouseListener() {
                public void mouseReleased(MouseEvent e) {
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseClicked(MouseEvent e) {
                    if (Toggle_S.getSelectedObjects() != null) {
                        coverFlow().addFilterSize("S");
                    } else {
                        coverFlow().removeFilterSize("S");
                    }
                }
            });
            sizeButtonPanel.add(Toggle_S, cc.xy(2, 1));

            //---- Toggle_M ----
            Toggle_M.setText("M");
            Toggle_M.addMouseListener(new MouseListener() {
                public void mouseReleased(MouseEvent e) {
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseClicked(MouseEvent e) {
                    if (Toggle_M.getSelectedObjects() != null) {
                        coverFlow().addFilterSize("M");
                    } else {
                        coverFlow().removeFilterSize("M");
                    }
                }
            });
            sizeButtonPanel.add(Toggle_M, cc.xy(3, 1));

            //---- Toggle_L ----
            Toggle_L.setText("L");
            Toggle_L.addMouseListener(new MouseListener() {
                public void mouseReleased(MouseEvent e) {
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseClicked(MouseEvent e) {
                    if (Toggle_L.getSelectedObjects() != null) {
                        coverFlow().addFilterSize("L");
                    } else {
                        coverFlow().removeFilterSize("L");
                    }
                }
            });
            sizeButtonPanel.add(Toggle_L, cc.xy(4, 1));

            //---- Toggle_XL ----
            Toggle_XL.setText("XL");
            Toggle_XL.addMouseListener(new MouseListener() {
                public void mouseReleased(MouseEvent e) {
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseClicked(MouseEvent e) {
                    if (Toggle_XL.getSelectedObjects() != null) {
                        coverFlow().addFilterSize("XL");
                    } else {
                        coverFlow().removeFilterSize("XL");
                    }
                }
            });
            sizeButtonPanel.add(Toggle_XL, cc.xy(5, 1));
        }
        internalFrame1ContentPane.add(sizeButtonPanel, cc.xy(7, 5));
        internalFrame1ContentPane.add(vSpacer4, cc.xy(7, 7));

        //---- Color Label Palette ----
        colorLabelPalette.setText("Color Palette");
        internalFrame1ContentPane.add(colorLabelPalette, cc.xy(3, 9));

        //======== panel4 ========
        {
            panel4.setLayout(new FormLayout("23dlu, $lcgap, default", "22dlu, $lgap, default"));

            //---- Color Chooser #1 ----
            primaryColorChooser.setToolTipText("Click and hold to select a color from the rainbow palette");
            primaryColorChooser.setColor(Color.gray);
            primaryColorChooser.addPropertyChangeListener(new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent evt) {

                    try {
                        Color color = (Color) evt.getNewValue();
                        coverFlow().resetColors(false);
                        coverFlow().addFilterColor(colorToString(color), false);
                    } catch (Exception e) {
                    }
                }
            });
            primaryColorChooser.addMouseListener(new MouseListener() {

                @Override
                public void mouseReleased(MouseEvent e) {
                    coverFlow().incrementRouteCounter();

                }

                @Override
                public void mousePressed(MouseEvent e) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void mouseExited(MouseEvent e) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void mouseClicked(MouseEvent e) {
                    // TODO Auto-generated method stub

                }
            });
            panel4.add(primaryColorChooser, cc.xy(1, 1));
            ColorPalette_Clear.setText("Clear");
            ColorPalette_Clear.addMouseListener(new MouseAdapter() {
                public void mouseClicked(MouseEvent e) {
                    primaryColorChooser.setColor(Color.gray);
                    coverFlow().resetColors(true);
                }
            });
            panel4.add(ColorPalette_Clear, cc.xy(3, 1));

        }
        internalFrame1ContentPane.add(panel4,
                cc.xywh(7, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM));
        internalFrame1ContentPane.add(vSpacer5, cc.xy(7, 11));

        //---- label4 ----
        priceRangeLabel.setText("Price Range");
        internalFrame1ContentPane.add(priceRangeLabel, cc.xy(3, 15));

        //---- textField2 ----
        rangeMinLabel.setText("25");
        rangeMinLabel.setEditable(false);
        internalFrame1ContentPane.add(rangeMinLabel, cc.xy(5, 15));

        //---- rangeSlider1 ----
        rangeSlider1.setMaximum(125);
        rangeSlider1.setMinimum(25);
        rangeSlider1.setHighValue(125);
        rangeSlider1.setLowValue(25);
        rangeSlider1.setPaintTicks(true);
        rangeSlider1.setPaintLabels(true);
        rangeSlider1.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                rangeSlider1StateChanged(e);
            }
        });
        rangeSlider1.addMouseListener(new MouseListener() {

            @Override
            public void mouseReleased(MouseEvent e) {
                coverFlow().incrementRouteCounter();

            }

            @Override
            public void mousePressed(MouseEvent e) {
                // TODO Auto-generated method stub

            }

            @Override
            public void mouseExited(MouseEvent e) {
                // TODO Auto-generated method stub

            }

            @Override
            public void mouseEntered(MouseEvent e) {
                // TODO Auto-generated method stub

            }

            @Override
            public void mouseClicked(MouseEvent e) {
                // TODO Auto-generated method stub

            }
        });

        internalFrame1ContentPane.add(rangeSlider1, cc.xy(7, 15));

        //---- RangeMaxLabel ----
        rangeMaxLabel.setText("125");
        rangeMaxLabel.setEditable(false);
        internalFrame1ContentPane.add(rangeMaxLabel, cc.xy(9, 15));
    }
    contentPane.add(DesignB, cc.xywh(3, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP));
    setSize(1475, 715);
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
    setupCoverFlows(this, cc);
}