input
stringlengths
10
828
output
stringlengths
5
107
private jmenu get help menu if help menu null help menu new jmenu help menu set background net sf econtycoon core data mod data textfield color help menu set text strings get string gui 0 non nls 1 help menu add get hilfe menu item help menu add get about menu item help menu add get menuitemkonsole return help menu
this method initializes j menu
public jframe get jframe if j frame null j frame new jframe j frame set default close operation jframe exit on close j frame set jmenu bar get jjmenu bar j frame set title econtycoon non nls 1 j frame set preferred size new java awt dimension 980 800 j frame set size 980 800 j frame set content pane get jcontent pane return j frame
this method initializes j frame
private jmenu bar get jjmenu bar if j jmenu bar null j jmenu bar new jmenu bar j jmenu bar add get file menu j jmenu bar add get help menu j jmenu bar set background net sf econtycoon core data mod data textfield color return j jmenu bar
this method initializes j jmenu bar
public int get storage typ return storage typ
gets the lagertyp
public double get avg price return avg price
gets the average price
public int get current maintenance return current maintenance
gets die momentanen unterhaltskosten
public boolean has need1 if need1 null return false else return true
checks for need1
public boolean has need2 if need2 null return false else return true
checks for need2
private jmenu item get menu datei neues spiel if menu datei neues spiel null menu datei neues spiel new jmenu item menu datei neues spiel set background net sf econtycoon core data mod data textfield color menu datei neues spiel set text strings get string gui 11 non nls 1 menu datei neues spiel add action listener new java awt event action listener public void action performed java awt event action event e master neues spiel return menu datei neues spiel
this method initializes menu datei neues spiel
public boolean has need3 if need3 null return false else return true
checks for need3
public commodity get need1 return need1
gets the need1
public void set timer int i timer i
sets the timer
public commodity get need2 return need2
gets the need2
public int get taxes multiplier return taxes multiplier
gets the taxes multiplier
public int get amount of need1 return amount of need1
gets the amount of need1
public void set taxes multiplier int taxes multiplier this taxes multiplier taxes multiplier
sets the taxes multiplier
public int get maintenance multiplier return maintenance multiplier
gets the maintenance multiplier
public int get amount of need2 return amount of need2
gets the amount of need2
public void set maintenance multiplier int maintenance multiplier this maintenance multiplier maintenance multiplier
sets the maintenance multiplier
public boolean is console ai return console ai
checks if is console ai
public int get ticker return ticker
gets the ticker
public void set console ai boolean console ai this console ai console ai
sets the console ai
public boolean is interest on all loans return interest on all loans
checks if is interest on all loans
public void set enabled boolean enabled this enabled enabled if enabled set maintenance maintenance else set maintenance maintenance 2
sets the enabled
public jmenu item get menu datei pause if menu datei pause null menu datei pause new jmenu item menu datei pause set background net sf econtycoon core data mod data textfield color menu datei pause set text strings get string gui 12 non nls 1 menu datei pause add action listener new action listener public void action performed action event evt if master is game break master set game break false else master set game break true return menu datei pause
gets the menu datei pause
public void set interest on all loans boolean interest on all loans this interest on all loans interest on all loans
sets the interest on all loans
public commodity get commodity int i return commodity i
gets the rohstoffint
public int get tick counter return tick counter
gets the tick counter
public aiplayer get aiplayer int i return ai players i
gets the ai players
public boolean is game break return game break
checks if is game break
public void set game break boolean game break this game break game break
sets the game break
public player game game this game game player data new player data game this reset
konstruiert einen neuen player
public tab statistik get tabstatistik if tabstatistik null tabstatistik new tab statistik this game tabstatistik add component listener new component adapter override public void component shown component event evt tabstatistik statistik update tab statistik dpreis null return tabstatistik
gets the tabstatistik
public tab verwaltung get tabverwaltung if tabverwaltung null tabverwaltung new tab verwaltung this game tabverwaltung set preferred size new java awt dimension 767 365 tabverwaltung set border border factory create etched border bevel border lowered tabverwaltung add component listener new component adapter override public void component shown component event evt tabverwaltung tf update return tabverwaltung
gets the tabverwaltung
private void add commodity commodity commodity if player data check space commodity 1 commodity property commodity get id player data calculate storage space
f gt den commodity der variable besitz rohstoff hinzu ohne kosten
private void add commodity commodity commodity int menge for int i 0 i menge i if player data check space commodity 1 commodity property commodity get id player data calculate storage space
f gt den commodity der variable besitz rohstoff hinzu ohne kosten
public void remove commodity commodity commodity player data add to purchase price commodity get id player data get purchase price commodity get id commodity property commodity get id commodity property commodity get id player data calculate storage space
zieht den commodity von besitz rohstoff ab ohne kosten
public void remove commodity commodity commodity int menge for int i 0 i menge i player data add to purchase price commodity get id player data get purchase price commodity get id commodity property commodity get id commodity property commodity get id player data calculate storage space
zieht int menge rohstoffe von besitz rohstoff ab ohne kosten
public boolean check commodity commodity r if commodity property r get id 0 return true else return false
liefert true wenn von dem commodity mindestens 1 im lager ist
private jtext field get tfgeld if tfgeld null tfgeld new jtext field tfgeld set background net sf econtycoon core data mod data textfield color tfgeld set bounds new rectangle 705 510 76 31 tfgeld set text 0 non nls 1 return tfgeld
this method initializes tfgeld
public jtext field get tfnachrichten if tfnachrichten null tfnachrichten new jtext field tfnachrichten set background net sf econtycoon core data mod data textfield color tfnachrichten set bounds new rectangle 15 510 631 31 return tfnachrichten
this method initializes tfnachrichten
public void set news message string nachricht tfnachrichten set text nachricht
sets the nachrichtentext
public boolean check commodity commodity com int amount if commodity property com get id amount return true else return false
liefert true wenn von dem commodity mindestens int menge im lager sind
public int get storage size int typ return storage size typ
gets the storage size
public int get storage used int typ return player data get commodities of typ typ
gets the lagerinhalt
public int get loan return loan
gets the loan
private jmenu item get hilfe menu item if hilfe menu item null hilfe menu item new jmenu item hilfe menu item set background net sf econtycoon core data werte tffarbe hilfe menu item set text strings get string gui 0 hilfe menu item add action listener new action listener public void action performed action event e hilfe jdialog hilfe dialog get hilfe jdialog point loc get jframe get location loc translate 20 20 hilfe dialog set location loc hilfe dialog set visible true return hilfe menu item
this method initializes j menu item
private jmenu item get about menu item if about menu item null about menu item new jmenu item about menu item set background net sf econtycoon core data werte tffarbe about menu item set text strings get string gui 1 non nls 1 about menu item add action listener new action listener public void action performed action event e about jdialog about dialog get about jdialog point loc get jframe get location loc translate 20 20 about dialog set location loc about dialog set visible true return about menu item
this method initializes j menu item
public industry get industry int i return industry property get i
gets the industrie
private jmenu item get exit menu item if exit menu item null exit menu item new jmenu item exit menu item set background net sf econtycoon core data werte tffarbe exit menu item set text strings get string gui 2 non nls 1 exit menu item add action listener new action listener public void action performed action event e system exit 0 return exit menu item
this method initializes j menu item
private jmenu get file menu if file menu null file menu new jmenu file menu set background net sf econtycoon core data werte tffarbe file menu set text strings get string gui 3 non nls 1 file menu add get menu datei neues spiel file menu add get menu datei pause file menu add get menu datei speichern file menu add get menu datei laden file menu add get menu datei optionen file menu add get exit menu item return file menu
this method initializes j menu
public void set manager int i boolean hired manager i hired
sets the manager
private jmenu get help menu if help menu null help menu new jmenu help menu set background net sf econtycoon core data werte tffarbe help menu set text strings get string gui 0 non nls 1 help menu add get hilfe menu item help menu add get about menu item help menu add get menuitemkonsole return help menu
this method initializes j menu
private jmenu bar get jjmenu bar if j jmenu bar null j jmenu bar new jmenu bar j jmenu bar add get file menu j jmenu bar add get help menu j jmenu bar set background net sf econtycoon core data werte tffarbe return j jmenu bar
this method initializes j jmenu bar
public boolean is konsoleai return konsoleai
checks if is konsoleai
public void set konsoleai boolean konsoleai this konsoleai konsoleai
sets the konsoleai
public boolean is konsolerohstoffe return konsolerohstoffe
checks if is konsolerohstoffe
public void set konsolerohstoffe boolean konsolerohstoffe this konsolerohstoffe konsolerohstoffe
sets the konsolerohstoffe
public void set konsolespiel boolean konsolespiel this konsolespiel konsolespiel
sets the konsolespiel
public boolean is konsolegui return konsolegui
checks if is konsolegui
public int get typ return lagertyp
gets the lagertyp
private jmenu item get menu datei neues spiel if menu datei neues spiel null menu datei neues spiel new jmenu item menu datei neues spiel set background net sf econtycoon core data werte tffarbe menu datei neues spiel set text strings get string gui 11 non nls 1 menu datei neues spiel add action listener new java awt event action listener public void action performed java awt event action event e master neues spiel return menu datei neues spiel
this method initializes menu datei neues spiel
public rohstoff get rohstoffint int i return rohstoff i
gets the rohstoffint
public void set rohstoffint int i rohstoff r rohstoff i r
sets the rohstoffint
public spieler get spieler return spieler
gets the spieler
public void set spieler spieler spieler this spieler spieler
sets the spieler
public void set spielerzahl int i spielerzahl i
sets the spielerzahl
public jmenu item get menu datei pause if menu datei pause null menu datei pause new jmenu item menu datei pause set background net sf econtycoon core data werte tffarbe menu datei pause set text strings get string gui 12 non nls 1 menu datei pause add action listener new action listener public void action performed action event evt if master is pause master set pause false else master set pause true return menu datei pause
gets the menu datei pause
public spiel get spiel return spiel
gets the spiel
public int get dauer return dauer
gets the dauer
public boolean has verbrauch1 if verbrauch1 null return false else return true
checks for verbrauch1
public boolean has verbrauch2 if verbrauch2 null return false else return true
checks for verbrauch2
public boolean has verbrauch3 if verbrauch3 null return false else return true
checks for verbrauch3
public rohstoff get verbrauch1 return verbrauch1
gets the verbrauch1
public boolean get produzierbar return produzierbar
liefert ob produzierbar
public tab statistik get tabstatistik if tabstatistik null tabstatistik new tab statistik this spiel tabstatistik add component listener new component adapter public void component shown component event evt tabstatistik statistik update tab statistik dpreis null return tabstatistik
gets the tabstatistik
private jtext field get tfgeld if tfgeld null tfgeld new jtext field tfgeld set bounds new rectangle 705 510 76 31 tfgeld set text 0 non nls 1 return tfgeld
this method initializes tfgeld
private jtext field get tfnachrichten if tfnachrichten null tfnachrichten new jtext field tfnachrichten set bounds new rectangle 15 510 631 31 return tfnachrichten
this method initializes tfnachrichten
private jslider get jslider if j slider null j slider new jslider 1000 15000 3000 j slider set bounds new rectangle 15 435 751 46 j slider create standard labels 1000 j slider set major tick spacing 1000 j slider set minor tick spacing 100 j slider set paint ticks true j slider set paint labels true j slider add change listener new javax swing event change listener public void state changed javax swing event change event e jslider source jslider e get source change timer source get value return j slider
this method initializes j slider
private jeditor pane get abouttext if abouttext null abouttext new jeditor pane abouttext set text econtycoon r version 0 1 non nls 1 return abouttext
this method initializes abouttext
private jmenu item get menu datei neues spiel if menu datei neues spiel null menu datei neues spiel new jmenu item menu datei neues spiel set text strings get string haupt 0 non nls 1 menu datei neues spiel add action listener new java awt event action listener public void action performed java awt event action event e start return menu datei neues spiel
this method initializes menu datei neues spiel
private jtext field get tfgeld if tfgeld null tfgeld new jtext field tfgeld set background net sf econtycoon core data werte tffarbe tfgeld set bounds new rectangle 705 510 76 31 tfgeld set text 0 non nls 1 return tfgeld
this method initializes tfgeld
public jtext field get tfnachrichten if tfnachrichten null tfnachrichten new jtext field tfnachrichten set background net sf econtycoon core data werte tffarbe tfnachrichten set bounds new rectangle 15 510 631 31 return tfnachrichten
this method initializes tfnachrichten
public boolean check lager int typ if rohstoffegesamt typ lagergroesse typ return false else return true
liefert true wenn im lager noch platz ist
public int get lagergroesse int typ return lagergroesse typ
gets the lagergroesse
public int get lagerinhalt int typ return rohstoffegesamt typ
gets the lagerinhalt
private jframe get jframe if j frame null j frame new jframe j frame set default close operation jframe exit on close j frame set jmenu bar get jjmenu bar j frame set title strings get string haupt 1 non nls 1 j frame set size 800 600 j frame set content pane get jcontent pane return j frame
this method initializes j frame
public void set spiel spiel spiel this spiel spiel
sets the spiel
public int get rohstoffwert int i rohstoffwert i besitz i spiel get rohstoffint i get preis as int return rohstoffwert i
gets den wert aller rohstoffe eines typs
private jmenu get file menu if file menu null file menu new jmenu file menu set text strings get string haupt 2 non nls 1 file menu add get menu datei neues spiel file menu add get menu datei pause file menu add get exit menu item return file menu
this method initializes j menu
private jmenu get help menu if help menu null help menu new jmenu help menu set text strings get string haupt 3 non nls 1 help menu add get about menu item return help menu
this method initializes j menu
private jmenu item get exit menu item if exit menu item null exit menu item new jmenu item exit menu item set text strings get string haupt 4 non nls 1 exit menu item add action listener new action listener public void action performed action event e system exit 0 return exit menu item
this method initializes j menu item
public int get kredite return kredite
gets the kredite
private jmenu item get about menu item if about menu item null about menu item new jmenu item about menu item set text strings get string haupt 5 non nls 1 about menu item add action listener new action listener public void action performed action event e jdialog about dialog get about dialog point loc get jframe get location loc translate 20 20 about dialog set location loc about dialog set visible true return about menu item
this method initializes j menu item
private jdialog get about dialog if about dialog null about dialog new jdialog get jframe true about dialog set title strings get string haupt 6 non nls 1 about dialog set size new dimension 300 100 about dialog set content pane get about content pane return about dialog
this method initializes about dialog
private jpanel get about content pane if about content pane null about content pane new jpanel about content pane set layout new border layout about content pane add get abouttext border layout center return about content pane
this method initializes about content pane
public int get firmenwert int fw geld for int i 0 i werte rohstoffzahl i fw besitz i spiel get rohstoffint i get preis as int for int i 0 i indu size i fw indu get i get preis fw kredite fw lagerwert return fw
gets the firmenwert
public industrie get industrie int i return indu get i
gets the industrie
public void set prokurist int i boolean aktiv prokurist i aktiv
sets the prokurist
private jmenu item get hilfe menu item if hilfe menu item null hilfe menu item new jmenu item hilfe menu item set background econtyc data werte tffarbe hilfe menu item set text strings get string gui 0 hilfe menu item add action listener new action listener public void action performed action event e hilfe jdialog hilfe dialog get hilfe jdialog point loc get jframe get location loc translate 20 20 hilfe dialog set location loc hilfe dialog set visible true return hilfe menu item
this method initializes j menu item