| | |
| | | createLayout(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Component getPreferredFocusComponent() |
| | | { |
| | | return ldif; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean requiresScroll() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void setParent(BasicNode parentNode, BrowserController controller) |
| | | { |
| | | super.setParent(parentNode, controller); |
| | |
| | | ldif.setCaretPosition(emptyDn.length()); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected LocalizableMessage getProgressDialogTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ENTRY_FROM_LDIF_TITLE.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ENTRY_FROM_LDIF_TITLE.get(); |
| | |
| | | ldif = Utilities.createTextArea(LocalizableMessage.EMPTY, 20, 50); |
| | | ldif.getDocument().addDocumentListener(new DocumentListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeUpdate(DocumentEvent ev) |
| | | { |
| | | lSyntaxCorrect.setVisible(false); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void changedUpdate(DocumentEvent ev) |
| | | { |
| | | removeUpdate(ev); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void insertUpdate(DocumentEvent ev) |
| | | { |
| | | removeUpdate(ev); |
| | |
| | | checkSyntax.setOpaque(false); |
| | | checkSyntax.addActionListener(new ActionListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>(); |
| | |
| | | add(checkSyntax, gbc); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void toBeDisplayed(boolean visible) |
| | | { |
| | | lSyntaxCorrect.setVisible(false); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected void checkSyntax(ArrayList<LocalizableMessage> errors) |
| | | { |
| | | try |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected String getLDIF() |
| | | { |
| | | return ldif.getText(); |