1 Star 0 Fork 3

马力/JavaDesigner

forked from serv/JavaDesigner 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Context.java 745 Bytes
一键复制 编辑 原始数据 按行查看 历史
serv 提交于 2014-04-08 11:42 +08:00 . init
/**
* The context user used
*/
import java.io.*;
public class Context {
private Strategy strategy = null;
private int lineWidth;
private int lineCount;
private String text;
public Context() {
lineWidth = 10;
lineCount = 0;
}
public void setStrategy(Strategy s) {
if(s != null) {
strategy = s;
}
}
public void drawText() {
strategy.drawText(text, lineWidth, lineCount);
}
public void setText(String str) {
text = str;
}
public void setLineWidth(int width) {
lineWidth = width;
}
public void setLineCount(int count) {
lineCount = count;
}
public String getText() {
return text;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/matieli/JavaDesigner.git
git@gitee.com:matieli/JavaDesigner.git
matieli
JavaDesigner
JavaDesigner
master

搜索帮助