org.wings.template.propertymanagers.SAbstractButtonPropertyManager Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2000,2005 wingS development team.
*
* This file is part of wingS (http://wingsframework.org).
*
* wingS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* Please see COPYING for the complete licence.
*/
package org.wings.template.propertymanagers;
import org.wings.SAbstractButton;
import org.wings.SComponent;
/**
* @author Armin Haaf
*/
public class SAbstractButtonPropertyManager extends SAbstractIconTextCompoundPropertyManager {
static final Class[] classes = {SAbstractButton.class};
public SAbstractButtonPropertyManager() {
}
@Override
public void setProperty(SComponent comp, String name, String value) {
SAbstractButton c = (SAbstractButton) comp;
switch (name) {
case "ACCESSKEY":
c.setMnemonic(value);
break;
case "TARGET":
c.setEventTarget(value);
break;
default:
super.setProperty(comp, name, value);
break;
}
}
@Override
public Class[] getSupportedClasses() {
return classes;
}
}