| | |
| | | |
| | | private boolean forceRefreshWhenOpening; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public JMenuBar getMenuBar() |
| | | { |
| | | if (menuBar == null) |
| | |
| | | return menuBar; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_MANAGE_ENTRIES_TITLE.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public GenericDialog.ButtonType getBrowseButtonType() |
| | | { |
| | | return GenericDialog.ButtonType.CLOSE; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected void createBrowserController(ControlPanelInfo info) |
| | | { |
| | | super.createBrowserController(info); |
| | | entryPane.setController(controller); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void okClicked() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void toBeDisplayed(boolean visible) |
| | | { |
| | | super.toBeDisplayed(visible); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected Component createMainPanel() |
| | | { |
| | | JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); |
| | |
| | | { |
| | | TreeSelectionListener treeSelectionListener = new TreeSelectionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void valueChanged(TreeSelectionEvent ev) |
| | | { |
| | | if (ignoreTreeSelectionEvents) |
| | |
| | | final DragSource dragSource = DragSource.getDefaultDragSource(); |
| | | final DragSourceListener dragSourceListener = new DragSourceListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void dragDropEnd(DragSourceDropEvent dsde) |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void dragEnter(DragSourceDragEvent dsde) |
| | | { |
| | | DragSourceContext context = dsde.getDragSourceContext(); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void dragOver(DragSourceDragEvent dsde) |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void dropActionChanged(DragSourceDragEvent dsde) |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void dragExit(DragSourceEvent dsde) |
| | | { |
| | | } |
| | | }; |
| | | final DragGestureListener dragGestureListener = new DragGestureListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void dragGestureRecognized(DragGestureEvent e) |
| | | { |
| | | //Get the selected node |
| | |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setInfo(ControlPanelInfo info) |
| | | { |
| | | super.setInfo(info); |
| | | entryPane.setInfo(info); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void configurationChanged(ConfigurationChangeEvent ev) |
| | | { |
| | | final ServerDescriptor desc = ev.getNewDescriptor(); |
| | |
| | | INFO_CTRL_PANEL_NEW_USER_MENU.get()); |
| | | popupNewUserMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newUser(); |
| | |
| | | INFO_CTRL_PANEL_NEW_GROUP_MENU.get()); |
| | | popupNewGroupMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newGroup(); |
| | |
| | | INFO_CTRL_PANEL_NEW_ORGANIZATIONAL_UNIT_MENU.get()); |
| | | popupNewOUMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newOrganizationalUnit(); |
| | |
| | | INFO_CTRL_PANEL_NEW_ORGANIZATION_MENU.get()); |
| | | popupNewOrganizationMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newOrganization(); |
| | |
| | | INFO_CTRL_PANEL_NEW_DOMAIN_MENU.get()); |
| | | popupNewDomainMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newDomain(); |
| | |
| | | INFO_CTRL_PANEL_NEW_FROM_LDIF_MENU.get()); |
| | | popupNewEntryFromLDIFMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newEntryFromLDIF(); |
| | |
| | | INFO_CTRL_PANEL_RESET_USER_PASSWORD_MENU.get()); |
| | | popupResetUserPasswordMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | resetUserPassword(); |
| | |
| | | INFO_CTRL_PANEL_ADD_TO_GROUP_MENU.get()); |
| | | popupAddToGroupMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | addToGroup(); |
| | |
| | | INFO_CTRL_PANEL_DUPLICATE_ENTRY_MENU.get()); |
| | | popupDuplicateEntryMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | duplicateEntry(); |
| | |
| | | INFO_CTRL_PANEL_COPY_DN_MENU.get()); |
| | | popupCopyDNMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | copyDN(); |
| | |
| | | INFO_CTRL_PANEL_DELETE_ENTRY_MENU.get()); |
| | | popupDeleteMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | deleteClicked(); |
| | |
| | | { |
| | | ClipboardOwner owner = new ClipboardOwner() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void lostOwnership( Clipboard aClipboard, |
| | | Transferable aContents) { |
| | | //do nothing |
| | |
| | | INFO_CTRL_PANEL_NEW_BROWSER_WINDOW_MENU.get()); |
| | | newWindow.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newWindow(); |
| | |
| | | INFO_CTRL_PANEL_CLOSE_MENU.get()); |
| | | close.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | closeClicked(); |
| | |
| | | { |
| | | private boolean ignoreEvents; |
| | | private JRadioButtonMenuItem lastSelected = menus[0]; |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | if (ignoreEvents) |
| | |
| | | INFO_CTRL_PANEL_NEW_USER_MENU.get()); |
| | | newUserMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newUser(); |
| | |
| | | INFO_CTRL_PANEL_NEW_GROUP_MENU.get()); |
| | | newGroupMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newGroup(); |
| | |
| | | INFO_CTRL_PANEL_NEW_ORGANIZATIONAL_UNIT_MENU.get()); |
| | | newOUMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newOrganizationalUnit(); |
| | |
| | | INFO_CTRL_PANEL_NEW_ORGANIZATION_MENU.get()); |
| | | newOrganizationMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newOrganization(); |
| | |
| | | INFO_CTRL_PANEL_NEW_DOMAIN_MENU.get()); |
| | | newDomainMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newDomain(); |
| | |
| | | INFO_CTRL_PANEL_NEW_FROM_LDIF_MENU.get()); |
| | | newEntryFromLDIFMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newEntryFromLDIF(); |
| | |
| | | INFO_CTRL_PANEL_RESET_USER_PASSWORD_MENU.get()); |
| | | resetPasswordMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | resetUserPassword(); |
| | |
| | | INFO_CTRL_PANEL_ADD_TO_GROUP_MENU.get()); |
| | | addToGroupMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | addToGroup(); |
| | |
| | | INFO_CTRL_PANEL_DUPLICATE_ENTRY_MENU.get()); |
| | | duplicateEntryMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | duplicateEntry(); |
| | |
| | | INFO_CTRL_PANEL_COPY_DN_MENU.get()); |
| | | copyDNMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | copyDN(); |
| | |
| | | INFO_CTRL_PANEL_DELETE_ENTRY_MENU.get()); |
| | | deleteMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | deleteClicked(); |
| | |
| | | INFO_CTRL_PANEL_DELETE_BASE_DN_MENU.get()); |
| | | deleteBaseDNMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | deleteBaseDN(); |
| | |
| | | INFO_CTRL_PANEL_DELETE_BACKEND_MENU.get()); |
| | | deleteBackendMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | deleteBackend(); |