Initial commit pt.2
This commit is contained in:
parent
c2210cbb02
commit
20469eec97
10 changed files with 202 additions and 50 deletions
10
.classpath
Normal file
10
.classpath
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="module" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
51
.gitignore
vendored
51
.gitignore
vendored
|
@ -1,50 +1 @@
|
||||||
# These are some examples of commonly ignored file patterns.
|
/bin/
|
||||||
# You should customize this list as applicable to your project.
|
|
||||||
# Learn more about .gitignore:
|
|
||||||
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
|
|
||||||
|
|
||||||
# Node artifact files
|
|
||||||
node_modules/
|
|
||||||
dist/
|
|
||||||
|
|
||||||
# Compiled Java class files
|
|
||||||
*.class
|
|
||||||
|
|
||||||
# Compiled Python bytecode
|
|
||||||
*.py[cod]
|
|
||||||
|
|
||||||
# Log files
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Package files
|
|
||||||
*.jar
|
|
||||||
|
|
||||||
# Maven
|
|
||||||
target/
|
|
||||||
dist/
|
|
||||||
|
|
||||||
# JetBrains IDE
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
# Unit test reports
|
|
||||||
TEST*.xml
|
|
||||||
|
|
||||||
# Generated by MacOS
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Generated by Windows
|
|
||||||
Thumbs.db
|
|
||||||
|
|
||||||
# Applications
|
|
||||||
*.app
|
|
||||||
*.exe
|
|
||||||
*.war
|
|
||||||
|
|
||||||
# Large media files
|
|
||||||
*.mp4
|
|
||||||
*.tiff
|
|
||||||
*.avi
|
|
||||||
*.flv
|
|
||||||
*.mov
|
|
||||||
*.wmv
|
|
||||||
|
|
||||||
|
|
17
.project
Normal file
17
.project
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>scrypt</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
2
.settings/org.eclipse.core.resources.prefs
Normal file
2
.settings/org.eclipse.core.resources.prefs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding/<project>=UTF-8
|
14
.settings/org.eclipse.jdt.core.prefs
Normal file
14
.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=17
|
||||||
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||||
|
org.eclipse.jdt.core.compiler.release=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=17
|
26
src/com/okseby/Main.java
Normal file
26
src/com/okseby/Main.java
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
package com.okseby;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
|
|
||||||
|
import com.okseby.win.Window;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
static Window w;
|
||||||
|
|
||||||
|
static String title = "Scrypt ";
|
||||||
|
static double version = 0.1;
|
||||||
|
static Dimension winSize = new Dimension(1280, 720);
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void init() {
|
||||||
|
try {
|
||||||
|
w = new Window(title, version, winSize);
|
||||||
|
new Thread(w).start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
src/com/okseby/io/Open.java
Normal file
7
src/com/okseby/io/Open.java
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
package com.okseby.io;
|
||||||
|
|
||||||
|
public class Open {
|
||||||
|
public Open() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
7
src/com/okseby/io/Save.java
Normal file
7
src/com/okseby/io/Save.java
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
package com.okseby.io;
|
||||||
|
|
||||||
|
public class Save {
|
||||||
|
public Save() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
111
src/com/okseby/win/Window.java
Normal file
111
src/com/okseby/win/Window.java
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
package com.okseby.win;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
|
import javax.swing.Box;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JMenu;
|
||||||
|
import javax.swing.JMenuBar;
|
||||||
|
import javax.swing.JMenuItem;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JTextArea;
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.border.EtchedBorder;
|
||||||
|
|
||||||
|
public class Window implements Runnable {
|
||||||
|
JFrame window;
|
||||||
|
JMenuBar menuBar;
|
||||||
|
JMenu fileMenu;
|
||||||
|
JMenu editMenu;
|
||||||
|
JButton quitButton;
|
||||||
|
JMenuItem fileMenuItem1, fileMenuItem2, fileMenuItem3;
|
||||||
|
JPanel fileExplorer;
|
||||||
|
JPanel mainPanel;
|
||||||
|
JTextArea textArea;
|
||||||
|
|
||||||
|
String title;
|
||||||
|
double version;
|
||||||
|
Dimension winSize;
|
||||||
|
|
||||||
|
public void setup() {
|
||||||
|
menuBar.add(fileMenu);
|
||||||
|
menuBar.add(editMenu);
|
||||||
|
menuBar.add(Box.createHorizontalGlue());
|
||||||
|
menuBar.add(quitButton);
|
||||||
|
|
||||||
|
fileMenu.add(fileMenuItem1);
|
||||||
|
fileMenu.add(fileMenuItem2);
|
||||||
|
fileMenu.add(fileMenuItem3);
|
||||||
|
|
||||||
|
quitButton.setContentAreaFilled(false);
|
||||||
|
quitButton.setBorderPainted(false);
|
||||||
|
quitButton.setFocusable(false);
|
||||||
|
|
||||||
|
quitButton.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||||
|
public void mouseEntered(java.awt.event.MouseEvent evt) {
|
||||||
|
quitButton.setContentAreaFilled(true);
|
||||||
|
quitButton.setBackground(Color.RED);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void mouseExited(java.awt.event.MouseEvent evt) {
|
||||||
|
quitButton.setContentAreaFilled(false);
|
||||||
|
quitButton.setBackground(UIManager.getColor("control"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
quitButton.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
fileExplorer.setBorder(new EtchedBorder());
|
||||||
|
fileExplorer.setBackground(new Color(0, 0, 0));
|
||||||
|
fileExplorer.setPreferredSize(new Dimension(200, 200));
|
||||||
|
|
||||||
|
mainPanel.setLayout(new BorderLayout());
|
||||||
|
mainPanel.setBorder(new EtchedBorder());
|
||||||
|
mainPanel.add(textArea);
|
||||||
|
|
||||||
|
window.add(fileExplorer, BorderLayout.WEST);
|
||||||
|
window.add(mainPanel);
|
||||||
|
|
||||||
|
window.setTitle(title);
|
||||||
|
window.setSize(winSize);
|
||||||
|
window.setJMenuBar(menuBar);
|
||||||
|
window.setLocationRelativeTo(null);
|
||||||
|
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
window.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void build() {
|
||||||
|
window = new JFrame();
|
||||||
|
menuBar = new JMenuBar();
|
||||||
|
fileMenu = new JMenu("File");
|
||||||
|
editMenu = new JMenu("Edit");
|
||||||
|
quitButton = new JButton("Quit");
|
||||||
|
fileMenuItem1 = new JMenuItem("Open");
|
||||||
|
fileMenuItem2 = new JMenuItem("Save");
|
||||||
|
fileMenuItem3 = new JMenuItem("Close File");
|
||||||
|
fileExplorer = new JPanel();
|
||||||
|
mainPanel = new JPanel();
|
||||||
|
textArea = new JTextArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
build();
|
||||||
|
setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Window(String title, double version, Dimension winSize) {
|
||||||
|
this.title = title + version;
|
||||||
|
this.winSize = winSize;
|
||||||
|
}
|
||||||
|
}
|
7
src/module-info.java
Normal file
7
src/module-info.java
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* @author seby
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
module scrypt {
|
||||||
|
requires java.desktop;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue