Example #1
0
 public void setFont(Font font) {
   super.setFont(font);
   this.font = font;
   text.setFont(font);
   if (icon != null) icon.setFont(font);
   list.setFont(font);
   internalLayout(true);
 }
Example #2
0
  void createPopup(String[] items, int selectionIndex) {
    // create shell and list
    popup = new AlphaDialog(getShell(), SWT.NO_TRIM | SWT.ON_TOP | SWT.BORDER);
    popup.setBackgroundMode(SWT.INHERIT_DEFAULT);
    Color borderColor = ColorCache.getInstance().getColor(200, 200, 200);
    popup.setBackground(borderColor);

    GridLayout gridLayout = new GridLayout(2, false);
    gridLayout.marginHeight = 0;
    gridLayout.marginBottom = 1;
    gridLayout.marginTop = 0;
    gridLayout.marginLeft = 0;
    gridLayout.marginRight = 0;

    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    gridLayout.marginWidth = 0;
    popup.getPopup().setLayout(gridLayout);

    int style = getStyle();
    int listStyle = SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER;
    if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;
    if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;
    if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;
    list = new List(popup.getPopup(), listStyle);
    GridData gridData = new GridData(GridData.FILL_BOTH);
    gridData.horizontalSpan = 2;
    list.setLayoutData(gridData);
    list.addMouseListener(
        new MouseAdapter() {
          public void mouseDown(MouseEvent e) {
            if (e.button == 3) {
              text.getMenu().setVisible(true);
            }
            if (list.isFocusControl()) return;
            text.forceFocus();
            list.setFocus();
          }
        });

    if (font != null) list.setFont(font);
    if (foreground != null) list.setForeground(foreground);
    if (background != null) list.setBackground(background);

    int[] popupEvents = {SWT.Close, SWT.Paint, SWT.Deactivate};
    for (int i = 0; i < popupEvents.length; i++)
      popup.getPopup().addListener(popupEvents[i], listener);
    int[] listEvents = {
      SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.Dispose
    };
    for (int i = 0; i < listEvents.length; i++) list.addListener(listEvents[i], listener);

    if (items != null) list.setItems(items);
    if (selectionIndex != -1) list.setSelection(selectionIndex);
  }
 /**
  * Returns this field editor's list control.
  *
  * @param parent the parent control
  * @return the list control
  */
 public List getListControl(Composite parent) {
   if (list == null) {
     list = new List(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
     list.setFont(parent.getFont());
     list.addSelectionListener(getSelectionListener());
     list.addDisposeListener(
         new DisposeListener() {
           public void widgetDisposed(DisposeEvent event) {
             list = null;
           }
         });
   } else {
     checkParent(list, parent);
   }
   return list;
 }
Example #4
0
  @Override
  protected Control createDialogArea(Composite parent) {
    Composite comp = new Composite(parent, SWT.NULL);
    comp.setFont(parent.getFont());
    comp.setLayout(new GridLayout(1, true));
    comp.setLayoutData(new GridData(GridData.FILL_BOTH));

    // Create the converters list group area
    final Group convertersListGroup = new Group(comp, SWT.NONE);
    convertersListGroup.setFont(parent.getFont());
    convertersListGroup.setText(Messages.ProjectConvert_convertersList);
    convertersListGroup.setLayout(new GridLayout(1, false));
    convertersListGroup.setLayoutData(new GridData(GridData.FILL_BOTH));

    // Create the current config List
    convertersList =
        new org.eclipse.swt.widgets.List(
            convertersListGroup, SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
    convertersList.setFont(convertersListGroup.getFont());
    GridData data = new GridData(GridData.FILL_BOTH);
    convertersList.setLayoutData(data);
    convertersList.addDisposeListener(
        new DisposeListener() {
          @Override
          public void widgetDisposed(DisposeEvent event) {
            convertersList = null;
          }
        });
    convertersList.addListener(
        SWT.Selection,
        new Listener() {
          @Override
          public void handleEvent(Event e) {
            validateState();
          }
        });
    Object[] objs = getConversionElements().keySet().toArray();
    String[] names = new String[objs.length];
    for (int i = 0; i < objs.length; i++) {
      Object object = objs[i];
      names[i] = (String) object;
    }
    convertersList.setItems(names);
    validateState();
    return comp;
  }
  public SegmentsForReviewList(Composite parent, int style, Player player, int lastScrn) {
    super(parent, style);

    this.lastScreen = lastScrn;

    Label lblSegmentsList = new Label(this, SWT.BORDER);
    lblSegmentsList.setText("Segments List");
    lblSegmentsList.setFont(SWTResourceManager.getFont("Segoe UI", 14, SWT.BOLD));
    lblSegmentsList.setAlignment(SWT.CENTER);
    lblSegmentsList.setBounds(10, 10, 194, 30);

    Button backBtn = new Button(this, SWT.NONE);
    backBtn.setImage(
        SWTResourceManager.getImage(SegmentsForReviewList.class, "/codereview/assets/back.png"));
    backBtn.setBounds(210, 13, 25, 25);
    backBtn.addListener(
        SWT.Selection,
        new Listener() {

          @Override
          public void handleEvent(Event arg0) {
            setVisible(false);
            if (lastScreen == Cons.MAIN_MENU_SCREEN) {
              MainScreen.initializeMainMenu();
            } else if (lastScreen == Cons.CREATOR_MODE_SCREEN) {
              MainScreen.initializeCreatorScreen();
            }
          }
        });

    Label explainLbl = new Label(this, SWT.NONE);
    explainLbl.setBounds(10, 46, 225, 55);
    explainLbl.setText("Explaination about what to do...");

    segments = null;
    String[] items = null;
    try {
      segments = MainScreen.handler.getSegmentsForReviewByPlayer(player);
    } catch (Exception e) {
      e.printStackTrace();
    }
    list = new List(this, SWT.BORDER | SWT.V_SCROLL);
    list.setFont(SWTResourceManager.getFont("Segoe UI", 10, SWT.NORMAL));
    list.setBounds(10, 107, 225, 251);
    if (segments == null) {
      explainLbl.setText("Error loading data...");
    } else if (segments.length == 0) {
      explainLbl.setText("No new segments to review...");
    } else {
      items = new String[segments.length];
      for (int i = 0; i < segments.length; i++) {
        items[i] = segments[i].getCode();
      }

      list.setItems(items);
      list.addListener(
          SWT.MouseDoubleClick,
          new Listener() {

            @Override
            public void handleEvent(Event arg0) {
              int[] selected = list.getSelectionIndices();
              setVisible(false);
              MainScreen.initializeReviewerScreen(segments[selected[0]]);
            }
          });
    }
  }
Example #6
0
  void initWidgets() {
    GlobalConfWinLab = new Label(MainShell, SWT.NORMAL | SWT.CENTER);
    GlobalUsersGroup = new Group(MainShell, SWT.NONE);
    GlobalOutWin = new Text(MainShell, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);

    GlobalUsersList = new List(GlobalUsersGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);

    GlobalInpWinLab = new Label(MainShell, SWT.NORMAL | SWT.CENTER);
    GlobalInpWin = new Text(MainShell, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
    GlobalSendBut = new Button(MainShell, SWT.PUSH);
    GlobalClearBut = new Button(MainShell, SWT.PUSH);

    GlobalMainMenu = new Menu(MainShell, SWT.BAR);
    GlobalOptionsMenu = new Menu(MainShell, SWT.DROP_DOWN);
    GlobalSettingsMenu = new Menu(MainShell, SWT.DROP_DOWN);
    GlobalProfileMenu = new Menu(MainShell, SWT.DROP_DOWN);

    GlobalProfileItem = new MenuItem(GlobalSettingsMenu, SWT.CASCADE);
    GlobalOptionsItem = new MenuItem(GlobalMainMenu, SWT.CASCADE);

    GlobalOptionsItem.setMenu(GlobalOptionsMenu);
    GlobalSettingsItem = new MenuItem(GlobalMainMenu, SWT.CASCADE);
    GlobalSettingsItem.setMenu(GlobalSettingsMenu);
    GlobalProfileItem.setMenu(GlobalProfileMenu);
    GlobalExitItem = new MenuItem(GlobalOptionsMenu, SWT.CASCADE);
    GlobalConnectionItem = new MenuItem(GlobalSettingsMenu, SWT.CASCADE);
    GlobalUserNameItem = new MenuItem(GlobalSettingsMenu, SWT.CASCADE);
    GlobalAboutItem = new MenuItem(GlobalMainMenu, SWT.CASCADE);
    GlobalServerItem = new MenuItem(GlobalProfileMenu, SWT.RADIO);
    GlobalClientItem = new MenuItem(GlobalProfileMenu, SWT.RADIO);

    GlobalConfWinLab.setText("Conference window:");
    GlobalOutWin.setText("");
    GlobalInpWinLab.setText("Input Window:");
    GlobalInpWin.setText("");
    GlobalSendBut.setText("Send");
    GlobalClearBut.setText("Clear");
    GlobalOptionsItem.setText("Options");
    GlobalSettingsItem.setText("Settings");
    GlobalProfileItem.setText("Profile");
    GlobalExitItem.setText("Exit");
    GlobalConnectionItem.setText("Connection");
    GlobalUserNameItem.setText("User");
    GlobalAboutItem.setText("About");
    GlobalServerItem.setText("Server");
    GlobalClientItem.setText("Client");
    GlobalUsersGroup.setText("Online Users");

    GlobalOutWin.setFont(Calibri);
    GlobalInpWin.setFont(Calibri);
    GlobalSendBut.setFont(Calibri);
    GlobalClearBut.setFont(Calibri);
    GlobalUsersGroup.setFont(Calibri);
    GlobalUsersList.setFont(Calibri);
    GlobalConfWinLab.setFont(Calibri);
    GlobalInpWinLab.setFont(Calibri);

    GlobalOutWin.setBackground(White);
    GlobalInpWin.setBackground(White);

    GlobalConfWinLab.setLayoutData(
        new GridData(SWT.CENTER | SWT.FILL, SWT.CENTER | SWT.FILL, true, true, 2, 1));
    GlobalOutWin.setLayoutData(
        new GridData(SWT.CENTER | SWT.FILL, SWT.CENTER | SWT.FILL, true, true, 2, 1));
    ((GridData) GlobalOutWin.getLayoutData()).widthHint = 300;
    ((GridData) GlobalOutWin.getLayoutData()).heightHint = 200;

    GlobalInpWinLab.setLayoutData(
        new GridData(SWT.CENTER | SWT.FILL, SWT.CENTER | SWT.FILL, true, true, 2, 1));
    GlobalInpWin.setLayoutData(
        new GridData(SWT.CENTER | SWT.FILL, SWT.CENTER | SWT.FILL, true, true, 1, 2));
    ((GridData) GlobalInpWin.getLayoutData()).widthHint = 250;
    ((GridData) GlobalInpWin.getLayoutData()).heightHint = 100;
    GlobalSendBut.setLayoutData(
        new GridData(SWT.CENTER | SWT.FILL, SWT.CENTER | SWT.FILL, true, true, 1, 1));
    ((GridData) GlobalSendBut.getLayoutData()).widthHint = 50;
    ((GridData) GlobalSendBut.getLayoutData()).heightHint = 30;
    GlobalClearBut.setLayoutData(
        new GridData(SWT.CENTER | SWT.FILL, SWT.CENTER | SWT.FILL, true, true, 1, 1));
    ((GridData) GlobalClearBut.getLayoutData()).widthHint = 50;
    ((GridData) GlobalClearBut.getLayoutData()).heightHint = 30;
    GlobalUsersGroup.setLayoutData(new GridData(SWT.CENTER | SWT.FILL, SWT.FILL, true, true, 1, 5));
    ((GridData) GlobalUsersGroup.getLayoutData()).widthHint = 150;
    ((GridData) GlobalUsersGroup.getLayoutData()).heightHint = 300;

    GlobalUsersGroup.setLayout(new GridLayout(2, false));

    GlobalUsersList.setLayoutData(new GridData(GridData.FILL_BOTH));
    ((GridData) GlobalUsersList.getLayoutData()).widthHint = 150;
    ((GridData) GlobalUsersList.getLayoutData()).heightHint = 300;

    GlobalOutWin.setEditable(false);

    GlobalInpWin.setFocus();

    if (UserProfile == JTC.SERVER) GlobalServerItem.setSelection(true);
    else GlobalClientItem.setSelection(true);
  }
  /**
   * Create the shell.
   *
   * @param display
   */
  public AdministratorShell(Display display) {
    super(display, SWT.SHELL_TRIM);
    setImage(
        SWTResourceManager.getImage(AdministratorShell.class, "/com/hms/icon/hms-admin-icon.png"));

    Group grpNgiSDng = new Group(this, SWT.NONE);
    grpNgiSDng.setText(Messages.getString("HMS.AdministratorShell.group.user"));
    grpNgiSDng.setBounds(10, 10, 216, 319);

    List list = new List(grpNgiSDng, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    list.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.NORMAL));
    list.setItems(
        new String[] {
          "Nguyễn Văn A0",
          "Nguyễn Văn B0",
          "Nguyễn Văn C0",
          "Nguyễn Văn A",
          "Nguyễn Văn B",
          "Nguyễn Văn C",
          "Nguyễn Văn A",
          "Nguyễn Văn B",
          "Nguyễn Văn C",
          "Nguyễn Văn A",
          "Nguyễn Văn B",
          "Nguyễn Văn C",
          "Nguyễn Văn A",
          "Nguyễn Văn B",
          "Nguyễn Văn C1",
          "Nguyễn Văn A1",
          "Nguyễn Văn B2",
          "Nguyễn Văn C2"
        });
    list.setBounds(10, 20, 196, 289);

    Group grpThngTinNgi = new Group(this, SWT.NONE);
    grpThngTinNgi.setText(Messages.getString("HMS.AdministratorShell.group.user_info"));
    grpThngTinNgi.setBounds(232, 10, 650, 213);

    Label lblTnngNhp = new Label(grpThngTinNgi, SWT.NONE);
    lblTnngNhp.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblTnngNhp.setBounds(10, 33, 136, 21);
    lblTnngNhp.setText(Messages.getString("HMS.AdministratorShell.group.user_info.label.username"));

    text = new Text(grpThngTinNgi, SWT.BORDER);
    text.addFocusListener(
        new FocusAdapter() {
          @Override
          public void focusGained(FocusEvent e) {
            text.selectAll();
          }
        });
    text.setBounds(152, 33, 251, 21);
    text.setFocus();
    text.setTopIndex(0);

    Label lblMtKhu = new Label(grpThngTinNgi, SWT.NONE);
    lblMtKhu.setText(Messages.getString("HMS.AdministratorShell.group.user_info.label.password"));
    lblMtKhu.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblMtKhu.setBounds(10, 60, 136, 21);

    text_1 = new Text(grpThngTinNgi, SWT.BORDER | SWT.PASSWORD);
    text_1.setBounds(152, 60, 251, 21);
    text_1.setTopIndex(1);

    Label lblXcNhnMt = new Label(grpThngTinNgi, SWT.NONE);
    lblXcNhnMt.setText(
        Messages.getString("HMS.AdministratorShell.group.user_info.label.confirm_password"));
    lblXcNhnMt.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblXcNhnMt.setBounds(10, 87, 136, 21);

    text_2 = new Text(grpThngTinNgi, SWT.BORDER | SWT.PASSWORD);
    text_2.setBounds(152, 87, 251, 21);
    text_2.setTopIndex(2);

    Label label = new Label(grpThngTinNgi, SWT.SEPARATOR | SWT.HORIZONTAL);
    label.setBounds(0, 114, 650, 2);

    Label lblTny = new Label(grpThngTinNgi, SWT.NONE);
    lblTny.setText(Messages.getString("HMS.AdministratorShell.group.user_info.label.fullname"));
    lblTny.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblTny.setBounds(10, 122, 136, 21);

    text_3 = new Text(grpThngTinNgi, SWT.BORDER);
    text_3.setBounds(152, 122, 251, 21);
    text_3.setTopIndex(3);

    Label lblEmail = new Label(grpThngTinNgi, SWT.NONE);
    lblEmail.setText(Messages.getString("HMS.AdministratorShell.group.user_info.label.email"));
    lblEmail.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblEmail.setBounds(10, 149, 136, 21);

    text_4 = new Text(grpThngTinNgi, SWT.BORDER);
    text_4.setBounds(152, 149, 251, 21);
    text_4.setTopIndex(4);

    Label lblHnhnh = new Label(grpThngTinNgi, SWT.NONE);
    lblHnhnh.setText(Messages.getString("HMS.AdministratorShell.group.user_info.label.picture"));
    lblHnhnh.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblHnhnh.setBounds(10, 176, 136, 21);

    text_5 = new Text(grpThngTinNgi, SWT.BORDER);
    text_5.setBounds(152, 176, 251, 21);
    text_5.setTopIndex(5);

    Group grpQuynSDng = new Group(this, SWT.NONE);
    grpQuynSDng.setText(Messages.getString("HMS.AdministratorShell.group.user_privileges"));
    grpQuynSDng.setBounds(232, 229, 650, 370);

    Label lblNhmChcNng = new Label(grpQuynSDng, SWT.NONE);
    lblNhmChcNng.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblNhmChcNng.setBounds(10, 27, 120, 21);
    lblNhmChcNng.setText(
        Messages.getString("HMS.AdministratorShell.group.user_privileges.label.group_function"));

    final List list_1 = new List(grpQuynSDng, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    list_1.setTopIndex(6);

    final java.util.List<LinkedList<String>> list_2_model = new LinkedList<LinkedList<String>>();
    LinkedList<String> tempList = new LinkedList<String>();
    tempList.add("Sử dụng CN 1");
    tempList.add("Thêm CN 1");
    tempList.add("Xóa CN 1");

    list_2_model.add(tempList);

    tempList = new LinkedList<String>();
    tempList.add("Thêm CN 2");
    tempList.add("Xóa CN 2");

    list_2_model.add(tempList);

    final java.util.List<LinkedList<String>> list_3_model = new LinkedList<LinkedList<String>>();
    list_3_model.add(new LinkedList<String>());
    list_3_model.add(new LinkedList<String>());

    final List list_2 = new List(grpQuynSDng, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
    list_2.setTopIndex(7);
    final List list_3 = new List(grpQuynSDng, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
    list_3.setTopIndex(12);

    list_1.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            List list = (List) e.widget;
            int[] selectedItems = list.getSelectionIndices();
            list_2.removeAll();
            list_3.removeAll();

            if (selectedItems.length == 1) {
              switch (selectedItems[0]) {
                case 0:
                  for (String item : list_2_model.get(0)) {
                    list_2.add(item);
                  }

                  for (String item : list_3_model.get(0)) {
                    list_3.add(item);
                  }

                  break;
                case 1:
                  for (String item : list_2_model.get(1)) {
                    list_2.add(item);
                  }

                  for (String item : list_3_model.get(1)) {
                    list_3.add(item);
                  }

                  break;
              }
            }
          }
        });
    list_1.setItems(new String[] {"Chức năng 1", "Chức năng 2"});
    list_1.setBounds(10, 54, 178, 306);

    Label label_2 = new Label(grpQuynSDng, SWT.SEPARATOR | SWT.VERTICAL);
    label_2.setBounds(204, 10, 2, 357);

    Label lblCcQuynSn = new Label(grpQuynSDng, SWT.NONE);
    lblCcQuynSn.setText(
        Messages.getString("HMS.AdministratorShell.group.user_privileges.label.privileges"));
    lblCcQuynSn.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblCcQuynSn.setBounds(220, 27, 120, 21);

    list_2.setBounds(220, 54, 178, 306);

    Label lblCcQuync = new Label(grpQuynSDng, SWT.NONE);
    lblCcQuync.setText(
        Messages.getString("HMS.AdministratorShell.group.user_privileges.label.used_privileges"));
    lblCcQuync.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    lblCcQuync.setBounds(462, 27, 165, 21);

    Button button = new Button(grpQuynSDng, SWT.NONE);
    button.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            LinkedList<String> temp = new LinkedList<String>();

            for (int selectedIndex : list_2.getSelectionIndices()) {
              list_3_model.get(list_1.getSelectionIndex()).add(list_2.getItem(selectedIndex));
              list_3.add(list_2.getItem(selectedIndex));

              temp.add(list_2_model.get(list_1.getSelectionIndex()).get(selectedIndex));
            }

            // Set selected items on destination list
            list_3.setSelection(
                list_3.getItemCount() - list_2.getSelectionCount(), list_3.getItemCount());

            // Remove on source list
            list_2.remove(list_2.getSelectionIndices());

            for (String removedItem : temp) {
              list_2_model.get(list_1.getSelectionIndex()).remove(removedItem);
            }
          }
        });
    button.setText(">");
    button.setBounds(411, 125, 37, 30);

    Button button_1 = new Button(grpQuynSDng, SWT.NONE);
    button_1.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            LinkedList<String> temp = new LinkedList<String>();

            for (int selectedIndex : list_3.getSelectionIndices()) {
              list_2_model.get(list_1.getSelectionIndex()).add(list_3.getItem(selectedIndex));
              list_2.add(list_3.getItem(selectedIndex));

              temp.add(list_3_model.get(list_1.getSelectionIndex()).get(selectedIndex));
            }

            // Set selected items on destination list
            list_2.setSelection(
                list_2.getItemCount() - list_3.getSelectionCount(), list_2.getItemCount());

            // Remove on source list
            list_3.remove(list_3.getSelectionIndices());

            for (String removedItem : temp) {
              list_3_model.get(list_1.getSelectionIndex()).remove(removedItem);
            }
          }
        });
    button_1.setText("<");
    button_1.setBounds(411, 170, 37, 30);

    Button button_2 = new Button(grpQuynSDng, SWT.NONE);
    button_2.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            for (int i = 0; i < list_2.getItemCount(); i++) {
              list_3_model.get(list_1.getSelectionIndex()).add(list_2.getItem(i));
              list_3.add(list_2.getItem(i));
            }

            // Select all items of destination list
            list_3.selectAll();

            // Remove source list
            list_2.removeAll();
            list_2_model.get(list_1.getSelectionIndex()).clear();
          }
        });
    button_2.setText(">>");
    button_2.setBounds(411, 215, 37, 30);

    Button button_3 = new Button(grpQuynSDng, SWT.NONE);
    button_3.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            for (int i = 0; i < list_3.getItemCount(); i++) {
              list_2_model.get(list_1.getSelectionIndex()).add(list_3.getItem(i));
              list_2.add(list_3.getItem(i));
            }

            // Select all items of destination list
            list_2.selectAll();

            // Remove source list
            list_3.removeAll();
            list_3_model.get(list_1.getSelectionIndex()).clear();
          }
        });
    button_3.setToolTipText("");
    button_3.setText("<<");
    button_3.setBounds(411, 260, 37, 30);

    list_3.setBounds(462, 54, 178, 306);

    Composite composite = new Composite(this, SWT.BORDER);
    composite.setBounds(232, 605, 650, 55);

    Button btnLu = new Button(composite, SWT.NONE);
    btnLu.setImage(
        SWTResourceManager.getImage(AdministratorShell.class, "/com/hms/icon/hms-save-icon.png"));
    btnLu.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    btnLu.setText(Messages.getString("HMS.AdministratorShell.button.save"));
    btnLu.setBounds(350, 10, 110, 30);

    Button btnHy = new Button(composite, SWT.NONE);
    btnHy.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            dispose();
          }
        });
    btnHy.setImage(
        SWTResourceManager.getImage(AdministratorShell.class, "/com/hms/icon/hms-cancel-icon.png"));
    btnHy.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    btnHy.setBounds(500, 10, 110, 30);
    btnHy.setText(Messages.getString("HMS.AdministratorShell.button.cancel"));

    Button btnThmMi = new Button(composite, SWT.NONE);
    btnThmMi.setImage(
        SWTResourceManager.getImage(AdministratorShell.class, "/com/hms/icon/hms-add-icon.png"));
    btnThmMi.setEnabled(false);
    btnThmMi.setFont(SWTResourceManager.getFont("Times New Roman", 12, SWT.BOLD));
    btnThmMi.setText(Messages.getString("HMS.AdministratorShell.button.add"));
    btnThmMi.setBounds(200, 10, 110, 30);
    createContents();
  }