客户端
@ -0,0 +1,16 @@
|
||||
package com.zhiyun.zhiyun03.client;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 全局数据
|
||||
*/
|
||||
public class ClientData {
|
||||
public static final int CLIENT_LEFT_PANEL_WIDTH=160;
|
||||
public static final int CLIENT_LEFT_PANEL_HEIGHT=650;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.zhiyun.zhiyun03.client;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* 主面板
|
||||
*/
|
||||
public class ClientPanel extends JPanel {
|
||||
|
||||
|
||||
public ClientPanel(){
|
||||
super.setSize(1200,800);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.zhiyun.zhiyun03.client;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class ClientRightPanel extends JPanel {
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.zhiyun.zhiyun03.client.course;
|
||||
|
||||
import com.zhiyun.zhiyun03.application.entity.Directory;
|
||||
import com.zhiyun.zhiyun03.application.service.ApplicationService;
|
||||
import com.zhiyun.zhiyun03.application.service.impl.ApplicationServiceImpl;
|
||||
import com.zhiyun.zhiyun03.client.ClientData;
|
||||
import com.zhiyun.zhiyun03.course.mapper.CourseMapper;
|
||||
import com.zhiyun.zhiyun03.course.service.CourseService;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class CourseLeftPanel extends JPanel {
|
||||
|
||||
BufferedImage[] images=new BufferedImage[4];
|
||||
public CourseLeftPanel(){
|
||||
super.setSize(ClientData.CLIENT_LEFT_PANEL_WIDTH,ClientData.CLIENT_LEFT_PANEL_HEIGHT);
|
||||
for (int i = 0; i < images.length; i++) {
|
||||
try {
|
||||
images[i]= ImageIO.read(new File("src/main/java/com/zhiyun/zhiyun03/client/course/images/directory/"+i+".jpg"));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void paint(Graphics g){
|
||||
for (int i = 0; i < images.length; i++) {
|
||||
g.drawImage(images[i],43,80+i*35,images[i].getWidth(),images[i].getHeight(),null);
|
||||
}
|
||||
g.drawString("经济学",57,80);
|
||||
g.drawString("理学",57,115);
|
||||
g.drawString("工学",57,150);
|
||||
g.drawString("管理学",57,165);
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.zhiyun.zhiyun03.client.course;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class CourseRightPanel extends JPanel {
|
||||
}
|
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 434 B |
After Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 434 B |
After Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 15 KiB |