public abstract class DMXAbstractView extends Object implements DMXView
An implementation of DMXView
interface which provides some common methods that can be used
for view across all supported platforms. Clients should extend this class to gain access to functionality
provided automatically by the framework.
Modifier and Type | Field and Description |
---|---|
protected DMXAdapter |
adapter
Adapter instance this view is registered with.
|
protected Set<String> |
dataIds
Set of model data IDs used for this view.
|
Constructor and Description |
---|
DMXAbstractView(DMXAdapter adapter)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildView(DMXView child)
This method does nothing.
|
String |
getParentViewId()
Returns empty string as parent view ID.
|
Set<String> |
getViewDataIds()
Returns set of data IDs.
|
String |
getViewId()
Returns this class name as view ID.
|
protected abstract void |
loadDataIds()
Adds data IDs to
dataIds set. |
void |
setViewActive(String id,
boolean state)
Empty implementation.
|
Object |
viewPlacementConstraint()
Returns
null as view placement constraint. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
constructUI, getViewUI, render, updateFromModel
protected DMXAdapter adapter
public DMXAbstractView(DMXAdapter adapter)
adapter
- adapter instance related to this viewpublic String getViewId()
public String getParentViewId()
getParentViewId
in interface DMXView
public Object viewPlacementConstraint()
null
as view placement constraint.viewPlacementConstraint
in interface DMXView
public void addChildView(DMXView child)
addChildView
in interface DMXView
child
- child viewpublic void setViewActive(String id, boolean state)
setViewActive
in interface DMXView
id
- child view IDstate
- view stateprotected abstract void loadDataIds()
dataIds
set. This set contains IDs of model data
that this view is interested in. Subclasses should implement this method to
add data IDs for this view.public final Set<String> getViewDataIds()
loadDataIds()
to get list
of data IDs for this view.getViewDataIds
in interface DMXView
Copyright © 2012-2014 Vektor Software. All Rights Reserved.