ix.iface.ui
Class DefaultColourField

java.lang.Object
  |
  +--ix.iface.ui.DefaultColourField
All Implemented Interfaces:
FourField
Direct Known Subclasses:
EditableColourField

public class DefaultColourField
extends java.lang.Object
implements FourField

An interface with four aspects: string, colour, symbol, image. The four aspects can be displayed as one cell. They are of type

Not all of the fields have to be set. Only the text is required (if there is none, make toString return the empty string). Renderers should be able to display what is set and determine how many dimensions are needed.


Field Summary
(package private)  java.awt.Color colour
           
(package private)  java.lang.String name
           
 
Constructor Summary
DefaultColourField(java.lang.String theName, java.awt.Color theColour)
           
 
Method Summary
 boolean hasColour()
           
 boolean hasIcon()
           
 boolean hasSymbol()
           
 java.awt.Color toColour()
           
 javax.swing.Icon toIcon()
           
 java.lang.String toString()
           
 java.lang.Character toSymbol()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

java.lang.String name

colour

java.awt.Color colour
Constructor Detail

DefaultColourField

public DefaultColourField(java.lang.String theName,
                          java.awt.Color theColour)
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in interface FourField
Overrides:
toString in class java.lang.Object

toColour

public java.awt.Color toColour()
Specified by:
toColour in interface FourField

toIcon

public javax.swing.Icon toIcon()
Specified by:
toIcon in interface FourField

toSymbol

public java.lang.Character toSymbol()
Specified by:
toSymbol in interface FourField

hasColour

public boolean hasColour()
Specified by:
hasColour in interface FourField

hasIcon

public boolean hasIcon()
Specified by:
hasIcon in interface FourField

hasSymbol

public boolean hasSymbol()
Specified by:
hasSymbol in interface FourField