Package org.zkoss.zul

Examples of org.zkoss.zul.ListModelList


        return rets;
    }

    private ListModelList makeModel() throws ParseException
    {
        ListModelList dataModel = new ListModelList();
        Date begin = format.parse("2009/01/01 06:00:00");
        for (int i = 0; i < 10; i++)
        {
            TimeplotData pd = new TimeplotData();
            pd.setTime(begin);
            pd.setValue((float) Math.random() * 100);
            dataModel.add(pd);
            begin = new Date(begin.getTime() + 3600000);
        }
        return dataModel;
    }
View Full Code Here


    }

    public ListModelList generateData(Date begin, Date end)
    {
        Date curr = begin;
        ListModelList model = new ListModelList();
        while (curr.before(end))
        {
            TimeplotData data = new TimeplotData();
            // new date reference
            data.setTime(new Date(curr.getTime()));
            Random x = new Random();
            float radomValue = x.nextFloat() * 100;
            radomValue = (radomValue < 20) ? radomValue + 20 : radomValue;
            data.setValue(radomValue);
            model.add(data);
            curr.setTime(curr.getTime() + 15 * 60 * 1000);
        }
        return model;
    }
View Full Code Here

                        return;
                    }
                    Executions.activate(_desktop);
                    try
                    {
                        ListModelList model = (ListModelList) _plot.getDataModel();
                        model.remove(0);
                        TimeplotData pd = new TimeplotData();
                        pd.setTime(new Date());
                        pd.setValue((float) Math.random() * 100);
                        model.add(pd);
                        System.out.println(new Date()+": "+ this.getId());

                    }
                    catch (Exception e)
                    {
View Full Code Here

        }

        private ListModelList makeModel() throws ParseException
        {

            ListModelList dataModel = new ListModelList();
            Date begin = format.parse("2009/01/01 06:00:00");
            for (int i = 0; i < 300; i++)
            {
                TimeplotData pd = new TimeplotData();
                pd.setTime(begin);
                pd.setValue((float) Math.random() * 100);
                dataModel.add(pd);
                begin = new Date(begin.getTime() + 3600000);
            }
            return dataModel;
        }
View Full Code Here

    }

    private void showTimeplot()
    {
        databuff = initDataMode();
        ListModelList dataModel1 = new ListModelList(databuff.get(0));
        ListModelList dataModel2 = new ListModelList(databuff.get(1));
        ListModelList dataModel3 = new ListModelList(databuff.get(2));
        ValueGeometry vg = new DefaultValueGeometry();
        vg.setGridColor("#000000");
        TimeGeometry tg = new DefaultTimeGeometry();
        tg.setGridStep(2 * 60 * 60 * 1000);
        tg.setAxisLabelsPlacement("bottom");
View Full Code Here

      for (int i = 0; i < count; i++) {
        list.add(new SampleBean(label + " " + rand.nextInt(count),
            rand.nextInt(count), cal.getTime()));
        cal.add(Calendar.DAY_OF_MONTH, 1);
      }
      return new ListModelList(list);
    }
View Full Code Here

      for (int i = 0; i < count; i++) {
        list.add(new String[]{label + " " + rand.nextInt(count),
            rand.nextInt(count)+"", df.format(cal.getTime())});
        cal.add(Calendar.DAY_OF_MONTH, 1);
      }
      return new ListModelList(list);
    }
View Full Code Here

            }
           
        });


        ListModelList model = new ListModelList();
        Calendar cal = Calendar.getInstance();
        for (int j = 0; j < 10; j++)
        {

            PlotData data = new PlotData();
            cal.add(Calendar.MINUTE, j);
            data.setTime(cal.getTime());

            float i = 0.0f;
 
            i=(float) (1.0-0.42);
            System.out.println(1.0-0.42);
            System.out.println("i:"+i);
            data.setValue(i);
            model.add(data);
        }

        plot1.setDataModel(model);
        plot1.setDotColor("#000000");
        plot1.setFillColor("#70A8E5");// E2F6F2
View Full Code Here

            }
           
        });


        ListModelList model = new ListModelList();
        Calendar cal = Calendar.getInstance();
        for (int j = 0; j < 10; j++)
        {

            PlotData data = new PlotData();
            cal.add(Calendar.MINUTE, j);
            data.setTime(cal.getTime());

            float i = 0.0f;
 
            i=(float) (1.0-0.42);
//            System.out.println(1.0-0.42);
//            System.out.println("i:"+i);
            data.setValue(i);
            model.add(data);
        }

        plot1.setDataModel(model);
        plot1.setDotColor("#000000");
        plot1.setFillColor("#70A8E5");// E2F6F2
View Full Code Here

 
         plot1.setRoundValues(false);
         plot1.setLineColor("#0067AB");// 729692
         plot1.setFillColor("#70A8E5");// E2F6F2
         plot1.setShowValues(true);
        ListModelList model = new ListModelList();
        Calendar cal = Calendar.getInstance();
        for (int j = 0; j < 10; j++)
        {

            PlotData data = new PlotData();
            cal.add(Calendar.MINUTE, j);
            data.setTime(cal.getTime());

            float i = 0.0f;
 
            i=(float) (1.0-0.42);
            System.out.println(1.0-0.42);
            System.out.println("i:"+i);
            data.setValue(i);
            model.add(data);
        }

        plot1.setDataModel(model);
        plot1.setDotColor("#000000");
        plot1.setFillColor("#70A8E5");// E2F6F2
View Full Code Here

TOP

Related Classes of org.zkoss.zul.ListModelList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.