diff --git a/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_assembly_panel.class b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_assembly_panel.class new file mode 100644 index 0000000..e8c19a7 Binary files /dev/null and b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_assembly_panel.class differ diff --git a/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_edit_panel.class b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_edit_panel.class new file mode 100644 index 0000000..5848f7e Binary files /dev/null and b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_edit_panel.class differ diff --git a/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_main_panel.class b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_main_panel.class new file mode 100644 index 0000000..268ac73 Binary files /dev/null and b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_main_panel.class differ diff --git a/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_resource_panel.class b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_resource_panel.class new file mode 100644 index 0000000..2418fe1 Binary files /dev/null and b/DGcreate/out/production/DGcreate/menu/CreateWindow$Set_resource_panel.class differ diff --git a/DGcreate/out/production/DGcreate/menu/CreateWindow.class b/DGcreate/out/production/DGcreate/menu/CreateWindow.class index 79a5dcb..9987e30 100644 Binary files a/DGcreate/out/production/DGcreate/menu/CreateWindow.class and b/DGcreate/out/production/DGcreate/menu/CreateWindow.class differ diff --git a/DGcreate/out/production/DGcreate/menu/FileType.class b/DGcreate/out/production/DGcreate/menu/FileType.class new file mode 100644 index 0000000..1cd892a Binary files /dev/null and b/DGcreate/out/production/DGcreate/menu/FileType.class differ diff --git a/DGcreate/out/production/DGcreate/menu/MainWindow$1.class b/DGcreate/out/production/DGcreate/menu/MainWindow$1.class index 7f22ad8..2a1c2a4 100644 Binary files a/DGcreate/out/production/DGcreate/menu/MainWindow$1.class and b/DGcreate/out/production/DGcreate/menu/MainWindow$1.class differ diff --git a/DGcreate/out/production/DGcreate/menu/MainWindow$2.class b/DGcreate/out/production/DGcreate/menu/MainWindow$2.class index 5ff80b6..39542d1 100644 Binary files a/DGcreate/out/production/DGcreate/menu/MainWindow$2.class and b/DGcreate/out/production/DGcreate/menu/MainWindow$2.class differ diff --git a/DGcreate/out/production/DGcreate/menu/MainWindow$3.class b/DGcreate/out/production/DGcreate/menu/MainWindow$3.class index d4ee9fe..dd7cfff 100644 Binary files a/DGcreate/out/production/DGcreate/menu/MainWindow$3.class and b/DGcreate/out/production/DGcreate/menu/MainWindow$3.class differ diff --git a/DGcreate/out/production/DGcreate/menu/MainWindow$4.class b/DGcreate/out/production/DGcreate/menu/MainWindow$4.class index a832c92..396b0a4 100644 Binary files a/DGcreate/out/production/DGcreate/menu/MainWindow$4.class and b/DGcreate/out/production/DGcreate/menu/MainWindow$4.class differ diff --git a/DGcreate/out/production/DGcreate/menu/MainWindow.class b/DGcreate/out/production/DGcreate/menu/MainWindow.class index 2f4540a..8427301 100644 Binary files a/DGcreate/out/production/DGcreate/menu/MainWindow.class and b/DGcreate/out/production/DGcreate/menu/MainWindow.class differ diff --git a/DGcreate/src/menu/CreateWindow.java b/DGcreate/src/menu/CreateWindow.java index 87cbac6..61f0af9 100644 --- a/DGcreate/src/menu/CreateWindow.java +++ b/DGcreate/src/menu/CreateWindow.java @@ -1,10 +1,15 @@ package menu; import javax.swing.*; +import javax.swing.border.Border; + import joggle.joggle; +import java.awt.*; + public class CreateWindow { private static JFrame page = new JFrame("创作窗口"); + private static JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); private static JPanel resource_panel = new JPanel(); //创作资源面板 private static JPanel main_panel = new JPanel(); @@ -19,12 +24,24 @@ public class CreateWindow { page.setResizable(false); page.setLocationRelativeTo(null); page.setVisible(true); - resource_panel.setSize(750,500); - main_panel.setSize(750,500); - assembly_panel.setSize(750,500); - edit_panel.setSize(750,500); + resource_panel.setPreferredSize(new Dimension(450,500)); + resource_panel.setBorder(BorderFactory.createTitledBorder("创作资源")); + main_panel.setPreferredSize(new Dimension(1000,500)); + main_panel.setBorder(BorderFactory.createTitledBorder("播放窗口")); + assembly_panel.setPreferredSize(new Dimension(450,450)); + assembly_panel.setBorder(BorderFactory.createTitledBorder("组件")); + edit_panel.setPreferredSize(new Dimension(1000,450)); + edit_panel.setBorder(BorderFactory.createTitledBorder("操作栏")); + page.add(panel); + panel.add(resource_panel); + panel.add(main_panel); + panel.add(assembly_panel); + panel.add(edit_panel); } public static class Set_resource_panel{ + Set_resource_panel(){ + + } public static void choose_file(){ } @@ -38,6 +55,43 @@ public class CreateWindow { } public static void suspend(){ + } + } + public static class Set_assembly_panel{ + public static void choose_assembly(){ + + } + } + public static class Set_edit_panel{ + Set_edit_panel(){ + + } + public static void set_track(){ + + } + public static void delete_track(){ + + } + public static void shield_track(){ + + } + public static void open_sound(){ + + } + public static void close_sound(){ + + } + public static void open_frame(){ + + } + public static void close_frame(){ + + } + public static void track_magnetic_attraction(){ + + } + public static void delete_trackResource(){ + } } } diff --git a/DGcreate/src/menu/FileType.java b/DGcreate/src/menu/FileType.java new file mode 100644 index 0000000..cf95e86 --- /dev/null +++ b/DGcreate/src/menu/FileType.java @@ -0,0 +1,35 @@ +package menu; +import sun.misc.BASE64Encoder; +import java.io.*; +import java.nio.charset.StandardCharsets; + + +public class FileType { + public static String change_sound_io(File media){ + BASE64Encoder encoder = new BASE64Encoder(); + try{ + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + byte[] bytes = byteArrayOutputStream.toByteArray(); + FileInputStream in = new FileInputStream(media); + in.read(bytes); + in.close(); + return encoder.encodeBuffer(bytes).trim(); + }catch(IOException e1){ + e1.printStackTrace(); + return "false"; + } + } + public static void input_File(String str) { + File file = new File(MainWindow.ReturnFile + MainWindow.Filename); + try { + FileOutputStream fileOutputStream = new FileOutputStream(file, true); + try { + fileOutputStream.write(str.getBytes(StandardCharsets.UTF_8)); + } catch (IOException e1) { + e1.printStackTrace(); + } + } catch (FileNotFoundException e1) { + e1.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/DGcreate/src/menu/MainWindow.java b/DGcreate/src/menu/MainWindow.java index dcf7470..97b7a8f 100644 --- a/DGcreate/src/menu/MainWindow.java +++ b/DGcreate/src/menu/MainWindow.java @@ -15,6 +15,8 @@ public class MainWindow extends menu { private static Container c = page.getContentPane(); private static Container c1 = create_page.getContentPane(); private static int flag = 0; + protected static String ReturnFile; + protected static String Filename; //创建主窗口 public static void main(String[] args) { page.setSize(1500,1000); @@ -85,8 +87,10 @@ public class MainWindow extends menu { File file = fd.getSelectedFile(); file.getPath(); //获取预览地址 + ReturnFile = file.getPath(); try { File newfile = new File(file, fileName.getText() + ".drc"); + Filename = fileName.getText()+".drc"; newfile.createNewFile(); //创建文件,格式为自创drc格式 }catch (IOException e1){