org.grinvin.invariants.values
Class AbstractInvariantValueDelegate<T,extends,InvariantValue>
java.lang.Objectorg.grinvin.invariants.values.AbstractInvariantValueDelegate<T,extends,InvariantValue>
- InvariantValueDelegate<T,extends,InvariantValue>
public abstract class AbstractInvariantValueDelegate<T,extends,InvariantValue>
extends java.lang.Object
static InvariantValue | fromElement(Element element)- Convert a JDOM-element to an invariant value of the correct class.
|
static InvariantValue | fromElement_1_0(Element element)- Convert a JDOM-element to an invariant value of the correct class.
|
boolean | hasDetails(T value)- Is it possible to obtain a 'details window' for this component?
The standard implementation always returns false.
|
void | initLabel(JLabel label, T value)- Initialize a label which is used to display this invariant value.
|
T | load(Element element)- Initialize the components of this value from a JDOM-element.
|
abstract T | loadValue(Element element, Invariant invariant, String computerId, String computerVersion)- Should be overridden to load the actual value from a JDOM-element.
|
T | load_1_0(Element element)- Initialize the components of this value from a JDOM-element.
|
abstract void | saveValue(Element element, T value)- Should be overridden to save the actual value into a JDOM-element.
|
void | showDetails(T value, GraphListElement element, JComponent component, int x, int y)- Show a 'details window' for this component.
|
Element | toElement(T value)- Converts this value to a JDOM element.
|
loadValue
public abstract T loadValue(Element element,
Invariant invariant,
String computerId,
String computerVersion)
throws IOFormatException Should be overridden to load the actual value from a JDOM-element.
Clients should throw an IOFormatException when element is not
in the correct format.
element - JDOM element, which is known to be of type
'value'
saveValue
public abstract void saveValue(Element element,
T value) Should be overridden to save the actual value into a JDOM-element.
element - JDOM element, which is of type 'value'
showDetails
public void showDetails(T value,
GraphListElement element,
JComponent component,
int x,
int y) Show a 'details window' for this component.
The standard implementation does nothing.
- showDetails in interface InvariantValueDelegate<T,extends,InvariantValue>
value - The invariant valueelement - Graph list element for which this invariant value
was computedcomponent - Component which invoked this methodx - X coordinate of mouse pointer when this method was invokedy - Y coordinate of mouse pointer when this method was invoked