📄 imageinfo.java
字号:
import java.awt.*;
import java.io.*;
import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
/**the class to store a shape or a talk sentences*/
public class ImageInfo implements Serializable {
public int flag;
public Shape shape;
public Color color;
public Integer fill;
public Integer thick;
public String chat;
public int x, y;
public Font font;
public int position;
/**the creation function*/
ImageInfo(ImageInfo i)
{
flag = i.flag;
shape = i.shape;
color = i.color;
fill = i.fill;
thick = i.thick;
chat = i.chat;
x = i.x;
y = i.y;
font = i.font;
position = i.position;
}
/**for talk*/
ImageInfo(String c)
{
flag = 0;
chat = c;
}
/**delete*/
ImageInfo(int f, int p)
{
flag = f;
position = p;
}
/**the string shape*/
ImageInfo(String s, Font font, Color c, int x, int y)
{
this.x = x;
this.y = y;
chat = s;
flag = 1;
fill = 4;
color = c;
this.font = font;
}
/**the pencil shape*/
ImageInfo(GeneralPath g, Color c, Integer t)
{
flag = 1;
fill = 3;
color = c;
thick = t;
shape = g;
}
/**the redo undo clear function*/
ImageInfo(int f)
{
flag = f;
}
/**for talk*/
ImageInfo(StringBuffer c)
{
flag = 0;
chat = new String(c);
}
/**creat a general shape*/
ImageInfo(Shape s, Color c, Integer f, Integer t)
{
flag = 1;
shape = s;
color = c;
fill = f;
thick = t;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -