summaryrefslogtreecommitdiffstats
path: root/Master/Agile Software Development/TestApp/src/testapp/data/IframeItem.java
blob: 5a6537b45c04fc44913efa6295bb303d65126fb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package testapp.data;
import java.util.logging.*;
import java.util.HashMap;

/**
 *
 * @author sven
 */
public class IframeItem extends Item {

    @Override
    public ItemClassification analyse() {
        return doAnalyse();
    }

    public IframeItem(String url, Item parent) {
        super(url, parent);
        itemType = ItemType.IFRAME;
        attributes = getAttributes();
    }

//    public IframeItem(String url) {
//        super(url);
//        itemType = ItemType.IFRAME;
//        attributes = getAttributes();
//    }

    @Override
    protected HashMap<String, String> getAttributes() {
        if (attributes == null) {
            attributes = new HashMap<String,String>();
        }
        attributes.put("shape", "doubleoctagon");
        attributes.put("style", "filled");
        attributes.put("fontname", "Verdana");
        attributes.put("fontsize", "10");        
        return attributes;
    }
    @Override
    protected String getGraphNodetext() {
        if (this.filename.compareTo("")!=0)
            return this.filename;
        else
            return this.getUrl();
    }    
}