private void moveUpAndDownPage(boolean _up) {
   int index = tabbedPanel.getSelectedIndex();
   if (index < 0) return;
   Editor page = pageList.get(index);
   if (page == null) return;
   if (_up) {
     if (index == 0) return;
     pageList.removeElementAt(index);
     pageList.insertElementAt(page, index - 1);
     tabbedPanel.removeTabAt(index);
     tabbedPanel.insertTab(
         page.isActive() ? page.getName() : page.getName() + " (D)",
         null,
         page.getComponent(),
         tooltip,
         index - 1);
   } else {
     if (index == (pageList.size() - 1)) return;
     pageList.removeElementAt(index);
     pageList.insertElementAt(page, index + 1);
     tabbedPanel.removeTabAt(index);
     tabbedPanel.insertTab(
         page.isActive() ? page.getName() : page.getName() + " (D)",
         null,
         page.getComponent(),
         tooltip,
         index + 1);
   }
   tabbedPanel.setSelectedComponent(page.getComponent());
   changed = true;
 }
 protected void removeCurrentPage() {
   int index = tabbedPanel.getSelectedIndex();
   if (index < 0) return;
   tabbedPanel.removeTabAt(index);
   pageList.removeElementAt(index);
   updatePageCounterField(pageList.size());
   changed = true;
   if (tabbedPanel.getTabCount() <= 0) cardLayout.show(finalPanel, "FirstPanel");
   ejs.getModelEditor().getVariablesEditor().updateControlValues(false);
 }
 private void initAccess() {
   // hide repository popup if necessary
   if (!Users.doesCurrentUserHaveAccess(Users.ACCESS_CLASS_PROJECT_MANAGER)) {
     tabbedPane.removeTabAt(2);
   }
   // if user is not at least advanced data entry set the record to read only
   if (!Users.doesCurrentUserHaveAccess(Users.ACCESS_CLASS_ADVANCED_DATA_ENTRY)) {
     setFormToReadOnly();
     this.getAddNonPreferredNameButton().setVisible(false);
     this.getRemoveNonPreferredNameButton().setVisible(false);
     nameDescriptionType.setEnabled(false);
   }
 }