| | |
| | | createLayout(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean requiresBorder() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean requiresScroll() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void toBeDisplayed(boolean visible) |
| | | { |
| | | super.toBeDisplayed(visible); |
| | |
| | | backends.setModel(new DefaultComboBoxModel(new String[]{})); |
| | | ItemListener comboListener = new ItemListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void itemStateChanged(ItemEvent ev) |
| | | { |
| | | if (!ignoreSelectionEvents && |
| | |
| | | newIndex.setOpaque(false); |
| | | newIndex.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newIndexClicked(); |
| | |
| | | newVLVIndex.setOpaque(false); |
| | | newVLVIndex.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newVLVIndexClicked(); |
| | |
| | | add(createSplitPane(), gbc); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_MANAGE_INDEXES_TITLE.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Component getPreferredFocusComponent() |
| | | { |
| | | return backends; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void closeClicked() |
| | | { |
| | | super.closeClicked(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void okClicked() |
| | | { |
| | | // No ok button |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public GenericDialog.ButtonType getButtonType() |
| | | { |
| | | return GenericDialog.ButtonType.CLOSE; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | private Component createSplitPane() |
| | | { |
| | | JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); |
| | |
| | | |
| | | entryPane.addIndexSelectionListener(new IndexSelectionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void indexSelected(IndexSelectionEvent ev) |
| | | { |
| | | AbstractIndexDescriptor index = ev.getIndex(); |
| | |
| | | |
| | | treePane.getTree().addTreeSelectionListener(new TreeSelectionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void valueChanged(TreeSelectionEvent ev) |
| | | { |
| | | if (!ignoreSelectionEvents) |
| | |
| | | return pane; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setInfo(ControlPanelInfo info) |
| | | { |
| | | super.setInfo(info); |
| | |
| | | info.addIndexModifiedListener(this); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void configurationChanged(ConfigurationChangeEvent ev) |
| | | { |
| | | ignoreSelectionEvents = true; |
| | |
| | | INFO_CTRL_PANEL_NEW_INDEX_MENU.get()); |
| | | menuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newIndexClicked(); |
| | |
| | | INFO_CTRL_PANEL_NEW_VLV_INDEX_MENU.get()); |
| | | menuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | newVLVIndexClicked(); |
| | |
| | | INFO_CTRL_PANEL_DELETE_INDEX_MENU.get()); |
| | | deleteMenuItem.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | deleteClicked(); |
| | |
| | | { |
| | | SwingUtilities.invokeLater(new Runnable() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void run() |
| | | { |
| | | repopulateTree(treePane.getTree()); |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void indexModified(IndexModifiedEvent ev) |
| | | { |
| | | refreshContents(getInfo().getServerDescriptor()); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void backendIndexesModified(IndexModifiedEvent ev) |
| | | { |
| | | refreshContents(getInfo().getServerDescriptor()); |
| | |
| | | newVLVIndexPanel.addConfigurationElementCreatedListener( |
| | | new ConfigurationElementCreatedListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void elementCreated(ConfigurationElementCreatedEvent ev) |
| | | { |
| | | Object o = ev.getConfigurationObject(); |
| | |
| | | |
| | | private static final long serialVersionUID = -6953837045703643228L; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Component getTreeCellRendererComponent(JTree tree, Object value, |
| | | boolean isSelected, boolean isExpanded, boolean isLeaf, int row, |
| | | boolean hasFocus) |