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
- sym - to be represented as a symbol/character
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
|
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
font
int font
sym
java.lang.Character sym
icon
javax.swing.Icon icon
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)
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