@ -156,6 +156,11 @@ public class DungeonGeneratorUI extends javax.swing.JFrame {
jPanelSettings . add ( filler1 ) ;
jCheckBoxExp . setText ( "<html>\n<b>Experimenteller Modus</b><br/>\nschränkt Raumzahl nicht direkt ein, sondern ändert die Zufallsfunktion so, dass ihr Erwartungswert der Raumanzahl entspricht" ) ;
jCheckBoxExp . addActionListener ( new java . awt . event . ActionListener ( ) {
public void actionPerformed ( java . awt . event . ActionEvent evt ) {
jCheckBoxExpActionPerformed ( evt ) ;
}
} ) ;
jPanelSettings . add ( jCheckBoxExp ) ;
jLabel1 . setHorizontalAlignment ( javax . swing . SwingConstants . CENTER ) ;
@ -226,6 +231,7 @@ public class DungeonGeneratorUI extends javax.swing.JFrame {
jMenu . add ( jMenuNew ) ;
jMenuDescription . setText ( "Beschreibung exportieren" ) ;
jMenuDescription . setEnabled ( false ) ;
jMenuDescription . addActionListener ( new java . awt . event . ActionListener ( ) {
public void actionPerformed ( java . awt . event . ActionEvent evt ) {
jMenuDescriptionActionPerformed ( evt ) ;
@ -233,7 +239,6 @@ public class DungeonGeneratorUI extends javax.swing.JFrame {
} ) ;
jMenuDescTxt . setText ( "Textdokument" ) ;
jMenuDescTxt . setEnabled ( false ) ;
jMenuDescTxt . addActionListener ( new java . awt . event . ActionListener ( ) {
public void actionPerformed ( java . awt . event . ActionEvent evt ) {
jMenuDescTxtActionPerformed ( evt ) ;
@ -276,6 +281,7 @@ public class DungeonGeneratorUI extends javax.swing.JFrame {
jMenu . add ( jMenuGraph ) ;
jMenuPdf . setText ( "PDF erstellen" ) ;
jMenuPdf . setEnabled ( false ) ;
jMenuPdf . addActionListener ( new java . awt . event . ActionListener ( ) {
public void actionPerformed ( java . awt . event . ActionEvent evt ) {
jMenuPdfActionPerformed ( evt ) ;
@ -376,6 +382,7 @@ public class DungeonGeneratorUI extends javax.swing.JFrame {
jMenuNew . setEnabled ( true ) ;
jMenuDescription . setEnabled ( true ) ;
jMenuGraph . setEnabled ( true ) ;
jMenuPdf . setEnabled ( true ) ;
CardLayout cl = ( CardLayout ) jPanelCards . getLayout ( ) ;
cl . show ( jPanelCards , "show" ) ;
} //GEN-LAST:event_jButtonGenerateActionPerformed
@ -384,6 +391,7 @@ public class DungeonGeneratorUI extends javax.swing.JFrame {
jMenuNew . setEnabled ( false ) ;
jMenuDescription . setEnabled ( false ) ;
jMenuGraph . setEnabled ( false ) ;
jMenuPdf . setEnabled ( false ) ;
CardLayout cl = ( CardLayout ) jPanelCards . getLayout ( ) ;
cl . show ( jPanelCards , "new" ) ;
jPanelDraw . removeAll ( ) ;
@ -631,6 +639,12 @@ public class DungeonGeneratorUI extends javax.swing.JFrame {
}
} //GEN-LAST:event_jMenuDescriptionActionPerformed
private void jCheckBoxExpActionPerformed ( java . awt . event . ActionEvent evt ) { //GEN-FIRST:event_jCheckBoxExpActionPerformed
jComboBoxMode . setEnabled ( ! jCheckBoxExp . isSelected ( ) ) ;
jLabel2 . setEnabled ( ! jCheckBoxExp . isSelected ( ) ) ;
//jComboBoxMode.setSelectedItem("Zufällig");
} //GEN-LAST:event_jCheckBoxExpActionPerformed
private void CreateGraphPDF ( File file ) throws BadElementException , IOException , DocumentException {
Document document = new Document ( PageSize . A4 ) ;
Image image = Image . getInstance ( mxCellRenderer . createBufferedImage ( mGraphComponent . getGraph ( ) , null , 10 , Color . WHITE , true , null ) , Color . WHITE ) ;