esoe
3 years ago
15 changed files with 99 additions and 24 deletions
Binary file not shown.
@ -0,0 +1,24 @@ |
|||||||
|
package ru.egspt.moodle.events; |
||||||
|
|
||||||
|
import java.awt.event.ActionEvent; |
||||||
|
import java.awt.event.ActionListener; |
||||||
|
|
||||||
|
import ru.egspt.moodle.Access; |
||||||
|
import ru.egspt.moodle.panel.Account; |
||||||
|
|
||||||
|
public class ConnactionListener implements ActionListener{ |
||||||
|
Account account; |
||||||
|
public ConnactionListener(Account account){ |
||||||
|
this.account = account; |
||||||
|
} |
||||||
|
public void actionPerformed(ActionEvent e) { |
||||||
|
System.out.println("Нажата кнопка Connect"); |
||||||
|
Access.setUserName(account.getLoginField().getText()); |
||||||
|
Access.setPassword(String.valueOf(account.getPassField().getPassword())); |
||||||
|
Access.setUrl(account.getUrlField().getText()); |
||||||
|
System.out.println(Access.getUserName()); |
||||||
|
System.out.println(Access.getPassword()); |
||||||
|
System.out.println(Access.getURL()); |
||||||
|
account.getMainframe().dispose(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
package ru.egspt.moodle.panel; |
||||||
|
|
||||||
|
import java.awt.Color; |
||||||
|
import javax.swing.JFrame; |
||||||
|
import javax.swing.JPanel; |
||||||
|
import javax.swing.JTextArea; |
||||||
|
import javax.swing.WindowConstants; |
||||||
|
import javax.swing.border.LineBorder; |
||||||
|
import javax.swing.border.TitledBorder; |
||||||
|
|
||||||
|
public class ReportSample extends JPanel{ |
||||||
|
private JFrame mainframe = new JFrame("report-sample"); |
||||||
|
private JTextArea ReportArea = new JTextArea(); |
||||||
|
|
||||||
|
|
||||||
|
public ReportSample(){ |
||||||
|
TitledBorder border = new TitledBorder(new LineBorder(Color.black), "Report-Sample", TitledBorder.CENTER, TitledBorder.CENTER); |
||||||
|
this.setBorder(border); |
||||||
|
this.add(ReportArea); |
||||||
|
|
||||||
|
} |
||||||
|
public void init(){ |
||||||
|
mainframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
||||||
|
mainframe.add(this); |
||||||
|
mainframe.setSize(320, 240); |
||||||
|
mainframe.setVisible(true); |
||||||
|
} |
||||||
|
public static void main( String[] args ) |
||||||
|
{ |
||||||
|
System.out.println( "Проверка работоспособности класса ReportSample ..." ); |
||||||
|
ReportSample rs = new ReportSample(); |
||||||
|
rs.init(); |
||||||
|
} |
||||||
|
} |
@ -1,5 +1,5 @@ |
|||||||
package ru.egspt.moodle.panel; |
package ru.egspt.moodle.panel; |
||||||
|
|
||||||
public class Users { |
public class UserByTag { |
||||||
|
|
||||||
} |
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue