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
String - to be represented by text
- Color - to be represented by background colour
- Icon - to be represented as an icon image
- char - to be represented as a symbol
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)
|
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
java.lang.String name
colour
java.awt.Color colour
DefaultColourField
public DefaultColourField(java.lang.String theName,
java.awt.Color theColour)
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