Package jcurses.widgets

Examples of jcurses.widgets.BorderLayoutManager


    window.show();
  }

  protected void createWindow() {
    window = new BasicWindow();
    manager = new BorderLayoutManager();
    window.getRootPanel().setLayoutManager(manager);
    list.setColors(ColorList.whiteOnBlack);
    window.getRootPanel().setPanelColors(ColorList.whiteOnBlack);

    window.setHandler(this);
View Full Code Here


  private String result;

  public TextDialog(String text, String okText) {
    super(32, 3, true, text);

    BorderLayoutManager manager = new BorderLayoutManager();
    getRootPanel().setLayoutManager(manager);

    field = new TextField(28);

    manager.addWidget(field, BorderLayoutManager.CENTER, WidgetsConstants.ALIGNMENT_CENTER,
        WidgetsConstants.ALIGNMENT_CENTER);

    if (okText != null) {
      Button ok = new Button("Goto");
      ok.addListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          saveAndClose();
        }
      });

      manager.addWidget(ok, BorderLayoutManager.SOUTH, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
    }
  }
View Full Code Here

    window.show();
  }

  protected void createWindow() {
    window = new BasicWindow();
    manager = new BorderLayoutManager();
    window.getRootPanel().setLayoutManager(manager);
    list.setColors(ColorList.whiteOnBlack);
    window.getRootPanel().setPanelColors(ColorList.whiteOnBlack);

    window.setHandler(this);
View Full Code Here

   
    this.setShadow(false);
   
    this.eventList = eventList;

    BorderLayoutManager manager = new BorderLayoutManager();
    getRootPanel().setLayoutManager(manager);

    list = new List(35, false) {

      protected boolean handleInput(InputChar inputChar) {
        boolean result = super.handleInput(inputChar);

        if (Util.wasReturn(inputChar)) {
          if (!items.isEmpty()) {
            int trackedItem = getTrackedItem();

            if (trackedItem >= 0) {
              select(trackedItem);
            }
          }

          EventDialog.this.saveAndClose();
        }

        return result;
      }
    };

    loadEvents(false);

    manager.addWidget(list, BorderLayoutManager.CENTER, WidgetsConstants.ALIGNMENT_CENTER,
        WidgetsConstants.ALIGNMENT_CENTER);

      Button ok = new Button("Load Fully");
      ok.addListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          loadEvents(true);
          EventDialog.this.repaint();
        }
      });

      manager.addWidget(ok, BorderLayoutManager.SOUTH, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
     
      CompletionPanel completionPanel = new CompletionPanel(eventList);
      manager.addWidget(completionPanel, BorderLayoutManager.EAST, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
     
  }
View Full Code Here

  public RequestDialog(RequestIndex eventList) {
    super(80, 40, false, "Event List");

    this.eventList = eventList;

    BorderLayoutManager manager = new BorderLayoutManager();
    getRootPanel().setLayoutManager(manager);

    list = new List(35, false) {
      {
        setSize(new Rectangle(10, 10));
      }

      protected boolean handleInput(InputChar inputChar) {
        boolean result = super.handleInput(inputChar);

        if (Util.wasReturn(inputChar)) {
          select(getTrackedItem());
          RequestDialog.this.saveAndClose();
        }

        return result;
      }
    };
    list.setSelectable(false);

    loadEvents(false);

    manager.addWidget(list, BorderLayoutManager.CENTER, WidgetsConstants.ALIGNMENT_CENTER,
        WidgetsConstants.ALIGNMENT_CENTER);

      Button ok = new Button("Load Fully");
      ok.addListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          loadEvents(true);
          RequestDialog.this.repaint();
        }
      });

      manager.addWidget(ok, BorderLayoutManager.SOUTH, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
     
      CompletionPanel completionPanel = new CompletionPanel(this.eventList);
      manager.addWidget(completionPanel, BorderLayoutManager.EAST, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
  }
View Full Code Here

  public RequestDialog(RequestIndex eventList) {
    super(80, 40, false, "Event List");

    this.eventList = eventList;

    BorderLayoutManager manager = new BorderLayoutManager();
    getRootPanel().setLayoutManager(manager);

    list = new List(35, false) {
      {
        setSize(new Rectangle(10, 10));
      }

      protected boolean handleInput(InputChar inputChar) {
        boolean result = super.handleInput(inputChar);

        if (Util.wasReturn(inputChar)) {
          select(getTrackedItem());
          RequestDialog.this.saveAndClose();
        }

        return result;
      }
    };
    list.setSelectable(false);

    loadEvents(false);

    manager.addWidget(list, BorderLayoutManager.CENTER, WidgetsConstants.ALIGNMENT_CENTER,
        WidgetsConstants.ALIGNMENT_CENTER);

      Button ok = new Button("Load Fully");
      ok.addListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          loadEvents(true);
          RequestDialog.this.repaint();
        }
      });

      manager.addWidget(ok, BorderLayoutManager.SOUTH, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
     
      CompletionPanel completionPanel = new CompletionPanel(this.eventList);
      manager.addWidget(completionPanel, BorderLayoutManager.EAST, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
  }
View Full Code Here

   
    this.setShadow(false);
   
    this.eventList = eventList;

    BorderLayoutManager manager = new BorderLayoutManager();
    getRootPanel().setLayoutManager(manager);

    list = new List(35, false) {

      protected boolean handleInput(InputChar inputChar) {
        boolean result = super.handleInput(inputChar);

        if (Util.wasReturn(inputChar)) {
          if (!items.isEmpty()) {
            int trackedItem = getTrackedItem();

            if (trackedItem >= 0) {
              select(trackedItem);
            }
          }

          EventDialog.this.saveAndClose();
        }

        return result;
      }
    };

    loadEvents(false);

    manager.addWidget(list, BorderLayoutManager.CENTER, WidgetsConstants.ALIGNMENT_CENTER,
        WidgetsConstants.ALIGNMENT_CENTER);

      Button ok = new Button("Load Fully");
      ok.addListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
          loadEvents(true);
          EventDialog.this.repaint();
        }
      });

      manager.addWidget(ok, BorderLayoutManager.SOUTH, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
     
      CompletionPanel completionPanel = new CompletionPanel(eventList);
      manager.addWidget(completionPanel, BorderLayoutManager.EAST, WidgetsConstants.ALIGNMENT_CENTER,
          WidgetsConstants.ALIGNMENT_CENTER);
     
  }
View Full Code Here

TOP

Related Classes of jcurses.widgets.BorderLayoutManager

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.