Package nextapp.echo2.app

Examples of nextapp.echo2.app.Column


     * Creates a new <code>GamePane</code>.
     */
    GamePane() {
        super();
       
        Column layoutColumn = new Column();
        layoutColumn.setInsets(new Insets(30));
        layoutColumn.setCellSpacing(new Extent(10));
        add(layoutColumn);
       
        layoutColumn.add(new Label(new ResourceImageReference("/echo2tutorial/numberguess/TitleBanner.png")));
        layoutColumn.add(statusLabel);
        layoutColumn.add(countLabel);
        layoutColumn.add(promptLabel);
       
        guessEntryField = new TextField();
       
        guessEntryField.setForeground(Color.WHITE);
        guessEntryField.setBackground(Color.BLUE);
        ColumnLayoutData columnLayoutData = new ColumnLayoutData();
        columnLayoutData.setInsets(new Insets(20, 0));
        guessEntryField.setLayoutData(columnLayoutData);
        layoutColumn.add(guessEntryField);
       
        Button submitButton = new Button("Submit Your Guess");
        submitButton.setActionCommand("submit guess");
        submitButton.setForeground(Color.BLACK);
        submitButton.setBackground(Color.GREEN);
        submitButton.setWidth(new Extent(200));
        submitButton.addActionListener(this);
        layoutColumn.add(submitButton);
       
        Button newGameButton  = new Button("Start a New Game");
        newGameButton.setActionCommand("new game");
        newGameButton.setForeground(Color.WHITE);
        newGameButton.setBackground(Color.RED);
        newGameButton.setWidth(new Extent(200));
        newGameButton.addActionListener(this);
        layoutColumn.add(newGameButton);
    }
View Full Code Here


     *
     * @param numberOfTries the number of tries it took the user to guess the
     *        correct answer.
     */
    CongratulationsPane(int numberOfTries) {
        Column layoutColumn = new Column();
        layoutColumn.setInsets(new Insets(30));
        layoutColumn.setCellSpacing(new Extent(30));
        add(layoutColumn);
       
        layoutColumn.add(new Label(new ResourceImageReference("/echo2tutorial/numberguess/CongratulationsBanner.png")));
        layoutColumn.add(new Label("You got the correct answer in " + numberOfTries + (numberOfTries == 1 ? " try." : " tries.")));

        Button button = new Button("Play Again");
        button.setForeground(Color.WHITE);
        button.setBackground(Color.RED);
        button.setWidth(new Extent(200));
        button.addActionListener(this);
        layoutColumn.add(button);
    }
View Full Code Here

   
    public GridTest() {
        super(SplitPane.ORIENTATION_HORIZONTAL, new Extent(250, Extent.PX));
        setStyleName("DefaultResizable");
       
        Column groupContainerColumn = new Column();
        groupContainerColumn.setCellSpacing(new Extent(5));
        groupContainerColumn.setStyleName("TestControlsColumn");
        add(groupContainerColumn);
       
        Column testColumn = new Column();
        add(testColumn);

        ButtonColumn controlsColumn;
       
        controlsColumn = new ButtonColumn();
        controlsColumn.add(new Label("Insert/Delete Cells"));
        groupContainerColumn.add(controlsColumn);
       
        final Grid grid = new Grid(4);
        grid.setBorder(new Border(new Extent(1), Color.BLUE, Border.STYLE_SOLID));
        while (nextCellNumber < 17) {
            grid.add(createGridCellButton());
        }
        testColumn.add(grid);

        controlsColumn.addButton("Clear Selection", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                selectCellButton(null);
            }
        });

        controlsColumn.addButton("Insert Cell Before Selected", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    grid.add(createGridCellButton(), grid.indexOf(selectedButton));
                }
            }
        });

        controlsColumn.addButton("Append New Cell", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Button button = createGridCellButton();
                grid.add(button);
                selectCellButton(button);
            }
        });

        controlsColumn.addButton("Append 10 New Cells", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Button button = null;
                for (int i = 0; i < 10; ++i) {
                    button = createGridCellButton();
                    grid.add(button);
                }
                selectCellButton(button);
            }
        });

        controlsColumn.addButton("Delete Selected Cell", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    int index = grid.indexOf(selectedButton);
                    grid.remove(selectedButton);
                    if (grid.getComponentCount() != 0) {
                        if (index < grid.getComponentCount()) {
                            selectCellButton((Button) grid.getComponent(index));
                        } else {
                            selectCellButton((Button) grid.getComponent(grid.getComponentCount() - 1));
                        }
                    } else {
                        selectCellButton(null);
                    }
                }
            }
        });
       
        controlsColumn.addButton("Delete All Cells", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.removeAll();
            }
        });
       
        controlsColumn.addButton("Add Row-Button Cell", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Row row = new Row();
                for (int i = 0; i < 3; ++i) {
                    Button button = new Button("Test (" + i + ") Test");
                    button.setStyleName("Default");
                    row.add(button);
                }
                grid.add(row);
            }
        });
       
        controlsColumn = new ButtonColumn();
        controlsColumn.add(new Label("Configure Grid"));
        groupContainerColumn.add(controlsColumn);
       
        controlsColumn.addButton("Swap Orientation", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setOrientation(grid.getOrientation() == Grid.ORIENTATION_VERTICAL
                        ? Grid.ORIENTATION_HORIZONTAL : Grid.ORIENTATION_VERTICAL);
            }
        });
       
        controlsColumn.addButton("[+] Size", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setSize(grid.getSize() + 1);
            }
        });

        controlsColumn.addButton("[-] Size", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (grid.getSize() > 1) {
                    grid.setSize(grid.getSize() - 1);
                }
            }
        });
        controlsColumn.addButton("Change Foreground", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setForeground(StyleUtil.randomColor());
            }
        });
        controlsColumn.addButton("Change Background", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setBackground(StyleUtil.randomColor());
            }
        });
        controlsColumn.addButton("Change Border (All Attributes)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setBorder(StyleUtil.randomBorder());
            }
        });
        controlsColumn.addButton("Change Border Color", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Border border = grid.getBorder();
                grid.setBorder(new Border(border.getSize(), StyleUtil.randomColor(), border.getStyle()));
            }
        });
        controlsColumn.addButton("Change Border Size", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setBorder(StyleUtil.nextBorderSize(grid.getBorder()));
            }
        });
        controlsColumn.addButton("Change Border Style", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setBorder(StyleUtil.nextBorderStyle(grid.getBorder()));
            }
        });
       
        controlsColumn.addButton("Set Insets 0px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setInsets(new Insets(0));
            }
        });
        controlsColumn.addButton("Set Insets 2px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setInsets(new Insets(2));
            }
        });
        controlsColumn.addButton("Set Insets 10/5px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setInsets(new Insets(10, 5));
            }
        });
        controlsColumn.addButton("Set Insets 10/20/30/40px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setInsets(new Insets(10, 20, 30, 40));
            }
        });
        controlsColumn.addButton("Set Width = null", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setWidth(null);
            }
        });
        controlsColumn.addButton("Set Width = 500px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setWidth(new Extent(500));
            }
        });
        controlsColumn.addButton("Set Width = 100%", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                grid.setWidth(new Extent(100, Extent.PERCENT));
            }
        });
       
        controlsColumn = new ButtonColumn();
        controlsColumn.add(new Label("Configure Cell"));
        groupContainerColumn.add(controlsColumn);
       
        controlsColumn.addButton("[+] Column Span", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    if (layoutData.getColumnSpan() < 1) {
                        layoutData.setColumnSpan(1);
                    } else {
                        layoutData.setColumnSpan(layoutData.getColumnSpan() + 1);
                    }
                    selectedButton.setLayoutData(layoutData);
                    retitle(selectedButton);
                }
            }
        });

        controlsColumn.addButton("[-] Column Span", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    if (layoutData.getColumnSpan() > 1) {
                        layoutData.setColumnSpan(layoutData.getColumnSpan() - 1);
                    } else {
                        layoutData.setColumnSpan(1);
                    }
                    selectedButton.setLayoutData(layoutData);
                    retitle(selectedButton);
                }
            }
        });
       
        controlsColumn.addButton("[+] Row Span", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    if (layoutData.getRowSpan() < 1) {
                        layoutData.setRowSpan(1);
                    } else {
                        layoutData.setRowSpan(layoutData.getRowSpan() + 1);
                    }
                    selectedButton.setLayoutData(layoutData);
                    retitle(selectedButton);
                }
            }
        });

        controlsColumn.addButton("[-] Row Span", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    if (layoutData.getRowSpan() > 1) {
                        layoutData.setRowSpan(layoutData.getRowSpan() - 1);
                    } else {
                        layoutData.setRowSpan(1);
                    }
                    selectedButton.setLayoutData(layoutData);
                    retitle(selectedButton);
                }
            }
        });

        controlsColumn.addButton("Column Span: FILL", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setColumnSpan(GridLayoutData.SPAN_FILL);
                    selectedButton.setLayoutData(layoutData);
                    retitle(selectedButton);
                }
            }
        });

        controlsColumn.addButton("Row Span: FILL", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setRowSpan(GridLayoutData.SPAN_FILL);
                    selectedButton.setLayoutData(layoutData);
                    retitle(selectedButton);
                }
            }
        });

        controlsColumn.addButton("Set Insets 0px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setInsets(new Insets(0));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Insets 2px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setInsets(new Insets(2));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Insets 10/5px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setInsets(new Insets(10, 5));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Insets 10/20/30/40px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setInsets(new Insets(10, 20, 30, 40));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Alignment = Default", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setAlignment(null);
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Alignment = Leading/Top", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setAlignment(new Alignment(Alignment.LEADING, Alignment.TOP));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Alignment = Trailing/Bottom", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setAlignment(new Alignment(Alignment.TRAILING, Alignment.BOTTOM));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Alignment = Left/Top", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setAlignment(new Alignment(Alignment.LEFT, Alignment.TOP));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Alignment = Right/Bottom", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setAlignment(new Alignment(Alignment.RIGHT, Alignment.BOTTOM));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Alignment = Center/Center", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setAlignment(new Alignment(Alignment.CENTER, Alignment.CENTER));
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Background Image", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE);
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Background Image (5px)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_5_PX_REPEAT);
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Set Background Image (1%)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_1_PERCENT_REPEAT);
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });
        controlsColumn.addButton("Clear BackgroundImage", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    GridLayoutData layoutData = (GridLayoutData) selectedButton.getLayoutData();
                    layoutData.setBackgroundImage(null);
                    selectedButton.setLayoutData(layoutData);
                }
            }
        });

        controlsColumn = new ButtonColumn();
        controlsColumn.add(new Label("Configure Rows/Columns"));
        groupContainerColumn.add(controlsColumn);
       
        controlsColumn.addButton("Clear Widths of First 16 Columns", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                for (int i = 0; i < 16; ++i) {
                    grid.setColumnWidth(i, null);
                }
            }
        });
       
        controlsColumn.addButton("Set First 16 Columns to 100px Width", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Extent width = new Extent(100);
                for (int i = 0; i < 16; ++i) {
                    grid.setColumnWidth(i, width);
                }
            }
        });
       
        controlsColumn.addButton("Set First 16 Columns to Random Width", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                for (int i = 0; i < 16; ++i) {
                    grid.setColumnWidth(i, new Extent( ((int) (Math.random() * 100)) + 50));
                }
            }
        });

        controlsColumn.addButton("Clear Heights of First 16 Rows", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                for (int i = 0; i < 16; ++i) {
                    grid.setRowHeight(i, null);
                }
            }
        });
       
        controlsColumn.addButton("Set First 16 Rows to 100px Height", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Extent height = new Extent(100);
                for (int i = 0; i < 16; ++i) {
                    grid.setRowHeight(i, height);
                }
            }
        });

        controlsColumn.addButton("Set First 16 Rows to Random Height", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                for (int i = 0; i < 16; ++i) {
                    grid.setRowHeight(i, new Extent( ((int) (Math.random() * 100)) + 50));
                }
            }
        });
       
        controlsColumn = new ButtonColumn();
        controlsColumn.add(new Label("Additional Tests"));
        groupContainerColumn.add(controlsColumn);

        controlsColumn.addButton("Grid/Column/Grid FillImage Test", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                WindowPane windowPane = new WindowPane();
                windowPane.setTitle("Grid/Column/Grid FillImage Test");
                windowPane.setInsets(new Insets(10));
                windowPane.setStyleName("Default");
                windowPane.setDefaultCloseOperation(WindowPane.DISPOSE_ON_CLOSE);
                InteractiveApp.getApp().getDefaultWindow().getContent().add(windowPane);
               
                GridLayoutData gld;
                ColumnLayoutData cld;
               
                Grid grid0 = new Grid();
                grid0.setInsets(new Insets(5));
               
                grid0.add(new Label("Grid 0 Label"));
                grid0.add(new Label("Grid 0 Label"));
                grid0.add(new Label("Grid 0 Label"));
               
                Column column = new Column();
                column.setInsets(new Insets(5));
                grid0.add(column);
               
                column.add(new Label("Column Label"));
                column.add(new Label("Column Label"));
                column.add(new Label("Column Label"));
               
                gld = new GridLayoutData();
                gld.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_50_PX_REPEAT);
                column.setLayoutData(gld);
                grid0.add(column);
               
                Grid grid1 = new Grid();
                grid1.setInsets(new Insets(5));
                cld = new ColumnLayoutData();
                cld.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_5_PX_REPEAT);
                grid1.setLayoutData(cld);
                column.add(grid1);

                grid1.add(new Label("Grid 1 Label"));
                grid1.add(new Label("Grid 1 Label"));
                grid1.add(new Label("Grid 1 Label"));

View Full Code Here

       
        ButtonColumn controlsColumn = new ButtonColumn();
        controlsColumn.setStyleName("TestControlsColumn");
        add(controlsColumn);

        Column testColumn = new Column();
        testColumn.setCellSpacing(new Extent(15));
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(15));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);
       
        final TextField textField = new TextField();
        textField.setBorder(new Border(1, Color.BLUE, Border.STYLE_SOLID));
        testColumn.add(textField);
       
        final PasswordField passwordField = new PasswordField();
        passwordField.setBorder(new Border(1, Color.BLUE, Border.STYLE_SOLID));
        testColumn.add(passwordField);
       
        final TextArea textArea = new TextArea();
        textArea.setBorder(new Border(1, Color.BLUE, Border.STYLE_SOLID));
        testColumn.add(textArea);
       
        controlsColumn.addButton("Set Text to Multiple Lines", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                String text = "This\nis\na\ntest.";
                textField.getDocument().setText(text);
View Full Code Here

        super(SplitPane.ORIENTATION_HORIZONTAL, new Extent(250, Extent.PX));
        setStyleName("DefaultResizable");

        SplitPaneLayoutData splitPaneLayoutData;
       
        Column controlGroupsColumn = new Column();
        controlGroupsColumn.setCellSpacing(new Extent(5));
        controlGroupsColumn.setStyleName("TestControlsColumn");
        add(controlGroupsColumn);
       
        testColumn = new Column();
        testColumn.setCellSpacing(new Extent(15));
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(15));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);
       
        final Label iconLabel = new Label(Styles.ICON_LOGO);
        testColumn.add(iconLabel);
       
        final Label textLabel = new Label("Test Label");
        testColumn.add(textLabel);
       
        final Label iconTextLabel = new Label("Test Label", Styles.ICON_LOGO);
        testColumn.add(iconTextLabel);

        ButtonColumn controlsColumn;
       
        controlsColumn = new ButtonColumn();
        controlGroupsColumn.add(controlsColumn);

        // Base Properties

        controlsColumn = new ButtonColumn();
        controlGroupsColumn.add(controlsColumn);
       
        controlsColumn.add(new Label("Base Properties"));
        controlsColumn.addButton("Toggle Container Cell Spacing", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testColumn.getCellSpacing() == null) {
                    testColumn.setCellSpacing(new Extent(15));
                } else {
                    testColumn.setCellSpacing(null);
                }
            }
        });
        controlsColumn.addButton("Set Foreground", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                final Color color = StyleUtil.randomColor();
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setForeground(color);
                    }
                });
            }
        });
        controlsColumn.addButton("Clear Foreground", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setForeground(null);
                    }
                });
            }
        });
        controlsColumn.addButton("Set Background", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                final Color color = StyleUtil.randomColor();
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setBackground(color);
                    }
                });
            }
        });
        controlsColumn.addButton("Clear Background", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setBackground(null);
                    }
                });
            }
        });
        controlsColumn.addButton("Set Font", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                final Font font = StyleUtil.randomFont();
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setFont(font);
                    }
                });
            }
        });
        controlsColumn.addButton("Clear Font", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setFont(null);
                    }
                });
            }
        });
        controlsColumn.addButton("Set Text = Short", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        if (label.getText() != null) {
                            label.setText("Test Label");
                        }
                    }
                });
            }
        });
        controlsColumn.addButton("Set Text = Long", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        if (label.getText() != null) {
                            label.setText("This is a longer label.  The quick brown fox jumps over the lazy brown dog.");
                        }
                    }
                });
            }
        });
        controlsColumn.addButton("Set Line Wrap = true", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setLineWrap(true);
                    }
                });
            }
        });
        controlsColumn.addButton("Set Line Wrap = false", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setLineWrap(false);
                    }
                });
            }
        });
        controlsColumn.addButton("Toggle ToolTip Text", new ActionListener(){
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        if (label.getToolTipText() == null) {
                            label.setToolTipText("This is a tool tip.");
                        } else {
                            label.setToolTipText(null);
                        }
                    }
                });
            }
        });

        // Alignment & Positioning

        controlsColumn = new ButtonColumn();
        controlGroupsColumn.add(controlsColumn);
       
        controlsColumn.add(new Label("Alignment & Positioning"));
        controlsColumn.addButton("TextPosition = Default", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextPosition(null);
                    }
                });
            }
        });
        controlsColumn.addButton("TextPosition = Top", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextPosition(new Alignment(Alignment.DEFAULT, Alignment.TOP));
                    }
                });
            }
        });
        controlsColumn.addButton("TextPosition = Bottom", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextPosition(new Alignment(Alignment.DEFAULT, Alignment.BOTTOM));
                    }
                });
            }
        });
        controlsColumn.addButton("TextPosition = Left", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextPosition(new Alignment(Alignment.LEFT, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextPosition = Right", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextPosition(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextPosition = Leading", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextPosition(new Alignment(Alignment.LEADING, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextPosition = Trailing", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextPosition(new Alignment(Alignment.TRAILING, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Default", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(null);
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Top", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.DEFAULT, Alignment.TOP));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Center(V)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.DEFAULT, Alignment.CENTER));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Bottom", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.DEFAULT, Alignment.BOTTOM));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Left", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.LEFT, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Center (H)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.CENTER, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Right", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Leading", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.LEADING, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("TextAlignment = Trailing", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setTextAlignment(new Alignment(Alignment.TRAILING, Alignment.DEFAULT));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = default", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(null);
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 0px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(0));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 1px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(1));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 2px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(2));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 3px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(3));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 4px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(4));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 5px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(5));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 10px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(10));
                    }
                });
            }
        });
        controlsColumn.addButton("IconTextMargin = 1in", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setIconTextMargin(new Extent(1, Extent.IN));
                    }
                });
            }
        });
       
        // Localization

        controlsColumn = new ButtonColumn();
        controlGroupsColumn.add(controlsColumn);
       
        controlsColumn.add(new Label("Localization"));
       
        controlsColumn.addButton("Locale = null", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

       
        ButtonColumn controlsColumn = new ButtonColumn();
        controlsColumn.setStyleName("TestControlsColumn");
        add(controlsColumn);

        final Column testColumn = new Column();
        testColumn.setBorder(new Border(new Extent(1), Color.BLUE, Border.STYLE_SOLID));
        testColumn.setLayoutData(insetLayoutData);
        add(testColumn);
       
        controlsColumn.addButton("Add Item (at beginning)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.add(new Label("Added item [" + nextValue++ + "]"), 0);
            }
        });
        controlsColumn.addButton("Add Item (at end)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.add(new Label("Added item [" + nextValue++ + "]"));
            }
        });
        controlsColumn.addButton("Add-Remove-Add Item (at end)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Label label = new Label("Added item [" + nextValue++ + "]");
                testColumn.add(label);
                testColumn.remove(label);
                testColumn.add(label);
            }
        });
        controlsColumn.addButton("Remove Last Item", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testColumn.getComponentCount() > 0) {
                    testColumn.remove(testColumn.getComponentCount() - 1);
                }
            }
        });
        controlsColumn.addButton("Add Some Items, Remove Some Items", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int count = 1 + ((int) (Math.random() * 10));
                for (int i = 0; i < count; ++i) {
                    int componentCount = testColumn.getComponentCount();
                    if (componentCount > 0 && ((int) (Math.random() * 2)) == 0) {
                        // Perform remove.
                        int position = (int) (Math.random() * componentCount);
                        testColumn.remove(position);
                    } else {
                        // Perform add.
                        int position = (int) (Math.random() * (componentCount + 1));
                        testColumn.add(new Label("Added item [" + nextValue++ + "]"), position);
                    }
                }
            }
        });
        controlsColumn.addButton("Randomly Remove and Re-insert Item", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int itemCount = testColumn.getComponentCount();
                if (itemCount == 0) {
                    return;
                }
                Component item = testColumn.getComponent((int) (Math.random() * itemCount));
                testColumn.remove(item);
                testColumn.add(item, (int) (Math.random() * (itemCount - 1)));
            }
        });
        controlsColumn.addButton("Set Foreground", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setForeground(StyleUtil.randomColor());
            }
        });
        controlsColumn.addButton("Clear Foreground", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setForeground(null);
            }
        });
        controlsColumn.addButton("Set Background", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setBackground(StyleUtil.randomColor());
            }
        });
        controlsColumn.addButton("Clear Background", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setBackground(null);
            }
        });
        controlsColumn.addButton("Set Border (All Attributes)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setBorder(StyleUtil.randomBorder());
            }
        });
        controlsColumn.addButton("Set Border Color", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Border border = testColumn.getBorder();
                if (border == null) {
                    border = new Border(new Extent(1), Color.BLUE, Border.STYLE_SOLID);
                }
                testColumn.setBorder(new Border(border.getSize(), StyleUtil.randomColor(), border.getStyle()));
            }
        });
        controlsColumn.addButton("Set Border Size", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setBorder(StyleUtil.nextBorderSize(testColumn.getBorder()));
            }
        });
        controlsColumn.addButton("Set Border Style", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setBorder(StyleUtil.nextBorderStyle(testColumn.getBorder()));
            }
        });
        controlsColumn.addButton("Remove Border", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setBorder(null);
            }
        });
        controlsColumn.addButton("Cell Spacing -> 0px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setCellSpacing(new Extent(0, Extent.PX));
            }
        });
        controlsColumn.addButton("Cell Spacing -> 2px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setCellSpacing(new Extent(2, Extent.PX));
            }
        });
        controlsColumn.addButton("Cell Spacing -> 20px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setCellSpacing(new Extent(20, Extent.PX));
            }
        });
        controlsColumn.addButton("Insets -> null", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setInsets(null);
            }
        });
        controlsColumn.addButton("Insets -> 0px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setInsets(new Insets(0));
            }
        });
        controlsColumn.addButton("Insets -> 5px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setInsets(new Insets(5));
            }
        });
        controlsColumn.addButton("Insets -> 10/20/30/40px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.setInsets(new Insets(10, 20, 30, 40));
            }
        });
        controlsColumn.addButton("Set Layout Data (of random item)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int componentCount = testColumn.getComponentCount();
                if (componentCount == 0) {
                    return;
                }
                Component component =  testColumn.getComponent((int) (Math.random() * componentCount));
                ColumnLayoutData columnLayoutData = new ColumnLayoutData();
                columnLayoutData.setAlignment(StyleUtil.randomAlignmentHV());
                columnLayoutData.setBackground(StyleUtil.randomBrightColor());
                columnLayoutData.setInsets(new Insets((int) (Math.random() * 30)));
                switch((int) (Math.random() * 7)) {
                case 0:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_DARK_BLUE);
                     break;
                case 1:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE);
                     break;
                case 2:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_5_PX_REPEAT);
                     break;
                case 3:
                     columnLayoutData.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_1_PERCENT_REPEAT);
                     break;
                default:
                     columnLayoutData.setBackgroundImage(null);
                }
               
                component.setLayoutData(columnLayoutData);
            }
        });
        controlsColumn.addButton("Add Item, Randomize Column Insets", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testColumn.add(new Label("Added item [" + nextValue++ + "]"));
                testColumn.setInsets(new Insets((int) (Math.random() * 50)));
            }
        });
        controlsColumn.addButton("Toggle Test Inset", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testColumn.getLayoutData() == null) {
                    testColumn.setLayoutData(insetLayoutData);
                } else {
                    testColumn.setLayoutData(null);
                }
            }
        });
    }
View Full Code Here

   
    public TablePerformanceTest() {
        super(SplitPane.ORIENTATION_HORIZONTAL, new Extent(250, Extent.PX));
        setStyleName("DefaultResizable");
       
        Column groupContainerColumn = new Column();
        groupContainerColumn.setCellSpacing(new Extent(5));
        groupContainerColumn.setStyleName("TestControlsColumn");
        add(groupContainerColumn);
       
        Column testColumn = new Column();
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10, 5));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);
       
        testTable = new Table();
        testTable.setBorder(new Border(new Extent(1), Color.BLUE, Border.STYLE_SOLID));
        testColumn.add(testTable);

        ButtonColumn controlsColumn;
       
        controlsColumn = new ButtonColumn();
        groupContainerColumn.add(controlsColumn);
View Full Code Here

        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
        setCellSpacing(new Extent(20));
       
        Column controlsColumn = new Column();
        add(controlsColumn);
       
        Button defaultButton = new Button("Slate Blue Style Sheet (DEFAULT)");
        defaultButton.setStyleName("Default");
        defaultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                getApplicationInstance().setStyleSheet(Styles.DEFAULT_STYLE_SHEET);
            }
        });
        controlsColumn.add(defaultButton);
       
        Button greenButton = new Button("Forest Green Style Sheet");
        greenButton.setStyleName("Default");
        greenButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                getApplicationInstance().setStyleSheet(Styles.GREEN_STYLE_SHEET);
            }
        });
        controlsColumn.add(greenButton);
       
        Button nullButton = new Button("No Style Sheet");
        nullButton.setStyleName("Default");
        nullButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                getApplicationInstance().setStyleSheet(null);
            }
        });
        controlsColumn.add(nullButton);
       
        Button customButton = new Button("Custom Style Sheet (Edit Below)");
        customButton.setStyleName("Default");
        customButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try {
                    StyleSheet styleSheet = loadStyleSheet(styleSheetEntryTextArea.getDocument().getText());
                    getApplicationInstance().setStyleSheet(styleSheet);
                } catch (ComponentXmlException ex) {
                    displayCustomStyleError(ex);
                }
            }
        });
        controlsColumn.add(customButton);
       
        styleSheetEntryTextArea = new TextArea();
        styleSheetEntryTextArea.getDocument().setText(DEFAULT_STYLE_SHEET_TEXT);
        styleSheetEntryTextArea.setStyleName("Default");
        styleSheetEntryTextArea.setWidth(new Extent(600));
View Full Code Here

       
        ButtonColumn controlsColumn = new ButtonColumn();
        controlsColumn.setStyleName("TestControlsColumn");
        add(controlsColumn);

        final Column testColumn = new Column();
        testColumn.setCellSpacing(new Extent(15));
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(15));
        testColumn.setLayoutData(splitPaneLayoutData);
        add(testColumn);
       
        Label testLabel = new Label("This test is used to evaluate the capability of TextComponents to continue receiving "
                + "user input during server interactions.  This capability is critical as server-pushed operations may be "
                + "taking place while the user is typing (which would otherwise result in typed characters silently being "
                + "dropped if they were typed at the exact instant that the server were performing a synchronization. "
                + "To use this test, focus the text field, click one of the test buttons and begin typing during the "
                + "synchronization operation.  Verify using the debug pane that the input is being handled correctly for each "
                + "scenario.");
        testColumn.add(testLabel);
       
        final TextArea textArea = new TextArea(new StringDocument(), null, 40, 8);
        textArea.setBorder(new Border(1, Color.BLUE, Border.STYLE_SOLID));
        testColumn.add(textArea);
       
        controlsColumn.addButton("3 Second Server Interaction Delay", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException ex) { }
            }
        });
       
        controlsColumn.addButton("3 Second Server Interaction Delay; Set Text", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException ex) { }
                textArea.getDocument().setText("The text value has been reset.");
            }
        });
       
        controlsColumn.addButton("3 Second Server Interaction Delay; Remove Text Area", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException ex) { }
                testColumn.remove(textArea);
            }
        });
    }
