daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Nov 9th, 2018 74 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. package com.zh.szf;
  2.  
  3. import com.zh.szf.data.DataFrame;
  4. import com.zh.szf.data.XLSFile;
  5. import com.zh.szf.gui.Button;
  6. import com.zh.szf.gui.DataView;
  7. import com.zh.szf.gui.Signal;
  8. import com.zh.szf.system.Input;
  9. import com.zh.szf.system.Renderer;
  10.  
  11. import java.util.HashSet;
  12.  
  13. public class Stage {
  14.  
  15.     private Button button;
  16.     private DataFrame dataFrame;
  17.     private DataView dataView;
  18.  
  19.     public Stage() {
  20.         button = new Button(5, 5, 300, 40, "Szöveg");
  21.         dataFrame = new DataFrame(new XLSFile("files/titanic3.xls"));
  22.         dataView = new DataView(5, 60, dataFrame, null, 25);
  23.         dataView.setRowLimits(0, 9);
  24.         HashSet<String> columnFilter = new HashSet<>();
  25.         columnFilter.add("sex");
  26.         columnFilter.add("boat");
  27.         columnFilter.add("fare");
  28.         columnFilter.add("embarked");
  29.         dataView.setColumnFilter(columnFilter);
  30.     }
  31.  
  32.     public void draw(Renderer renderer) {
  33.         button.draw(renderer);
  34.         dataView.draw(renderer);
  35.     }
  36.  
  37.     public void update(Input input) {
  38.         button.update(input);
  39.         dataView.update(input);
  40.  
  41.         if (button.consumeSignal() != Signal.NULL) {
  42.             System.out.println("Button pressed!");
  43.         }
  44.     }
  45.  
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top