{
if (value instanceof Dimension2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Dimension2D d = (Dimension2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_WIDTH, new Float(d.getWidth()));
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT, new Float(d.getHeight()));
return;
}
if ("border-top-left-radius".equals(name))
{
if (value instanceof Dimension2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Dimension2D d = (Dimension2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_WIDTH, new Float(d.getWidth()));
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_HEIGHT, new Float(d.getHeight()));
return;
}
if ("border-bottom-right-radius".equals(name))
{
if (value instanceof Dimension2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Dimension2D d = (Dimension2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH, new Float(d.getWidth()));
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_HEIGHT, new Float(d.getHeight()));
return;
}
if ("border-bottom-left-radius".equals(name))
{
if (value instanceof Dimension2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Dimension2D d = (Dimension2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_WIDTH, new Float(d.getWidth()));
styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT, new Float(d.getHeight()));
return;
}
if ("absolute_pos".equals(name))
{
if (value instanceof Point2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Point2D d = (Point2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.POS_X, new Float(d.getX()));
styleSheet.setStyleProperty(ElementStyleKeys.POS_Y, new Float(d.getY()));
return;
}
if ("min-size".equals(name))
{
if (value instanceof Dimension2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Dimension2D d = (Dimension2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(d.getWidth()));
styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(d.getHeight()));
return;
}
if ("max-size".equals(name))
{
if (value instanceof Dimension2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Dimension2D d = (Dimension2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.MAX_WIDTH, new Float(d.getWidth()));
styleSheet.setStyleProperty(ElementStyleKeys.MAX_HEIGHT, new Float(d.getHeight()));
return;
}
if ("preferred-size".equals(name))
{
if (value instanceof Dimension2D == false)
{
throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
}
final Dimension2D d = (Dimension2D) value;
styleSheet.setStyleProperty(ElementStyleKeys.WIDTH, new Float(d.getWidth()));
styleSheet.setStyleProperty(ElementStyleKeys.HEIGHT, new Float(d.getHeight()));
return;
}
final StyleKey key = keyfactory.getStyleKey(name);
if (key == null)