Test
This commit is contained in:
parent
c2dd060140
commit
97925fd331
@ -25,6 +25,7 @@ public class Listener implements ActionListener, KeyListener, MouseWheelListener
|
|||||||
this.frame = frame;
|
this.frame = frame;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
System.getProperty("os.name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -149,9 +150,9 @@ public class Listener implements ActionListener, KeyListener, MouseWheelListener
|
|||||||
|
|
||||||
byte i = (byte) ((type.equals("Axiome")) ? 0 : 1);
|
byte i = (byte) ((type.equals("Axiome")) ? 0 : 1);
|
||||||
|
|
||||||
if(nbAxioms==0 && ke.getKeyCode() != KeyEvent.VK_BACK_SPACE)
|
if(nbAxioms==0 && ke.getKeyChar() != '\b')
|
||||||
tab.changeList(String.valueOf(ke.getKeyChar()), tab.getTextArea(i),nbAxioms);
|
tab.changeList(String.valueOf(ke.getKeyChar()), tab.getTextArea(i),nbAxioms);
|
||||||
if(ke.getKeyCode() == KeyEvent.VK_BACK_SPACE){
|
if(ke.getKeyChar() == '\b'){
|
||||||
String str = tab.getTextArea(i).getText();
|
String str = tab.getTextArea(i).getText();
|
||||||
if(str.length()>10) {
|
if(str.length()>10) {
|
||||||
if (!(str.endsWith(";\n") || str.endsWith(";"))){
|
if (!(str.endsWith(";\n") || str.endsWith(";"))){
|
||||||
|
@ -19,6 +19,8 @@ public class Tab extends JPanel{
|
|||||||
this.nbRules = nbRules;
|
this.nbRules = nbRules;
|
||||||
this.nbTabs = nbTabs;
|
this.nbTabs = nbTabs;
|
||||||
|
|
||||||
|
this.add(new JButton("Close"));
|
||||||
|
|
||||||
axiomList = textArea("Axiome : \n",nbTabs);
|
axiomList = textArea("Axiome : \n",nbTabs);
|
||||||
rulesList = textArea("Règles : \n",nbTabs+10);
|
rulesList = textArea("Règles : \n",nbTabs+10);
|
||||||
|
|
||||||
@ -70,10 +72,6 @@ public class Tab extends JPanel{
|
|||||||
this.add(aboveComponents);
|
this.add(aboveComponents);
|
||||||
this.add(southComponents2);
|
this.add(southComponents2);
|
||||||
this.setLayout(new BoxLayout(this,1));
|
this.setLayout(new BoxLayout(this,1));
|
||||||
this.add(new JButton("Close"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tabs.addTab("Génération"+String.valueOf(nbTabs),this);
|
tabs.addTab("Génération"+String.valueOf(nbTabs),this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user