View Full Code Here

    public HierarchyTest() {
        super(SplitPane.ORIENTATION_HORIZONTAL, new Extent(250, Extent.PX));
        setStyleName("DefaultResizable");
       
        Column controlGroupsColumn = new Column();
        controlGroupsColumn.setCellSpacing(new Extent(5));
        controlGroupsColumn.setStyleName("TestControlsColumn");
        add(controlGroupsColumn);
       
        Column parentSelectColumn = new Column();
        controlGroupsColumn.add(parentSelectColumn);
       
        parentSelectColumn.add(new Label("Parent"));
                       
        parentSelectField = new SelectField(componentListModel);
        parentSelectField.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e) {
                if (parentSelectField.getSelectedItem() instanceof ComponentEntry) {
                    parentComponentInstance = ((ComponentEntry) parentSelectField.getSelectedItem()).newInstance();
                } else {
                    parentComponentInstance = null;
                }
                update();
            }
        });
        parentSelectColumn.add(parentSelectField);
       
        childSelectFields = new SelectField[4];
        childComponentInstances = new Component[4];
        for (int i = 0; i < childSelectFields.length; ++i) {
            Column childSelectColumn = new Column();
            controlGroupsColumn.add(childSelectColumn);
           
            childSelectColumn.add(new Label("Child #" + i));
                           
            final int childNumber = i;
            childSelectFields[i] = new SelectField(componentListModel);
            childSelectFields[i].addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e) {
                    if (childSelectFields[childNumber].getSelectedItem() instanceof ComponentEntry) {
                        childComponentInstances[childNumber]
                                = ((ComponentEntry) childSelectFields[childNumber].getSelectedItem()).newInstance();
                    } else {
                        childComponentInstances[childNumber] = null;
                    }
                    update();
                }
            });
            childSelectColumn.add(childSelectFields[i]);
        }
       
        testPane = new ContentPane();
        add(testPane);
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Column

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.