public abstract class BaseControl<Bound extends javax.swing.JComponent,T> extends DomUIControl implements Highlightable
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
ERROR_BACKGROUND |
static java.awt.Color |
ERROR_FOREGROUND |
static java.awt.Color |
WARNING_BACKGROUND |
Modifier | Constructor and Description |
---|---|
protected |
BaseControl(DomWrapper<T> domWrapper) |
Modifier and Type | Method and Description |
---|---|
void |
addCommitListener(CommitListener listener) |
void |
bind(javax.swing.JComponent component) |
boolean |
canNavigate(DomElement element) |
void |
commit() |
protected abstract Bound |
createMainComponent(Bound boundedComponent) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
protected void |
doCommit(T value) |
protected void |
doReset() |
Bound |
getComponent() |
protected javax.swing.JComponent |
getComponentToListenFocusLost(Bound component) |
protected java.awt.Color |
getDefaultBackground() |
protected java.awt.Color |
getDefaultForeground() |
DomElement |
getDomElement() |
DomWrapper<T> |
getDomWrapper() |
protected java.awt.Color |
getErrorBackground() |
protected java.awt.Color |
getErrorForeground() |
protected javax.swing.JComponent |
getHighlightedComponent(Bound component) |
protected Project |
getProject() |
protected abstract T |
getValue() |
protected java.awt.Color |
getWarningBackground() |
protected boolean |
isCommitted() |
protected boolean |
isValid() |
void |
navigate(DomElement element) |
void |
removeCommitListener(CommitListener listener) |
void |
reset() |
protected abstract void |
setValue(T value) |
protected void |
updateComponent() |
void |
updateHighlighting() |
addDependency
public static final java.awt.Color ERROR_BACKGROUND
public static final java.awt.Color ERROR_FOREGROUND
public static final java.awt.Color WARNING_BACKGROUND
protected BaseControl(DomWrapper<T> domWrapper)
protected javax.swing.JComponent getHighlightedComponent(Bound component)
protected final java.awt.Color getDefaultBackground()
protected final java.awt.Color getDefaultForeground()
protected final java.awt.Color getErrorBackground()
protected final java.awt.Color getWarningBackground()
protected final java.awt.Color getErrorForeground()
protected javax.swing.JComponent getComponentToListenFocusLost(Bound component)
public void bind(javax.swing.JComponent component)
bind
in class DomUIControl
public void addCommitListener(CommitListener listener)
addCommitListener
in class DomUIControl
public void removeCommitListener(CommitListener listener)
removeCommitListener
in class DomUIControl
public final DomElement getDomElement()
getDomElement
in class DomUIControl
public final DomWrapper<T> getDomWrapper()
public final Bound getComponent()
getComponent
in interface CommittablePanel
public void dispose()
Disposable
dispose
in interface Disposable
public final void commit()
commit
in interface Committable
protected final boolean isValid()
public final void reset()
reset
in interface Committable
public void updateHighlighting()
updateHighlighting
in interface Highlightable
protected void updateComponent()
protected void doReset()
protected boolean isCommitted()
protected void doCommit(T value) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
protected final Project getProject()
public boolean canNavigate(DomElement element)
canNavigate
in class DomUIControl
public void navigate(DomElement element)
navigate
in class DomUIControl
protected abstract T getValue()
protected abstract void setValue(T value)