|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
jimm.datavision.Element
jimm.datavision.field.Field
jimm.datavision.field.ImageField
public class ImageField
Represents an external image. The value instance value
stores the images file's path.
| Field Summary | |
|---|---|
protected javax.swing.ImageIcon |
hiddenImageIcon
|
protected javax.swing.ImageIcon |
imageIcon
|
protected java.net.URL |
imageURL
|
static java.lang.String |
TYPE_STRING
|
| Fields inherited from class jimm.datavision.field.Field |
|---|
border, bounds, cache, DEFAULT_HEIGHT, DEFAULT_WIDTH, format, id, maxIdSeen, value |
| Fields inherited from class jimm.datavision.Element |
|---|
report, section, visible |
| Constructor Summary | |
|---|---|
ImageField(java.lang.Long id,
Report report,
Section section,
java.lang.Object value,
boolean visible)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
canLoad()
|
java.lang.String |
dragString()
Returns the string used to identify a field type when dragging. |
java.lang.String |
formulaString()
Returns a string representing the field as it appears in a formula. |
javax.swing.ImageIcon |
getHiddenImageIcon()
Returns a dimmed version of the the image icon. |
javax.swing.ImageIcon |
getImageIcon()
Returns the image icon, visually dimmed if the field is hidden. |
java.net.URL |
getImageURL()
Returns the image URL. |
double |
getOutputHeight()
Always returns the bounds height. |
javax.swing.ImageIcon |
getVisibleImageIcon()
Returns the image icon. |
FieldWidget |
makeWidget(SectionWidget sw)
Returns a new widget of the appropriate FieldWidget
subclass for this field. |
void |
setValue(java.lang.Object newValue)
Sets our value and image URL. |
java.lang.String |
toString()
Returns this fields formatted value, ready for display in the report. |
java.lang.String |
typeString()
Returns the string that specifies this field's type in the report XML. |
| Methods inherited from class jimm.datavision.field.Field |
|---|
canBeAggregated, clone, create, createFromDragString, designLabel, finalize, getBorder, getBorderOrDefault, getBounds, getFormat, getId, getValue, refersTo, refersTo, refersTo, refersTo, setBorder, setBounds, setFormat, update, writeFieldGuts, writeXML |
| Methods inherited from class jimm.datavision.Element |
|---|
getReport, getSection, isVisible, setSection, setVisible |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TYPE_STRING
protected java.net.URL imageURL
protected javax.swing.ImageIcon imageIcon
protected javax.swing.ImageIcon hiddenImageIcon
| Constructor Detail |
|---|
public ImageField(java.lang.Long id,
Report report,
Section section,
java.lang.Object value,
boolean visible)
id - the unique identifier for the new fieldreport - the report containing this linesection - the section containing this linevalue - the value; a file path stringvisible - show/hide flag| Method Detail |
|---|
public double getOutputHeight()
getOutputHeight in class Fieldpublic java.net.URL getImageURL()
public javax.swing.ImageIcon getImageIcon()
public javax.swing.ImageIcon getVisibleImageIcon()
public javax.swing.ImageIcon getHiddenImageIcon()
public void setValue(java.lang.Object newValue)
setValue in class FieldnewValue - the new valuepublic boolean canLoad()
public FieldWidget makeWidget(SectionWidget sw)
FieldFieldWidget
subclass for this field. Subclasses override this method to return
different types of widgets.
makeWidget in class Fieldsw - a field widgetpublic java.lang.String dragString()
FieldField.typeString() plus a value or an id.
dragString in interface DraggabledragString in class Fieldpublic java.lang.String typeString()
Field
typeString in class Fieldpublic java.lang.String formulaString()
Field
formulaString in class Fieldpublic java.lang.String toString()
FieldgetValue returns
null then this method will return null.
toString in class Fieldnull
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||