Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.42 KB | None | 0 0
  1. import java.nio.charset.Charset;
  2. import java.util.ArrayList;
  3. import java.util.Arrays;
  4.  
  5. import com.googlecode.lanterna.TerminalFacade;
  6. import com.googlecode.lanterna.gui.Action;
  7. import com.googlecode.lanterna.gui.Component;
  8. import com.googlecode.lanterna.gui.GUIScreen;
  9. import com.googlecode.lanterna.gui.Window;
  10. import com.googlecode.lanterna.gui.Component.Alignment;
  11. import com.googlecode.lanterna.gui.component.Button;
  12. import com.googlecode.lanterna.gui.component.EmptySpace;
  13. import com.googlecode.lanterna.gui.component.Label;
  14. import com.googlecode.lanterna.gui.component.Panel;
  15. import com.googlecode.lanterna.gui.component.Table;
  16. import com.googlecode.lanterna.gui.component.Panel.Orientation;
  17. import com.googlecode.lanterna.gui.layout.BorderLayout;
  18. import com.googlecode.lanterna.gui.layout.LinearLayout;
  19. import com.googlecode.lanterna.gui.layout.VerticalLayout;
  20. import com.googlecode.lanterna.screen.Screen;
  21. import com.googlecode.lanterna.terminal.Terminal;
  22. import com.googlecode.lanterna.terminal.TerminalSize;
  23.  
  24. public class Sklep {
  25.  
  26. static int i = 0;
  27.  
  28. public static void main(String[] args) {
  29.  
  30. //Obiekty Wina
  31. Obiekt obiekt = new Obiekt();
  32. Obiekt[] TablicaWina = new Obiekt[100];
  33. Obiekt[] TablicaPiwa = new Obiekt[100];
  34. Obiekt[] TablicaWodki = new Obiekt[100];
  35.  
  36. Obiekt Wino1 = new Obiekt("Amarena",12);
  37. Obiekt Wino2 = new Obiekt("Alazani",18);
  38. Obiekt Wino3 = new Obiekt("Carlo Rossi",25);
  39. Obiekt Wino4 = new Obiekt("Kvareli",60);
  40. Obiekt Wino5 = new Obiekt("Muscat",79);
  41. Obiekt Wino6 = new Obiekt("Mukuzani",100);
  42. Obiekt Wino7 = new Obiekt("Kisi",159);
  43. Obiekt Wino8 = new Obiekt("Pirosmani",2500);
  44.  
  45. //Obiekty Piwa
  46. Obiekt Piwo1 = new Obiekt("Tatra",3);
  47. Obiekt Piwo2 = new Obiekt("Zubr",3);
  48. Obiekt Piwo3 = new Obiekt("Wojak",4);
  49. Obiekt Piwo4 = new Obiekt("Tyskie",5);
  50. Obiekt Piwo5 = new Obiekt("Lomza",4);
  51. Obiekt Piwo6 = new Obiekt("Warka",3);
  52. Obiekt Piwo7 = new Obiekt("Zywiec",2);
  53. Obiekt Piwo8 = new Obiekt("Lech",4);
  54.  
  55. //Obiekty Wodki
  56. Obiekt Wodka1 = new Obiekt("Krupnik",20);
  57. Obiekt Wodka2 = new Obiekt("Sobieski",22);
  58. Obiekt Wodka3 = new Obiekt("Chrobry",23);
  59. Obiekt Wodka4 = new Obiekt("Smirnoff",26);
  60. Obiekt Wodka5 = new Obiekt("JA Baczewski",29);
  61. Obiekt Wodka6 = new Obiekt("Zubrowka",30);
  62. Obiekt Wodka7 = new Obiekt("Finlandia",37);
  63. Obiekt Wodka8 = new Obiekt("Stock",42);
  64.  
  65.  
  66. TablicaWina[0] = Wino1;
  67. TablicaWina[1] = Wino2;
  68. TablicaWina[2] = Wino3;
  69. TablicaWina[3] = Wino4;
  70. TablicaWina[4] = Wino5;
  71. TablicaWina[5] = Wino6;
  72. TablicaWina[6] = Wino7;
  73. TablicaWina[7] = Wino8;
  74.  
  75. TablicaPiwa[0] = Piwo1;
  76. TablicaPiwa[1] = Piwo2;
  77. TablicaPiwa[2] = Piwo3;
  78. TablicaPiwa[3] = Piwo4;
  79. TablicaPiwa[4] = Piwo5;
  80. TablicaPiwa[5] = Piwo6;
  81. TablicaPiwa[6] = Piwo7;
  82. TablicaPiwa[7] = Piwo8;
  83.  
  84. TablicaWodki[0] = Wodka1;
  85. TablicaWodki[1] = Wodka2;
  86. TablicaWodki[2] = Wodka3;
  87. TablicaWodki[3] = Wodka4;
  88. TablicaWodki[4] = Wodka5;
  89. TablicaWodki[5] = Wodka6;
  90. TablicaWodki[6] = Wodka7;
  91. TablicaWodki[7] = Wodka8;
  92.  
  93.  
  94. Button[] ButtonTable = new Button[8];
  95.  
  96. final GUIScreen guiScreen = TerminalFacade.createGUIScreen();
  97. final Window window = new Window("Pogotowie Alkoholowe");
  98.  
  99.  
  100.  
  101. window.setWindowSizeOverride(new TerminalSize(5000, 5000));
  102. window.setSoloWindow(true);
  103. Panel panel = new Panel("Menu");
  104. panel.maximisesHorisontally();
  105. panel.maximisesVertically();
  106. panel.setLayoutManager(new VerticalLayout());
  107.  
  108. final Window newWindow = new Window("Zamow Wino i zaspokoj pragnienie");
  109. newWindow.setWindowSizeOverride(new TerminalSize(5000, 5000));
  110. newWindow.setSoloWindow(true);
  111.  
  112. final Window End = new Window("Skompletuj koszyk i zaspokoj pragnienie"); //koszyk
  113. End.setWindowSizeOverride(new TerminalSize(5000, 5000));
  114. End.setSoloWindow(true);
  115.  
  116. final Window newPiwo = new Window("Zamow Piwo i zaspokoj pragnienie");
  117. newPiwo.setWindowSizeOverride(new TerminalSize(5000, 5000));
  118. newPiwo.setSoloWindow(true);
  119.  
  120. final Window newWodka = new Window("Zamow Wodke i zaspokoj pragnienie");
  121. newWodka.setWindowSizeOverride(new TerminalSize(5000,5000));
  122. newWodka.setSoloWindow(true);
  123.  
  124.  
  125. Table table = new Table(6);
  126. table.setColumnPaddingSize(0);
  127. Component[] row1 = new Component[1];
  128. row1[0] = new Label("");
  129. table.addRow(row1);
  130.  
  131.  
  132. //Obiekt[] Koszyk = new Obiekt[100];
  133.  
  134. ArrayList Koszyk = new ArrayList();
  135.  
  136.  
  137.  
  138. Obiekt obiekt1 = new Obiekt();
  139.  
  140. Obiekt Take = new Obiekt();
  141.  
  142. Take = TablicaWina[0];
  143. Table table1 = new Table(2);
  144. table.setColumnPaddingSize(10);
  145. Component[] component = new Component[2];
  146. component[0] = new Label(Take.nazwa);
  147. component[1] = new Label(Take.zwroc()+"$");
  148. table1.addRow(component);
  149.  
  150. Take = TablicaWina[1];
  151. Table table2 = new Table(2);
  152. table.setColumnPaddingSize(5);
  153. Component[] component1 = new Component[2];
  154. component1[0] = new Label(Take.nazwa);
  155. component1[1] = new Label(Take.zwroc()+"$");
  156. table2.addRow(component1);
  157.  
  158. Take = TablicaWina[2];
  159. Table table3 = new Table(2);
  160. table.setColumnPaddingSize(5);
  161. Component[] component2 = new Component[2];
  162. component2[0] = new Label(Take.nazwa);
  163. component2[1] = new Label(Take.zwroc()+"$");
  164. table3.addRow(component2);
  165.  
  166. Take = TablicaWina[3];
  167. Table table4 = new Table(2);
  168. table.setColumnPaddingSize(5);
  169. Component[] component3 = new Component[2];
  170. component3[0] = new Label(Take.nazwa);
  171. component3[1] = new Label(Take.zwroc()+"$");
  172. table4.addRow(component3);
  173.  
  174. Take = TablicaWina[4];
  175. Table table5 = new Table(2);
  176. table.setColumnPaddingSize(5);
  177. Component[] component4 = new Component[2];
  178. component4[0] = new Label(Take.nazwa);
  179. component4[1] = new Label(Take.zwroc()+"$");
  180. table5.addRow(component4);
  181.  
  182. Take = TablicaWina[5];
  183. Table table6 = new Table(2);
  184. table.setColumnPaddingSize(5);
  185. Component[] component5 = new Component[2];
  186. component5[0] = new Label(Take.nazwa);
  187. component5[1] = new Label(Take.zwroc()+"$");
  188. table6.addRow(component5);
  189.  
  190. Take = TablicaWina[6];
  191. Table table7 = new Table(2);
  192. table.setColumnPaddingSize(5);
  193. Component[] component6 = new Component[2];
  194. component6[0] = new Label(Take.nazwa);
  195. component6[1] = new Label(Take.zwroc()+"$");
  196. table7.addRow(component6);
  197.  
  198. Take = TablicaWina[7];
  199. Table table8 = new Table(2);
  200. table.setColumnPaddingSize(5);
  201. Component[] component7 = new Component[2];
  202. component7[0] = new Label(Take.nazwa);
  203. component7[1] = new Label(Take.zwroc()+"$");
  204. table8.addRow(component7);
  205.  
  206.  
  207. Button PokazWodke = new Button("Przegladaj Wodki", new Action() {
  208. public void doAction() {
  209.  
  210. window.close();
  211. guiScreen.showWindow(newWodka);
  212. }
  213. });
  214.  
  215. Button PokazPiwo = new Button("Przegladaj Piwa", new Action(){
  216.  
  217. public void doAction(){
  218.  
  219. window.close();
  220. guiScreen.showWindow(newPiwo);
  221. }
  222.  
  223. });
  224.  
  225. Button button = new Button("Przegladaj Wina", new Action()
  226. {
  227. public void doAction()
  228. {
  229. window.close();
  230. guiScreen.showWindow(newWindow);
  231. }
  232. });
  233.  
  234. Button exit = new Button("Wyjscie", new Action()
  235. {
  236. public void doAction(){
  237. newWindow.close();
  238. window.close();
  239. newPiwo.close();
  240. newWodka.close();
  241. }
  242.  
  243. });
  244.  
  245. Button Dodaj = new Button("Dodaj do koszyka", new Action()
  246. {
  247. public void doAction()
  248. {
  249. Obiekt obiekt = new Obiekt();
  250. obiekt = TablicaWina[0];
  251. Koszyk.add(obiekt);
  252. }
  253.  
  254. });
  255. Button Dodaj1 = new Button("Dodaj do koszyka", new Action()
  256. {
  257. public void doAction()
  258. {
  259. Obiekt obiekt = new Obiekt();
  260. obiekt = TablicaWina[1];
  261. Koszyk.add(obiekt);
  262. }
  263.  
  264. });
  265. Button Dodaj2 = new Button("Dodaj do koszyka", new Action()
  266. {
  267. public void doAction()
  268. {
  269. Obiekt obiekt = new Obiekt();
  270. obiekt = TablicaWina[2];
  271. Koszyk.add(obiekt);
  272. }
  273.  
  274. });
  275. Button Dodaj3 = new Button("Dodaj do koszyka", new Action()
  276. {
  277. public void doAction()
  278. {
  279. Obiekt obiekt = new Obiekt();
  280. obiekt = TablicaWina[3];
  281. Koszyk.add(obiekt);
  282. }
  283.  
  284. });
  285. Button Dodaj4 = new Button("Dodaj do koszyka", new Action()
  286. {
  287. public void doAction()
  288. {
  289. Obiekt obiekt = new Obiekt();
  290. obiekt = TablicaWina[4];
  291. Koszyk.add(obiekt);
  292. }
  293.  
  294. });
  295. Button Dodaj5 = new Button("Dodaj do koszyka", new Action()
  296. {
  297. public void doAction()
  298. {
  299. Obiekt obiekt = new Obiekt();
  300. obiekt = TablicaWina[5];
  301. Koszyk.add(obiekt);
  302. }
  303.  
  304. });
  305. Button Dodaj6 = new Button("Dodaj do koszyka", new Action()
  306. {
  307. public void doAction()
  308. {
  309. Obiekt obiekt = new Obiekt();
  310. obiekt = TablicaWina[6];
  311. Koszyk.add(obiekt);
  312. }
  313.  
  314. });
  315. Button Dodaj7 = new Button("Dodaj do koszyka", new Action()
  316. {
  317. public void doAction()
  318. {
  319. Obiekt obiekt = new Obiekt();
  320. obiekt = TablicaWina[7];
  321. Koszyk.add(obiekt);
  322. }
  323.  
  324. });
  325.  
  326.  
  327. Button DodajDoKoszkaPiwo1 = new Button("Dodaj do koszyka", new Action()
  328. { public void doAction() {
  329. Obiekt obiekt = new Obiekt();
  330. obiekt = TablicaPiwa[0];
  331. Koszyk.add(obiekt);
  332. }});
  333. Button DodajDoKoszkaPiwo2 = new Button("Dodaj do koszyka", new Action()
  334. { public void doAction() {
  335. Obiekt obiekt = new Obiekt();
  336. obiekt = TablicaPiwa[1];
  337. Koszyk.add(obiekt);
  338. }});
  339. Button DodajDoKoszkaPiwo3 = new Button("Dodaj do koszyka", new Action()
  340. { public void doAction() {
  341. Obiekt obiekt = new Obiekt();
  342. obiekt = TablicaPiwa[2];
  343. Koszyk.add(obiekt);
  344. }});
  345. Button DodajDoKoszkaPiwo4 = new Button("Dodaj do koszyka", new Action()
  346. { public void doAction() {
  347. Obiekt obiekt = new Obiekt();
  348. obiekt = TablicaPiwa[3];
  349. Koszyk.add(obiekt);
  350. }});
  351. Button DodajDoKoszkaPiwo5 = new Button("Dodaj do koszyka", new Action()
  352. { public void doAction() {
  353. Obiekt obiekt = new Obiekt();
  354. obiekt = TablicaPiwa[4];
  355. Koszyk.add(obiekt);
  356. }});
  357. Button DodajDoKoszkaPiwo6 = new Button("Dodaj do koszyka", new Action()
  358. { public void doAction() {
  359. Obiekt obiekt = new Obiekt();
  360. obiekt = TablicaPiwa[5];
  361. Koszyk.add(obiekt);
  362. }});
  363. Button DodajDoKoszkaPiwo7 = new Button("Dodaj do koszyka", new Action()
  364. { public void doAction() {
  365. Obiekt obiekt = new Obiekt();
  366. obiekt = TablicaPiwa[6];
  367. Koszyk.add(obiekt);
  368. }});
  369. Button DodajDoKoszkaPiwo8 = new Button("Dodaj do koszyka", new Action()
  370. { public void doAction() {
  371. Obiekt obiekt = new Obiekt();
  372. obiekt = TablicaPiwa[7];
  373. Koszyk.add(obiekt);
  374. }});
  375.  
  376. ButtonTable[0]=DodajDoKoszkaPiwo1;
  377. ButtonTable[1]=DodajDoKoszkaPiwo2;
  378. ButtonTable[2]=DodajDoKoszkaPiwo3;
  379. ButtonTable[3]=DodajDoKoszkaPiwo4;
  380. ButtonTable[4]=DodajDoKoszkaPiwo5;
  381. ButtonTable[5]=DodajDoKoszkaPiwo6;
  382. ButtonTable[6]=DodajDoKoszkaPiwo7;
  383. ButtonTable[7]=DodajDoKoszkaPiwo8;
  384.  
  385. for(int j=0;j<8;j++){
  386.  
  387. Take = TablicaPiwa[j];
  388. Table piwo = new Table(2);
  389. table.setColumnPaddingSize(5);
  390. Component[] piwocom = new Component[2];
  391. piwocom[0] = new Label(Take.nazwa);
  392. piwocom[1] = new Label(Take.zwroc()+"$");
  393. piwo.addRow(piwocom);
  394.  
  395. Button podstaw = ButtonTable[j];
  396. podstaw.setAlignment(Component.Alignment.LEFT_CENTER);
  397. newPiwo.addComponent(piwo, LinearLayout.GROWS_HORIZONTALLY);
  398. newPiwo.addComponent(podstaw, LinearLayout.GROWS_HORIZONTALLY);
  399. if(j < 7)
  400. newPiwo.addEmptyLine();
  401.  
  402.  
  403. }
  404.  
  405.  
  406. Dodaj.setAlignment(Component.Alignment.LEFT_CENTER);
  407. Dodaj1.setAlignment(Component.Alignment.LEFT_CENTER);
  408. Dodaj2.setAlignment(Component.Alignment.LEFT_CENTER);
  409. Dodaj3.setAlignment(Component.Alignment.LEFT_CENTER);
  410. Dodaj4.setAlignment(Component.Alignment.LEFT_CENTER);
  411. Dodaj5.setAlignment(Component.Alignment.LEFT_CENTER);
  412. Dodaj6.setAlignment(Component.Alignment.LEFT_CENTER);
  413. Dodaj7.setAlignment(Component.Alignment.LEFT_CENTER);
  414.  
  415. Button doWino = new Button("Cofnij", new Action()
  416. {
  417. public void doAction()
  418. {
  419. End.close();
  420. guiScreen.showWindow(newWindow);
  421. }
  422.  
  423. });
  424. Button doMenu = new Button("Cofnij", new Action()
  425. {
  426. public void doAction()
  427. {
  428. End.close();
  429. newWindow.close();
  430. newPiwo.close();
  431. guiScreen.showWindow(window);
  432. }
  433.  
  434. });
  435.  
  436. //wodka
  437. Button DodajDoKoszkaWodke1 = new Button("Dodaj do koszyka", new Action()
  438. { public void doAction() {
  439. Obiekt obiekt = new Obiekt();
  440. obiekt = TablicaWodki[0];
  441. Koszyk.add(obiekt);
  442. }});
  443. Button DodajDoKoszkaWodke2 = new Button("Dodaj do koszyka", new Action()
  444. { public void doAction() {
  445. Obiekt obiekt = new Obiekt();
  446. obiekt = TablicaWodki[1];
  447. Koszyk.add(obiekt);
  448. }});
  449. Button DodajDoKoszkaWodke3 = new Button("Dodaj do koszyka", new Action()
  450. { public void doAction() {
  451. Obiekt obiekt = new Obiekt();
  452. obiekt = TablicaWodki[2];
  453. Koszyk.add(obiekt);
  454. }});
  455. Button DodajDoKoszkaWodke4 = new Button("Dodaj do koszyka", new Action()
  456. { public void doAction() {
  457. Obiekt obiekt = new Obiekt();
  458. obiekt = TablicaWodki[3];
  459. Koszyk.add(obiekt);
  460. }});
  461. Button DodajDoKoszkaWodke5 = new Button("Dodaj do koszyka", new Action()
  462. { public void doAction() {
  463. Obiekt obiekt = new Obiekt();
  464. obiekt = TablicaWodki[4];
  465. Koszyk.add(obiekt);
  466. }});
  467. Button DodajDoKoszkaWodke6 = new Button("Dodaj do koszyka", new Action()
  468. { public void doAction() {
  469. Obiekt obiekt = new Obiekt();
  470. obiekt = TablicaWodki[5];
  471. Koszyk.add(obiekt);
  472. }});
  473. Button DodajDoKoszkaWodke7 = new Button("Dodaj do koszyka", new Action()
  474. { public void doAction() {
  475. Obiekt obiekt = new Obiekt();
  476. obiekt = TablicaWodki[6];
  477. Koszyk.add(obiekt);
  478. }});
  479. Button DodajDoKoszkaWodke8 = new Button("Dodaj do koszyka", new Action()
  480. { public void doAction() {
  481. Obiekt obiekt = new Obiekt();
  482. obiekt = TablicaWodki[7];
  483. Koszyk.add(obiekt);
  484. }});
  485.  
  486. ButtonTable[0]=DodajDoKoszkaWodke1;
  487. ButtonTable[1]=DodajDoKoszkaWodke2;
  488. ButtonTable[2]=DodajDoKoszkaWodke3;
  489. ButtonTable[3]=DodajDoKoszkaWodke4;
  490. ButtonTable[4]=DodajDoKoszkaWodke5;
  491. ButtonTable[5]=DodajDoKoszkaWodke6;
  492. ButtonTable[6]=DodajDoKoszkaWodke7;
  493. ButtonTable[7]=DodajDoKoszkaWodke8;
  494.  
  495. for(int j=0;j<8;j++){
  496.  
  497. Take = TablicaWodki[j];
  498. Table wodka = new Table(2);
  499. table.setColumnPaddingSize(5);
  500. Component[] wodkacom = new Component[2];
  501. wodkacom[0] = new Label(Take.nazwa);
  502. wodkacom[1] = new Label(Take.zwroc()+"$");
  503. wodka.addRow(wodkacom);
  504.  
  505. Button podstaw = ButtonTable[j];
  506. podstaw.setAlignment(Component.Alignment.LEFT_CENTER);
  507. newWodka.addComponent(wodka, LinearLayout.GROWS_HORIZONTALLY);
  508. newWodka.addComponent(podstaw, LinearLayout.GROWS_HORIZONTALLY);
  509. if(j < 7)
  510. newWodka.addEmptyLine();
  511.  
  512.  
  513. }
  514.  
  515.  
  516. //tu
  517.  
  518. Button Koszykk = new Button("Koszyk", new Action()
  519. {
  520. public void doAction()
  521. {
  522. int razem=0;
  523. End.removeAllComponents();
  524. Obiekt Take = new Obiekt();
  525. newWindow.close();
  526.  
  527. for(int j=0;j<Koszyk.size();j++)
  528. {
  529. Take = (Obiekt) Koszyk.get(j);
  530. Table table5 = new Table(2);
  531. table.setColumnPaddingSize(0);
  532. Component[] component4 = new Component[2];
  533. component4[0] = new Label(Take.nazwa);
  534. component4[1] = new Label(Take.zwroc()+"$");
  535. table5.addRow(component4);
  536. End.addComponent(table5, LinearLayout.GROWS_HORIZONTALLY);
  537. razem=Take.cena+razem;
  538.  
  539. }
  540. String koniec = Integer.toString(razem);
  541. Table suma = new Table(2);
  542. table.setColumnPaddingSize(0);
  543. Component[] sumaa = new Component[2];
  544. sumaa[0] = new Label("Suma:");
  545. sumaa[1] = new Label(koniec + "$");
  546. suma.addRow(sumaa);
  547. End.addComponent(suma, LinearLayout.GROWS_HORIZONTALLY);
  548. End.addComponent(doMenu, LinearLayout.GROWS_HORIZONTALLY);
  549. guiScreen.showWindow(End);
  550. }
  551.  
  552. });
  553.  
  554. newPiwo.addComponent(Koszykk, LinearLayout.GROWS_HORIZONTALLY);
  555. newPiwo.addComponent(doMenu, LinearLayout.GROWS_HORIZONTALLY);
  556. newPiwo.addComponent(exit, LinearLayout.GROWS_HORIZONTALLY);
  557.  
  558. newWodka.addComponent(Koszykk, LinearLayout.GROWS_HORIZONTALLY);
  559. newWodka.addComponent(doMenu, LinearLayout.GROWS_HORIZONTALLY);
  560. newWodka.addComponent(exit, LinearLayout.GROWS_HORIZONTALLY);
  561.  
  562.  
  563. button.setAlignment(Component.Alignment.CENTER);
  564. exit.setAlignment(Component.Alignment.BOTTON_CENTER);
  565. window.addEmptyLine();
  566. window.addComponent(new Label(" ___ _ _ _ _____ _____ _ _ _____ _____ \r\n" +
  567. " / | | | | | / / / _ \\ / ___/ | | | | / _ \\ | _ \\ \r\n" +
  568. " / /| | | | | |/ / | | | | | |___ | |_| | | | | | | |_| | \r\n" +
  569. " / / | | | | | |\\ \\ | | | | \\___ \\ | _ | | | | | | ___/ \r\n" +
  570. " / / | | | |___ | | \\ \\ | |_| | ___| | | | | | | |_| | | | \r\n" +
  571. "/_/ |_| |_____| |_| \\_\\ \\_____/ /_____/ |_| |_| \\_____/ |_| "), LinearLayout.GROWS_HORIZONTALLY);
  572. window.addComponent(new Label(" # \r\n" +
  573. " :#: \r\n" +
  574. " : : \r\n" +
  575. " : : {}\r\n" +
  576. ".' '. ||\r\n" +
  577. ":_____: .___. .___. )(\r\n" +
  578. "| | | | | | (-) |__| \r\n" +
  579. "| %% | '. .' '. .' .-'-'-.| | \r\n" +
  580. "| | | | |-...-||% |\r\n" +
  581. "|_____| | | |;:.._||__|\r\n" +
  582. ":_____: -'- -'- `-...-'"), LinearLayout.GROWS_HORIZONTALLY);
  583. window.addEmptyLine();
  584. window.addComponent(button, LinearLayout.GROWS_HORIZONTALLY);
  585. window.addComponent(PokazPiwo, LinearLayout.GROWS_HORIZONTALLY);
  586. window.addComponent(PokazWodke,LinearLayout.GROWS_HORIZONTALLY);
  587. window.addComponent(Koszykk, LinearLayout.GROWS_HORIZONTALLY);
  588. window.addComponent(exit, LinearLayout.GROWS_HORIZONTALLY);
  589.  
  590.  
  591. newWindow.addComponent(table1, LinearLayout.GROWS_HORIZONTALLY);
  592. newWindow.addComponent(Dodaj, LinearLayout.GROWS_HORIZONTALLY);
  593. newWindow.addEmptyLine();
  594.  
  595. newWindow.addComponent(table2, LinearLayout.GROWS_HORIZONTALLY);
  596. newWindow.addComponent(Dodaj1, LinearLayout.GROWS_HORIZONTALLY);
  597. newWindow.addEmptyLine();
  598.  
  599. newWindow.addComponent(table3, LinearLayout.GROWS_HORIZONTALLY);
  600. newWindow.addComponent(Dodaj2, LinearLayout.GROWS_HORIZONTALLY);
  601. newWindow.addEmptyLine();
  602.  
  603. newWindow.addComponent(table4, LinearLayout.GROWS_HORIZONTALLY);
  604. newWindow.addComponent(Dodaj3, LinearLayout.GROWS_HORIZONTALLY);
  605. newWindow.addEmptyLine();
  606.  
  607. newWindow.addComponent(table5, LinearLayout.GROWS_HORIZONTALLY);
  608. newWindow.addComponent(Dodaj4, LinearLayout.GROWS_HORIZONTALLY);
  609. newWindow.addEmptyLine();
  610.  
  611. newWindow.addComponent(table6, LinearLayout.GROWS_HORIZONTALLY);
  612. newWindow.addComponent(Dodaj5, LinearLayout.GROWS_HORIZONTALLY);
  613. newWindow.addEmptyLine();
  614.  
  615. newWindow.addComponent(table7, LinearLayout.GROWS_HORIZONTALLY);
  616. newWindow.addComponent(Dodaj6, LinearLayout.GROWS_HORIZONTALLY);
  617. newWindow.addEmptyLine();
  618.  
  619. newWindow.addComponent(table8, LinearLayout.GROWS_HORIZONTALLY);
  620. newWindow.addComponent(Dodaj7, LinearLayout.GROWS_HORIZONTALLY);
  621.  
  622.  
  623. newWindow.addComponent(Koszykk, LinearLayout.GROWS_HORIZONTALLY);
  624.  
  625. newWindow.addComponent(doMenu, LinearLayout.GROWS_HORIZONTALLY);
  626.  
  627. window.addComponent(new EmptySpace());
  628. newWindow.addComponent(exit , LinearLayout.GROWS_HORIZONTALLY);
  629.  
  630. guiScreen.getScreen().startScreen();
  631. guiScreen.showWindow(window);
  632. guiScreen.getScreen().stopScreen();
  633.  
  634.  
  635. }
  636.  
  637. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement