hibergui.assoc
Class M2OEdit_Combo<T>
java.lang.Object
hibergui.Component<T>
hibergui.Edit<C>
hibergui.assoc.AssociationEdit<T,T>
hibergui.assoc.M2OEdit<T>
hibergui.assoc.M2OEdit_Combo<T>
- Direct Known Subclasses:
- HibernateM2OEdit_Combo
public abstract class M2OEdit_Combo<T>
- extends M2OEdit<T>
|
Constructor Summary |
M2OEdit_Combo(Form<?> form,
org.eclipse.swt.widgets.Composite cptParent,
int style,
java.lang.String prop,
java.lang.String name,
java.lang.String editProp)
|
|
Method Summary |
void |
clear()
Clears the controls of the edit. |
protected org.eclipse.swt.widgets.Control |
createContents(org.eclipse.swt.widgets.Composite cptParent)
Creates the GUI contents of the component. |
T |
extract()
It should do something like that (unfortunately, generic parameter
types cannot be instantiated):
public final T extract() {
T t = new T();
extract(t);
return t;
} |
void |
extract(T t)
|
void |
fill()
Fills the controls of the edit with its actual value. |
protected void |
fillForm(Form<T> f)
Fills the corresponding fields of the form, according to the content of the
editor. |
protected java.lang.String |
getItemText(T item)
|
java.lang.String |
getText()
|
boolean |
isEnabled()
|
void |
refresh()
|
void |
setBackground(org.eclipse.swt.graphics.Color clr)
|
private void |
setComboInput(java.util.Collection<T> c)
|
void |
setDefault(java.lang.String value)
|
void |
setEnabled(boolean b)
|
boolean |
setFocus()
|
| Methods inherited from class hibergui.Edit |
addConstraint, addConstraint, addModificationListener, addTraverseListener, fireKeyPressed, fireKeyReleased, fireTraversal, fix, get, getDefault, getName, getPropertyName, hasDefault, isDirty, isEditable, isFixed, isValid, markClean, markDirty, markInvalid, markValid, removeConstraint, removeConstraint, removeModificationListener, removeTraverseListener, resetBackground, set, setDefault, setDefault, setDefault, verify |
| Methods inherited from class hibergui.Component |
addChangeListener, addControlListener, addFocusListener, addKeyListener, dispose, fireChange, getControl, init, removeChangeListener, removeControlListener, removeFocusListener, removeKeyListener, setLayoutData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cpt
private org.eclipse.swt.widgets.Composite cpt
cmb
private org.eclipse.swt.widgets.Combo cmb
editProp
protected final java.lang.String editProp
values
private java.util.List<T> values
matchIndex
private int matchIndex
state
private M2OEdit_Combo.MatchState state
coll
java.text.Collator coll
M2OEdit_Combo
public M2OEdit_Combo(Form<?> form,
org.eclipse.swt.widgets.Composite cptParent,
int style,
java.lang.String prop,
java.lang.String name,
java.lang.String editProp)
createContents
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite cptParent)
- Description copied from class:
Component
- Creates the GUI contents of the component. Subclasses should override it.
- Specified by:
createContents in class Component<T>
- Parameters:
cptParent - The composite which the component will be placed on. The
parent of the control of the component.
- Returns:
- The control of the component containing its GUI elements.
getItemText
protected final java.lang.String getItemText(T item)
getText
public java.lang.String getText()
setComboInput
private void setComboInput(java.util.Collection<T> c)
clear
public void clear()
- Description copied from class:
Edit
- Clears the controls of the edit.
- Overrides:
clear in class AssociationEdit<T,T>
fill
public void fill()
- Description copied from class:
Edit
- Fills the controls of the edit with its actual value.
- Specified by:
fill in class Edit<T>
extract
public T extract()
- Description copied from class:
M2OEdit
- It should do something like that (unfortunately, generic parameter
types cannot be instantiated):
public final T extract() {
T t = new T();
extract(t);
return t;
}
- Overrides:
extract in class M2OEdit<T>
- Returns:
- the extracted value
extract
public final void extract(T t)
- Specified by:
extract in class M2OEdit<T>
refresh
public void refresh()
- Overrides:
refresh in class AssociationEdit<T,T>
setBackground
public void setBackground(org.eclipse.swt.graphics.Color clr)
- Overrides:
setBackground in class AssociationEdit<T,T>
setFocus
public boolean setFocus()
- Overrides:
setFocus in class AssociationEdit<T,T>
isEnabled
public boolean isEnabled()
- Overrides:
isEnabled in class AssociationEdit<T,T>
setEnabled
public void setEnabled(boolean b)
- Overrides:
setEnabled in class AssociationEdit<T,T>
setDefault
public void setDefault(java.lang.String value)
fillForm
protected void fillForm(Form<T> f)
- Description copied from class:
M2OEdit
- Fills the corresponding fields of the form, according to the content of the
editor. This is only invoked when no object has been set as the input the editor
yet.
- Overrides:
fillForm in class M2OEdit<T>