jimm.datavision.layout.swing
Class SwingTextField

java.lang.Object
  extended by jimm.datavision.layout.swing.AbstractSwingField
      extended by jimm.datavision.layout.swing.SwingTextField
All Implemented Interfaces:
SwingField

public class SwingTextField
extends AbstractSwingField

A Swing field is the visual representation of a report field.

Author:
Jim Menard, jimm@io.com
See Also:
SwingLE

Field Summary
static java.awt.Color HIDDEN_FG_COLOR
           
 
Fields inherited from class jimm.datavision.layout.swing.AbstractSwingField
component, field
 
Constructor Summary
SwingTextField(Field f)
          Constructor.
SwingTextField(Field f, java.lang.String str)
          Constructor.
 
Method Summary
 void format()
          Formats the label according to the field's formatting specifications.
 java.awt.Color getColor()
          Returns field color based on visibility.
 java.awt.Color getColor(Format format)
          Returns field color based on visibility.
 
Methods inherited from class jimm.datavision.layout.swing.AbstractSwingField
getComponent, getField, makeBorders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIDDEN_FG_COLOR

public static final java.awt.Color HIDDEN_FG_COLOR
Constructor Detail

SwingTextField

public SwingTextField(Field f)
Constructor.

Parameters:
f - report field

SwingTextField

public SwingTextField(Field f,
                      java.lang.String str)
Constructor.

Parameters:
f - report field
str - label text
Method Detail

format

public void format()
Formats the label according to the field's formatting specifications.

Specified by:
format in interface SwingField
Specified by:
format in class AbstractSwingField

getColor

public java.awt.Color getColor()
Returns field color based on visibility.

Overrides:
getColor in class AbstractSwingField
Returns:
Color.black

getColor

public java.awt.Color getColor(Format format)
Returns field color based on visibility.