ix.iface.ui
Class DefaultColourField

java.lang.Object
  extended by 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)  int font
           
(package private)  javax.swing.Icon icon
           
(package private)  java.lang.String name
           
(package private)  java.lang.Character sym
           
 
Constructor Summary
DefaultColourField(java.lang.String theName)
           
DefaultColourField(java.lang.String theName, java.awt.Color theColour)
           
DefaultColourField(java.lang.String theName, java.awt.Color theColour, int theFont)
           
 
Method Summary
 boolean hasColour()
           
 boolean hasFont()
           
 boolean hasIcon()
           
 boolean hasSymbol()
           
 void setColour(java.awt.Color theColour)
           
 void setFont(int theFont)
           
 void setIcon(javax.swing.Icon theIcon)
           
 void setString(java.lang.String theString)
           
 void setSymbol(java.lang.Character theSymbol)
           
 java.awt.Color toColour()
           
 int toFont()
           
 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

font

int font

sym

java.lang.Character sym

icon

javax.swing.Icon icon
Constructor Detail

DefaultColourField

public DefaultColourField(java.lang.String theName)

DefaultColourField

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

DefaultColourField

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

setColour

public void setColour(java.awt.Color theColour)

setString

public void setString(java.lang.String theString)

setIcon

public void setIcon(javax.swing.Icon theIcon)

setSymbol

public void setSymbol(java.lang.Character theSymbol)

setFont

public void setFont(int theFont)

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

toFont

public int toFont()
Specified by:
toFont 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

hasFont

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