Package org.sleuthkit.datamodel

Examples of org.sleuthkit.datamodel.TagName


            // or select a tag name and adds a tag with the resulting name.
            MenuItem newTagMenuItem = new MenuItem("New Tag...");
            newTagMenuItem.setOnAction((ActionEvent t) -> {
                try {
                    SwingUtilities.invokeAndWait(() -> {
                        TagName tagName = GetTagNameDialog.doDialog();
                        if (tagName != null) {
                            addTag(tagName, NO_COMMENT);
                            refreshDirectoryTree();
                        }
                    });
View Full Code Here


        if (uniqueTagNames.containsKey(displayName)) {
            throw new TagNameAlreadyExistsException();
        }

        // Add the tag name to the case.
        TagName newTagName = tskCase.addTagName(displayName, description, color);

        // Add the tag name to the tags settings.
        uniqueTagNames.put(newTagName.getDisplayName(), newTagName);
        saveTagNamesToTagsSettings();       

        return newTagName;
    }
View Full Code Here

            // at a time to gracefully discard any duplicates or corrupt tuples.
            for (String tagNameTuple : tagNameTuples) {               
                String[] tagNameAttributes = tagNameTuple.split(",");
                if (!uniqueTagNames.containsKey(tagNameAttributes[0])) {       
                    try {
                        TagName tagName = tskCase.addTagName(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.getColorByName(tagNameAttributes[2]));
                        uniqueTagNames.put(tagName.getDisplayName(), tagName);
                    }
                    catch (TskCoreException ex) {
                        Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to add saved tag name " + tagNameAttributes[0], ex); //NON-NLS
                    }
                }
View Full Code Here

    }

    private void getPredefinedTagNames() {
        if (!uniqueTagNames.containsKey(NbBundle.getMessage(this.getClass(), "TagsManager.predefTagNames.bookmark.text"))) {
            try {
                TagName tagName = tskCase.addTagName(
                        NbBundle.getMessage(this.getClass(), "TagsManager.predefTagNames.bookmark.text"), "", TagName.HTML_COLOR.NONE);
                uniqueTagNames.put(tagName.getDisplayName(), tagName);
            }
            catch (TskCoreException ex) {
                Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to add predefined 'Bookmark' tag name", ex); //NON-NLS
            }
        }
View Full Code Here

            // or select a tag name and adds a tag with the resulting name.
            JMenuItem newTagMenuItem = new JMenuItem(NbBundle.getMessage(this.getClass(), "AddTagAction.newTag"));
            newTagMenuItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    TagName tagName = GetTagNameDialog.doDialog();
                    if (tagName != null) {
                        addTag(tagName, NO_COMMENT);
                        refreshDirectoryTree();
                    }
                }
View Full Code Here

        tagNameAndComment = null;
        dispose();
    }//GEN-LAST:event_closeDialog

    private void newTagButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newTagButtonActionPerformed
        TagName newTagName = GetTagNameDialog.doDialog();
        if (newTagName != null) {
            tagNames.put(newTagName.getDisplayName(), newTagName);
            tagCombo.addItem(newTagName.getDisplayName());
            tagCombo.setSelectedItem(newTagName.getDisplayName());
        }
    }//GEN-LAST:event_newTagButtonActionPerformed
View Full Code Here

TOP

Related Classes of org.sleuthkit.datamodel.TagName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.