Package org.eclipse.e4.xwt.javabean.metadata.properties

Source Code of org.eclipse.e4.xwt.javabean.metadata.properties.StyleProperty

package org.eclipse.e4.xwt.javabean.metadata.properties;

import java.lang.reflect.InvocationTargetException;

import org.eclipse.e4.xwt.IConstants;
import org.eclipse.e4.xwt.XWTException;
import org.eclipse.e4.xwt.core.Style;

/**
*
* @author yyang (yves.yang@soyatec.com)
*/
public class StyleProperty extends AbstractProperty {

  public StyleProperty() {
    super(IConstants.XAML_STYLE, Object.class);
  }

  public Object getValue(Object target) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchFieldException {
    return null;
  }

  public void setValue(Object target, Object value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchFieldException {
    if (!(value instanceof Style)) {
      throw new XWTException("Style is expected.");
    }
    Style style = (Style) value;
    style.apply(target);
  }
}
TOP

Related Classes of org.eclipse.e4.xwt.javabean.metadata.properties.StyleProperty

TOP
Copyright © 2018 www.massapi.com. 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.