您的位置:首页 > 其它

俄罗斯方块1.0

2014-08-23 13:38 141 查看
package config;

import java.io.Serializable;

import org.dom4j.Element;

public class ButtonConfig implements Serializable {

/**

*

*/

private static final long serialVersionUID = 1L;

private final int buttonW;

private final int buttonH;

private final int startX;

private final int startY;

private final int userConfigX;

private final int userConfigY;

// 读取配置文件

public ButtonConfig(Element button) {

this.buttonW = Integer.parseInt(button.attributeValue("w"));

this.buttonH = Integer.parseInt(button.attributeValue("h"));

this.startX = Integer.parseInt(button.element("start").attributeValue("x"));

this.startY = Integer.parseInt(button.element("start").attributeValue("y"));

this.userConfigX = Integer.parseInt(button.element("userConfig").attributeValue("x"));

this.userConfigY = Integer.parseInt(button.element("userConfig").attributeValue("y"));

}

public int getButtonW() {

return buttonW;

}

public int getButtonH() {

return buttonH;

}

public int getStartX() {

return startX;

}

public int getStartY() {

return startY;

}

public int getUserConfigX() {

return userConfigX;

}

public int getUserConfigY() {

return userConfigY;

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: