|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.AbstractNodeView<T>
org.knime.core.node.NodeView<T>
T
- the implementation of the NodeModel
this node view
is based onpublic abstract class NodeView<T extends NodeModel>
Node view class that displays the view content in an
AWT-frame. The part specific to the special purpose
node view must be implemented in the derived class and must be placed in
a panel. This panel is registered in this base
class (method setComponent(Component)
and will be displayed in
the JFrame
provided and handled by this class.
Field Summary | |
---|---|
static Color |
COLOR_BACKGROUND
Default background color. |
static String |
PROP_CHANGE_CLOSE
This class sends property events when the status changes. |
Constructor Summary | |
---|---|
protected |
NodeView(T nodeModel)
Create a new view for a given (non-null) model. |
Method Summary | |
---|---|
void |
callCloseView()
Called by the node when it is deleted or by the "close" button. |
(package private) void |
callModelChanged()
Called from the model that something has changed. |
(package private) void |
callOpenView(String title)
Direct(!) subclasses override this method and open the view or frame. |
void |
closeView()
Deprecated. Will be removed without replacement in future versions of KNIME. Sub-classes should not be required to programmatically close views. |
JFrame |
createFrame(String viewTitle)
Deprecated. This method will be removed without replacement in future versions of KNIME as client code should not be required to open views. |
protected Component |
getComponent()
Returns the underlying content pane's panel placed at the center of the view. |
JMenuBar |
getJMenuBar()
Returns menu bar of the accompanying frame. |
String |
getViewTitle()
|
protected boolean |
isOpen()
|
protected abstract void |
onClose()
Invoked when the window is about to be closed. |
protected abstract void |
onOpen()
Invoked when the window has been opened. |
Component |
openViewComponent()
Deprecated. Will be removed without replacement in future versions of KNIME. |
protected void |
setComponent(Component comp)
Sets the panel of the view's content pane center area. |
protected void |
setShowNODATALabel(boolean showIt)
Sets the property if the "no data" label is shown when the underlying node is not executed but the view is shown (replaces whatever has been set by #setComponent(Component) . |
protected void |
setViewTitleSuffix(String suffix)
Append this suffix to the current view name. |
void |
warningChanged(String warning)
Called when the NodeModel warning changes. |
Methods inherited from class org.knime.core.node.AbstractNodeView |
---|
getLogger, getNodeModel, getViewName, modelChanged, openView, updateModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Color COLOR_BACKGROUND
public static final String PROP_CHANGE_CLOSE
Constructor Detail |
---|
protected NodeView(T nodeModel)
setComponent(Component)
.
This constructor creates the frame and the default menu bar.
nodeModel
- The underlying node model.
NullPointerException
- If the nodeModel
is null.setComponent(Component)
Method Detail |
---|
protected final void setShowNODATALabel(boolean showIt)
#setComponent(Component)
. Once the node is
executed the user panel is shown again.
showIt
- true
for replace the current view,
false
always show the real view.final void callModelChanged()
AbstractNodeView.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.
callModelChanged
in class AbstractNodeView<T extends NodeModel>
protected abstract void onClose()
HiLiteListeners
. Dispose internal members. NodeModel
protected abstract void onOpen()
public final JMenuBar getJMenuBar()
final void callOpenView(String title)
AbstractNodeView.openView(String)
and is called
at most once.
callOpenView
in class AbstractNodeView<T extends NodeModel>
title
- the default title of the view. It should be shown in the
view title bar (if at all possible).@Deprecated public final void closeView()
closeView
in class AbstractNodeView<T extends NodeModel>
public final void callCloseView()
Calls the onClose method and unregisters this view from the model. If you derive this class, do not call this method. It's being used by the framework (if views are shown within a JFrame) or by eclipse (if available, i.e. when views are embedded in eclipse).
callCloseView
in class AbstractNodeView<T extends NodeModel>
@Deprecated public final Component openViewComponent()
getComponent()
@Deprecated public final JFrame createFrame(String viewTitle)
viewTitle
- the tile for this view
JFrame
with an initialized NodeView
protected final boolean isOpen()
protected final void setViewTitleSuffix(String suffix)
suffix
is null
the title does not change.
suffix
- append this suffix to the current view namepublic final String getViewTitle()
protected final Component getComponent()
protected final void setComponent(Component comp)
Component
that implements the functionality of the derived
class with this function. The foreground and background colors of your
panel are set to the default colors defined in this class.
comp
- Component to set in the center of the view.public void warningChanged(String warning)
warningChanged
in interface NodeModelWarningListener
warning
- new warning
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |