| 1 | |
package de.glossmaker.gui.gloss.bibOptions; |
| 2 | |
|
| 3 | |
import javax.swing.JFrame; |
| 4 | |
|
| 5 | |
import de.glossmaker.gloss.datastructure.gui.Config; |
| 6 | |
|
| 7 | |
import java.awt.BorderLayout; |
| 8 | |
import java.awt.Dimension; |
| 9 | |
import java.awt.event.WindowAdapter; |
| 10 | |
import java.awt.event.WindowEvent; |
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
public class BibTeXOptionFrame extends JFrame { |
| 18 | |
private static final long serialVersionUID = 8255219105445413371L; |
| 19 | |
|
| 20 | 0 | public BibTeXOptionFrame() { |
| 21 | 0 | setResizable(false); |
| 22 | 0 | getContentPane().setLayout(new BorderLayout(0, 0)); |
| 23 | |
|
| 24 | 0 | BibTeXOptions bibTeXOptions = new BibTeXOptions(); |
| 25 | 0 | this.setLocation(Config.getInstance().getWindowPositionX("BibTeX-Options", 20), |
| 26 | |
Config.getInstance().getWindowPositionY("BibTeX-Options", 20)); |
| 27 | 0 | getContentPane().add(bibTeXOptions, BorderLayout.CENTER); |
| 28 | |
|
| 29 | 0 | ButtonPanel buttonPanel = new ButtonPanel(this); |
| 30 | 0 | buttonPanel.setSize(new Dimension(200, 40)); |
| 31 | 0 | buttonPanel.setPreferredSize(new Dimension(200, 40)); |
| 32 | 0 | getContentPane().add(buttonPanel, BorderLayout.SOUTH); |
| 33 | 0 | setPreferredSize(new Dimension( |
| 34 | |
Config.getInstance().getWindowPositionWidth("BibTeX-Options", 500), |
| 35 | |
Config.getInstance().getWindowPositionHeight("BibTeX-Options", 200))); |
| 36 | 0 | setSize(getPreferredSize()); |
| 37 | 0 | setVisible(true); |
| 38 | 0 | this.addWindowListener(new WindowAdapter() { |
| 39 | |
public void windowDeactivated(WindowEvent e) { |
| 40 | 0 | Config.getInstance().setWindowPosition("BibTeX-Options", getX(), getY(), getWidth(), getHeight()); |
| 41 | 0 | } |
| 42 | |
}); |
| 43 | 0 | } |
| 44 | |
} |