/**
* Invoked when an action occurs.
*/
public void actionPerformed(final ActionEvent e)
{
final DocumentContextSelectionModel model = getSelectionModel();
if (model == null)
{
return;
}
final List<Element> visualElements = model.getSelectedElementsOfType(Element.class);
final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();
for (Element element : visualElements)
{
final ElementStyleSheet styleSheet = element.getStyle();
undos.add(StyleEditUndoEntry.createConditional(element, ElementStyleKeys.ALIGNMENT, ElementAlignment.CENTER));