daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Nov 9th, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.zh.szf;
  2.  
  3. import com.badlogic.gdx.utils.ObjectMap;
  4. import com.zh.szf.data.DataFrame;
  5. import com.zh.szf.data.XLSFile;
  6. import com.zh.szf.gui.Button;
  7. import com.zh.szf.gui.DataView;
  8. import com.zh.szf.gui.Signal;
  9. import com.zh.szf.system.Input;
  10. import com.zh.szf.system.Renderer;
  11.  
  12. import java.util.HashSet;
  13.  
  14. public class Stage {
  15.  
  16.     private Button button;
  17.     private DataFrame dataFrame;
  18.     private DataView dataView;
  19.  
  20.     private double sum;
  21.     private double avg;
  22.     private ObjectMap<String, Integer> counts;
  23.  
  24.     public Stage() {
  25.         button = new Button(5, 5, 300, 40, "Szöveg");
  26.         dataFrame = new DataFrame(new XLSFile("files/titanic3.xls"));
  27.         dataView = new DataView(5, 60, dataFrame, null, 25);
  28.         dataView.setRowLimits(0, 9);
  29.         HashSet<String> columnFilter = new HashSet<>();
  30.         columnFilter.add("sex");
  31.         columnFilter.add("boat");
  32.         columnFilter.add("fare");
  33.         columnFilter.add("embarked");
  34.         dataView.setColumnFilter(columnFilter);
  35.     }
  36.  
  37.     public void draw(Renderer renderer) {
  38.         button.draw(renderer);
  39.         dataView.draw(renderer);
  40.     }
  41.  
  42.     public void update(Input input) {
  43.         button.update(input);
  44.         dataView.update(input);
  45.  
  46.         if (button.consumeSignal() != Signal.NULL) {
  47.             System.out.println("Button pressed!");
  48.         }
  49.     }
  50.  
  51. }
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