mirror of
https://github.com/Noratrieb/UMLetClassParser.git
synced 2026-01-15 09:05:05 +01:00
added uml parser classes
This commit is contained in:
parent
796e786d00
commit
09b837ca29
8 changed files with 398 additions and 0 deletions
39
src/UMLClassView.java
Normal file
39
src/UMLClassView.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
public class UMLClassView {
|
||||
private JTextArea textArea1;
|
||||
private JPanel panel1;
|
||||
private JButton convertButton;
|
||||
private JTextArea textArea2;
|
||||
|
||||
|
||||
public UMLClassView() {
|
||||
|
||||
convertButton.addActionListener(e -> {
|
||||
String text = textArea1.getText();
|
||||
|
||||
UMLClass umlClass = new UMLClass(text);
|
||||
|
||||
textArea2.setText(umlClass.toString());
|
||||
});
|
||||
|
||||
textArea1.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e) {
|
||||
String text = textArea1.getText();
|
||||
|
||||
UMLClass umlClass = new UMLClass(text);
|
||||
|
||||
textArea2.setText(umlClass.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public JPanel getPanel1() {
|
||||
return panel1;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue