|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.AbstractNodeView<T>
T
- the implementation of the NodeModel
this node view
is based onpublic abstract class AbstractNodeView<T extends NodeModel>
Abstract implementation of a node view. A node view is the visual component to a node, displaying a computed result (or the ongoing computation).
Note:Concrete implementations do not inherit from this class
directly but extend from NodeView
. Nodes that open an external
application extend from ExternalApplicationNodeView
.
Constructor Summary | |
---|---|
AbstractNodeView(T nodeModel)
Creates new view. |
Method Summary | |
---|---|
(package private) abstract void |
callCloseView()
Called from closeView() to close the view and release all
allocated resources. |
(package private) void |
callModelChanged()
Called from the model that something has changed. |
(package private) abstract void |
callOpenView(String title)
Direct(!) subclasses override this method and open the view or frame. |
(package private) void |
closeView()
Closes the view and disposes all allocated resources. |
NodeLogger |
getLogger()
Get reference to logger, never null. |
protected T |
getNodeModel()
Get reference to underlying NodeModel , never null. |
(package private) String |
getViewName()
|
protected abstract void |
modelChanged()
Method is invoked when the underlying NodeModel has
changed. |
(package private) void |
openView(String title)
Called from the framework to open a new view or bring an existing view to front. |
protected void |
updateModel(Object arg)
This method can be overridden by views that want to receive events from their assigned models via the NodeModel.notifyViews(Object) method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
AbstractNodeView(T nodeModel)
nodeModel
- The underlying node model.
NullPointerException
- If the nodeModel
is null.Method Detail |
---|
protected T getNodeModel()
NodeModel
, never null.
public NodeLogger getLogger()
void callModelChanged()
modelChanged()
.
This method is called when the node makes state transitions that affect the node model content, i.e. after execute or reset or when the highlight handler has changed.
protected abstract void modelChanged()
NodeModel
has
changed. Also the HiLightHandler have changed. Note, the
NodeModel
content may be not available. Be sure to
modify GUI components in the EventDispatchThread only.
protected void updateModel(Object arg)
NodeModel.notifyViews(Object)
method. Can be used to
iteratively update the view during execute.
arg
- The argument that is provided in the
notifyViews method.final void openView(String title)
title
- The view title.closeView()
abstract void callOpenView(String title)
openView(String)
and is called
at most once.
title
- the default title of the view. It should be shown in the
view title bar (if at all possible).void closeView()
openView(String)
. (Core) Sub-classes may widen the scope of this
method.
abstract void callCloseView()
closeView()
to close the view and release all
allocated resources. The view will not be opened again.
String getViewName()
openView(String)
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |