});
}
});
controlsColumn.addButton("Set Font", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Font font = StyleUtil.randomFont();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setFont(font);
}
});
}
});
controlsColumn.addButton("Clear Font", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setFont(null);
}
});
}
});
controlsColumn.addButton("Set Background Image", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setBackgroundImage(Styles.BUTTON_BACKGROUND_IMAGE);
}
});
}
});
controlsColumn.addButton("Clear Background Image", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setBackgroundImage(null);
}
});
}
});
controlsColumn.addButton("Set Line Wrap = true", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setLineWrap(true);
}
});
}
});
controlsColumn.addButton("Set Line Wrap = false", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setLineWrap(false);
}
});
}
});
controlsColumn.addButton("Set Width = Default", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setWidth(null);
}
});
}
});
controlsColumn.addButton("Set Width = 300px", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setWidth(new Extent(300, Extent.PX));
}
});
}
});
controlsColumn.addButton("Set Width = 50%", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setWidth(new Extent(50, Extent.PERCENT));
}
});
}
});
controlsColumn.addButton("Set Height = Default", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setHeight(null);
}
});
}
});
controlsColumn.addButton("Set Height = 100px", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setHeight(new Extent(100, Extent.PX));
}
});
}
});
controlsColumn.addButton("Set Insets = Default", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setInsets(null);
}
});
}
});
controlsColumn.addButton("Set Insets = 10/5px", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setInsets(new Insets(10, 5));
}
});
}
});
controlsColumn.addButton("Set Insets = 30px", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setInsets(new Insets(30, 30));
}
});
}
});
// Rollover Effect Settings
controlsColumn = new ButtonColumn();
controlGroupsColumn.add(controlsColumn);
controlsColumn.add(new Label("Rollover Effects"));
controlsColumn.addButton("Enable Rollover Effects", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverEnabled(true);
}
});
}
});
controlsColumn.addButton("Disable Rollover Effects", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverEnabled(false);
}
});
}
});
controlsColumn.addButton("Set Rollover Icon", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
if (button.getIcon() != null) {
button.setRolloverIcon(Styles.ROLLOVER_ICON_LOGO);
}
}
});
}
});
controlsColumn.addButton("Clear Rollover Icon", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
if (button.getIcon() != null) {
button.setRolloverIcon(null);
}
}
});
}
});
controlsColumn.addButton("Set Rollover Foreground", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Color color = StyleUtil.randomColor();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverForeground(color);
}
});
}
});
controlsColumn.addButton("Clear Rollover Foreground", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverForeground(null);
}
});
}
});
controlsColumn.addButton("Set Rollover Background", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Color color = StyleUtil.randomColor();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverBackground(color);
}
});
}
});
controlsColumn.addButton("Clear Rollover Background", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverBackground(null);
}
});
}
});
controlsColumn.addButton("Set Rollover Font", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Font font = StyleUtil.randomFont();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverFont(font);
}
});
}
});
controlsColumn.addButton("Clear Rollover Font", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverFont(null);
}
});
}
});
controlsColumn.addButton("Set Rollover Background Image", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverBackgroundImage(Styles.BUTTON_ROLLOVER_BACKGROUND_IMAGE);
}
});
}
});
controlsColumn.addButton("Clear Rollover Background Image", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setRolloverBackgroundImage(null);
}
});
}
});
// Pressed Effect Settings
controlsColumn = new ButtonColumn();
controlGroupsColumn.add(controlsColumn);
controlsColumn.add(new Label("Pressed Effects"));
controlsColumn.addButton("Enable Pressed Effects", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedEnabled(true);
}
});
}
});
controlsColumn.addButton("Disable Pressed Effects", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedEnabled(false);
}
});
}
});
controlsColumn.addButton("Set Pressed Icon", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
if (button.getIcon() != null) {
button.setPressedIcon(Styles.PRESSED_ICON_LOGO);
}
}
});
}
});
controlsColumn.addButton("Clear Pressed Icon", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
if (button.getIcon() != null) {
button.setPressedIcon(null);
}
}
});
}
});
controlsColumn.addButton("Set Pressed Foreground", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Color color = StyleUtil.randomColor();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedForeground(color);
}
});
}
});
controlsColumn.addButton("Clear Pressed Foreground", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedForeground(null);
}
});
}
});
controlsColumn.addButton("Set Pressed Background", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Color color = StyleUtil.randomColor();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedBackground(color);
}
});
}
});
controlsColumn.addButton("Clear Pressed Background", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedBackground(null);
}
});
}
});
controlsColumn.addButton("Set Pressed Font", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Font font = StyleUtil.randomFont();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedFont(font);
}
});
}
});
controlsColumn.addButton("Clear Pressed Font", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedFont(null);
}
});
}
});
controlsColumn.addButton("Set Pressed Background Image", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedBackgroundImage(Styles.BUTTON_PRESSED_BACKGROUND_IMAGE);
}
});
}
});
controlsColumn.addButton("Clear Pressed Background Image", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setPressedBackgroundImage(null);
}
});
}
});
// Disabled Effect Settings
controlsColumn = new ButtonColumn();
controlGroupsColumn.add(controlsColumn);
controlsColumn.add(new Label("Disabled Effects"));
controlsColumn.addButton("Set Disabled Icon", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
if (button.getIcon() != null) {
button.setDisabledIcon(Styles.DISABLED_ICON_LOGO);
}
}
});
}
});
controlsColumn.addButton("Clear Disabled Icon", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
if (button.getIcon() != null) {
button.setDisabledIcon(null);
}
}
});
}
});
controlsColumn.addButton("Set Disabled Foreground", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Color color = StyleUtil.randomColor();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setDisabledForeground(color);
}
});
}
});
controlsColumn.addButton("Clear Disabled Foreground", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setDisabledForeground(null);
}
});
}
});
controlsColumn.addButton("Set Disabled Background", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Color color = StyleUtil.randomColor();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setDisabledBackground(color);
}
});
}
});
controlsColumn.addButton("Clear Disabled Background", new ActionListener() {
public void actionPerformed(ActionEvent e) {
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setDisabledBackground(null);
}
});
}
});
controlsColumn.addButton("Set Disabled Font", new ActionListener() {
public void actionPerformed(ActionEvent e) {
final Font font = StyleUtil.randomFont();
apply(new Applicator() {
public void apply(AbstractButton button) {
button.setDisabledFont(font);
}
});