renderable
Class TextualFactoryBlock

java.lang.Object
  extended by renderable.TextualFactoryBlock

public class TextualFactoryBlock
extends java.lang.Object

This private class acts as an IMMUTABLE ID tag for factoryrenderableBlock. But it does more. It has a string tag displayed through the toString method. This allows us to add TextualFactoryBlock rather than String objects into menu.JList. By overriding equals, we ensure that AutoCompletePanel.menu when never have two equal items.


Constructor Summary
TextualFactoryBlock(FactoryRenderableBlock block, java.lang.String rep)
          Creates a TextualFactoryBlock with the given block and string representation
 
Method Summary
 int compareTo(TextualFactoryBlock b2)
           
 boolean equals(java.lang.Object obj)
           
 FactoryRenderableBlock getfactoryBlock()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextualFactoryBlock

public TextualFactoryBlock(FactoryRenderableBlock block,
                           java.lang.String rep)
Creates a TextualFactoryBlock with the given block and string representation

Parameters:
block - the FactoryRenderableBlock tagged/represented by this TextualFactoryBlock
rep - the String "representation" to use for this TFB. Usually this would be the block's label. To auto-generate a detailed rep, use the disambiguousStringRep() method.
Method Detail

getfactoryBlock

public FactoryRenderableBlock getfactoryBlock()
Returns:
FactoryBlock contained in this TextualFactoryBlock

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
hashCode of this

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(TextualFactoryBlock b2)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object