public void actionPerformed(ActionEvent e) {
if (testPane.getComponentCount() < 2) {
Row row = new Row();
row.setBorder(new Border(new Extent(1), Color.BLACK, Border.STYLE_SOLID));
row.setCellSpacing(new Extent(5));
row.setInsets(new Insets(10, 5));
row.add(new Label("Alpha"));
row.add(new Label("Bravo"));
row.add(new Label("Charlie"));
testPane.add(row);
}
}
});
controlsColumn.addButton("Add-Remove-Add", new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (testPane.getComponentCount() < 2) {
Label label = createPaneLabel("Added at End, Removed, Re-Added");
testPane.add(label);
testPane.remove(label);
testPane.add(label);
}
}
});
controlsColumn.addButton("Add Button", new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (testPane.getComponentCount() < 2) {
Button testButton = new Button("Test Button");
SplitPaneLayoutData layoutData = new SplitPaneLayoutData();
layoutData.setInsets(new Insets(10));
testButton.setLayoutData(layoutData);
testButton.setStyleName("Default");
testPane.add(testButton);
}
}