Compare commits

..

24 Commits

Author SHA1 Message Date
wangwei c3528a3548 文件流
2 years ago
wangwei eb5fd9bab2 合作开发
2 years ago
wangwei c51e919273 测试
2 years ago
wangwei af54bac13c 测试
2 years ago
wangwei 81330bee02 测试
2 years ago
wangwei 2668786a1b 测试
2 years ago
wangwei 5c2c00b06c 组件开发
2 years ago
wangwei f91f51ace0 新增打开文件
2 years ago
wangwei fc28ef9f20 2
2 years ago
wangwei c77b9f075d 1
2 years ago
wangwei a6ff185823 1
2 years ago
wangwei b8da110ee7 1
2 years ago
wangwei 1899c1ebcf Merge branches '周俊杰', '方佳明' and '王威', commits 'ab634e669bd9032a9a366bcca506d0a29f331646' and 'b8f366b5e4d28f487270aa40f6f970c4b28bc6ed' of https://bdgit.educoder.net/p5kqxw2ni/DCreate into 王威
2 years ago
wangwei b8f366b5e4 1
2 years ago
wangwei 87e3218f37 1
2 years ago
wangwei 7e3d31ee8f 1
2 years ago
wangwei 75c1fbc013 1
2 years ago
wangwei 2e2ddbab05 1
2 years ago
wangwei 2c4c4ee4c6 1
2 years ago
周俊杰 e151db0a08 打开界面
2 years ago
pb7vsgrqz 8b4d3783cd Add 周俊杰
2 years ago
p62uf7mej ab634e669b ADD file via upload
2 years ago
p62uf7mej d61679804b Add fjm
2 years ago
p5kqxw2ni 1f6d31bbdf Add DCreate
2 years ago

@ -1 +0,0 @@
FileType.java

@ -1,5 +0,0 @@
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

@ -1,5 +0,0 @@
package assembly;
public class Branch {
}

@ -1,21 +0,0 @@
package assembly;
import java.awt.event.MouseEvent;
public class Trigger {
int Mouse;
MouseEvent mouse;
public void mouseClicked(MouseEvent arg0){
if(arg0.getButton() == MouseEvent.BUTTON1){
Mouse = 1;
} else if (arg0.getButton() == MouseEvent.BUTTON2) {
Mouse = 2;
} else if (arg0.getButton() == MouseEvent.BUTTON3) {
Mouse = 3;
}
}
public int getMouse(){
mouseClicked(mouse);
return Mouse;
}
}

@ -1,4 +0,0 @@
package compound;
public class Backgroud {
}

@ -1,4 +0,0 @@
package compound;
public class Bgm {
}

@ -1,22 +0,0 @@
package compound;
import assembly.Trigger;
public class Character {
int NowPattern = 0;
int Pattern[] = new int[100];
static int i = 0;
Character(int Character_Group[]){
Pattern = Character_Group;
}
public void Show(){
//将改代号的图片输出
}
public void nextPattern(){
Trigger trigger = new Trigger();
if(trigger.getMouse() == 1) {
NowPattern = Pattern[i];
i++;
}
}
}

@ -1,17 +0,0 @@
package compound;
import assembly.Trigger;
public class Text {
int i = 0;
String TextBox[] = new String[100];
Text(){
//将资源中的文本分段输入TextBox中
}
public void nextText(){
Trigger trigger = new Trigger();
if(trigger.getMouse() == 1) {
//输出下一句textbox到文本
}
}
}

@ -1,15 +1,11 @@
package menu;
import javax.swing.*;
import javax.swing.border.Border;
import joggle.joggle;
import java.awt.*;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.util.List;
public class CreateWindow {
private static JFrame page = new JFrame("创作窗口");
@ -47,60 +43,12 @@ public class CreateWindow {
}
public static void choose_file(){
JFrame frame = new JFrame("File Drag and Drop");
JLabel label = new JLabel("Drag and drop a file here.");
label.setTransferHandler(new TransferHandler() {
@Override
public boolean canImport(TransferSupport support) {
// 检查是否支持拖放文件
return support.isDataFlavorSupported(DataFlavor.javaFileListFlavor);
}
@SuppressWarnings("unchecked")
@Override
public boolean importData(TransferSupport support) {
// 处理拖放操作
if (!canImport(support)) {
return false;
}
Transferable transferable = support.getTransferable();
try {
List<File> files = (List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor);
for (File file : files) {
System.out.println(file.getAbsolutePath());
// 在此处处理文件
// ...
}
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
});
label.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
JComponent c = (JComponent) e.getSource();
TransferHandler handler = c.getTransferHandler();
handler.exportAsDrag(c, e, TransferHandler.COPY);
}
});
frame.getContentPane().add(label);
frame.setSize(400, 300);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
public static void remove_file(){
}
}
public static class Set_main_panel{
public static void play(){

Loading…
Cancel
Save