2.17.2: 2011-06-17

net.sf.basedb.util.overview.node
Class LabeledExtractNameGenerator

java.lang.Object
  extended by net.sf.basedb.util.overview.node.NameableNameGenerator<LabeledExtract>
      extended by net.sf.basedb.util.overview.node.LabeledExtractNameGenerator
All Implemented Interfaces:
NodeNameGenerator<LabeledExtract>

public class LabeledExtractNameGenerator
extends NameableNameGenerator<LabeledExtract>

Name generator implementation for LabeledExtract items. The implementation use the NameableNameGenerator but prefixes the node title with the name of the label. Eg. cy3: My labeled extract.

Version:
2.10
Author:
Nicklas
Last modified
$Date: 2010-08-13 10:50:27 +0200 (Fri, 13 Aug 2010) $

Constructor Summary
LabeledExtractNameGenerator(String namePrefix, String titlePrefix)
          Create a new name generator.
 
Method Summary
 String getNodeTitle(LabeledExtract item, Node parentNode)
          The base of the title is generated by the superclass.
 
Methods inherited from class net.sf.basedb.util.overview.node.NameableNameGenerator
getDeniedNodeName, getDeniedNodeTitle, getMissingNodeName, getMissingNodeTitle, getNodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabeledExtractNameGenerator

public LabeledExtractNameGenerator(String namePrefix,
                                   String titlePrefix)
Create a new name generator.

Parameters:
namePrefix - The prefix to use in node names
titlePrefix - The prefix to use in node titles
Method Detail

getNodeTitle

public String getNodeTitle(LabeledExtract item,
                           Node parentNode)
The base of the title is generated by the superclass. This implementation just prefixes the title with the name of the label.

Specified by:
getNodeTitle in interface NodeNameGenerator<LabeledExtract>
Overrides:
getNodeTitle in class NameableNameGenerator<LabeledExtract>
Parameters:
item - The item that is attached to the node (never null)
parentNode - The parent node of the new node
Returns:
A title for the node

2.17.2: 2011-06-17