All Packages Class Hierarchy This Package Previous Next Index
Class Webcrawler.Visualizer.VisualNodeHelper
java.lang.Object
|
+----Webcrawler.Visualizer.VisualNodeHelper
- public class VisualNodeHelper
- extends Object
This class helps with drawing URLNodes/LoadableNodes/HTMLNodes. It contains
the icons for those nodes, so that they only need to be loaded once.
The VisualizerCellRenderer and the NodeViewer need this class for displaying
node-information.
- See Also:
- VisualizerCellRenderer, NodeViewer
-
applicationIcon
-
-
audioIcon
-
-
collapsedIcon
-
-
deadIcon
-
-
expandedIcon
-
-
imageIcon
-
-
mailIcon
-
-
malformedIcon
-
-
otherIcon
-
-
recursiveIcon
-
-
VisualNodeHelper()
-
-
getBackground(URLNode)
- This method is used for drawing a node in the VisualizerCellRenderer.
-
getDrawBox(URLNode)
- The VisualizerCellRenderer also needs this method to determine
whether a box should be drawn around the node.
-
getIcon(URLNode)
- Same as getIcon(n,true,true).
-
getIcon(URLNode, boolean, boolean)
- Gets the right icon for the URLNode n.
collapsedIcon
static ImageIcon collapsedIcon
expandedIcon
static ImageIcon expandedIcon
deadIcon
static ImageIcon deadIcon
malformedIcon
static ImageIcon malformedIcon
mailIcon
static ImageIcon mailIcon
recursiveIcon
static ImageIcon recursiveIcon
imageIcon
static ImageIcon imageIcon
audioIcon
static ImageIcon audioIcon
applicationIcon
static ImageIcon applicationIcon
otherIcon
static ImageIcon otherIcon
VisualNodeHelper
public VisualNodeHelper()
getIcon
public ImageIcon getIcon(URLNode n,
boolean expanded,
boolean leaf)
- Gets the right icon for the URLNode n. The VisualizerCellRenderer also
sends the expanded and leaf information. This way a different icon can
be used for expanded and collapsed nodes in the visualisation.
- Returns:
- the appropriate icon for the URLNode n
getIcon
public ImageIcon getIcon(URLNode n)
- Same as getIcon(n,true,true). The NodeViewer uses this simple method
for displaying the correct icon.
- Returns:
- the appropriate icon for the URLNode n
getBackground
public Color getBackground(URLNode n)
- This method is used for drawing a node in the VisualizerCellRenderer.
The background-color depends on the NodeState as well as the URLType
(in case of LoadableNodes).
getDrawBox
public boolean getDrawBox(URLNode n)
- The VisualizerCellRenderer also needs this method to determine
whether a box should be drawn around the node.
All Packages Class Hierarchy This Package Previous Next Index