@Override
  public void close() {
    Display display = getDisplay();
    display.getContainerMouseListeners().remove(displayMouseHandler);

    super.close();
  }
  @Override
  public void open(Display display, Window owner) {
    if (tableView == null) {
      throw new IllegalStateException();
    }

    super.open(display, owner);
    display.getContainerMouseListeners().add(displayMouseHandler);
  }
예제 #3
0
  public void startup(Display display, Map<String, String> props) throws Exception {
    spring = new ClassPathXmlApplicationContext("spring-application-context.xml");
    mcqDao = spring.getBean(MultipleChoiceQuestionDao.class);
    BXMLSerializer bxmlSerializer = new BXMLSerializer();
    window = (Window) bxmlSerializer.readObject(PicturesAdminApp.class, "PicturesAdminApp.bxml");
    window.open(display);
    // questionsList.setListData((List<?>) mcqDao.findAll());
    /*		window = new Window();

    Label label = new Label();
    label.setText("Hello World!");
    label.getStyles().put("font", new Font("Arial", Font.BOLD, 24));
    label.getStyles().put("color", Color.RED);
    label.getStyles().put("horizontalAlignment",   HorizontalAlignment.CENTER);
    label.getStyles().put("verticalAlignment",
        VerticalAlignment.CENTER);

    window.setContent(label);
    window.setTitle("Hello World!");
    window.setMaximized(true);

    window.open(display);*/
  }
예제 #4
0
 public boolean shutdown(boolean arg0) throws Exception {
   if (window != null) {
     window.close();
   }
   return false;
 }