Package com.zaranux.os.client.ui

Examples of com.zaranux.os.client.ui.View


  protected void setWidget(Widget widget, int width, int height ,AsyncCallback<Boolean> callback)
  {

    if(_w != -1) // deserialized
    {
      View view = screen.getView(_v);
      zwindow = new ZWindow(widget,_w, _h, callback);
      view.addWindow(zwindow, _l, _t);
    }else
    {
      View activeView = screen.getActiveView();

      if(zwindow == null)
      {
        zwindow = new ZWindow(widget,width, height, callback);
      }
      int centerX = (activeView.getWidth() - width) / 2;
      int centerY = (activeView.getHeight() - height)/2;
      activeView.addWindow(zwindow, centerX, centerY);
    }
    zwindow.setTitle((title!=null ? title : getProcessName()));

    // else ignore it
  }
View Full Code Here


  Screen()
  {
    Window.enableScrolling(false);
    //setShortKeys();
    View view = new View(0);
    views.add(0, view);
    view.show();
    view.focus();
    //background.setSize("100%", "100%");
  }
View Full Code Here

//    }
//  }
 
  View getActiveView()
  {
    View view =  views.get(activeViewIndex);
    view.focus();
    return view;
  }
View Full Code Here

  void nextView()
  {
    getActiveView().hide();
    if(activeViewIndex ==  views.size()-1) // if last view is active
    {
      views.add(new View(views.get(views.size()-1).getViewNumber()+1));
    }
    activeViewIndex ++;
    getActiveView().show();
  }
View Full Code Here

  void previousView()
  {
    getActiveView().hide();
    if(activeViewIndex == 0)
    {
      views.add(0,new View(views.get(views.size()-1).getViewNumber()-1));     
    }else
    {
      activeViewIndex --;
    }
    getActiveView().show();
View Full Code Here

    {
      int i = 0;
      for(i = 0 ; i <= viewNumber - views.get(0).getViewNumber(); i++)
      {
        if(i>=views.size())
          views.add(new View(views.get(views.size()-1).getViewNumber()+1));
      }
      index = i-1;
    }else
    {
      for(int i = 0; i < views.get(0).getViewNumber() - viewNumber; i ++)
      {
        views.add(0,new View(views.get(0).getViewNumber()-1));
      }
      index = 0;
    }
    return views.get(index);
  }
View Full Code Here

TOP

Related Classes of com.zaranux.os.client.ui.View

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.