public abstract class AbstractView extends java.lang.Object implements View
Modifier and Type | Field and Description |
---|---|
protected Filters |
filters
The current filters
|
protected Table |
table
The current (active) table.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractView()
Sets the view definition object and applies the default system table and
visuals.
|
Modifier and Type | Method and Description |
---|---|
void |
addViewListener(ViewListener listener)
Adds a view listener.
|
void |
changeFilters(java.lang.String[] filters)
Change visuals.
|
void |
changeTable(java.lang.String name)
Change system table.
|
View |
copy()
Returns a deep clone of the object.
|
protected abstract AbstractView |
createCopy()
Creates a new instance to be used for the copy operation.
|
protected void |
fireFiltersChangedEvent()
Broadcasts a
ViewListener.filtersChanged(ViewEvent) event. |
protected void |
fireTableChangedEvent()
Broadcasts a
ViewListener.tableChanged(ViewEvent) event. |
void |
forceReloadActiveTable(Environment env)
clears off the table from the view so that the latest definition / extension
can be looked upon for loading the table.
|
java.lang.String[] |
getActiveFilterNames()
Returns the active filters.
|
Table |
getActiveTable(Environment env)
Returns the system table.
|
java.lang.String |
getActiveTableName()
Returns the name of the current active table.
|
abstract java.lang.String[] |
getAvailableFilterNames()
Returns a list of available filters
|
Filters |
getAvailableFilters()
Returns the available filters from this view.
|
abstract java.lang.String[] |
getAvailableTableNames()
Returns a list of available tables.
|
abstract java.lang.String |
getContextMenuName()
The context menu
|
abstract java.lang.String |
getDisplayName(java.util.Locale forLocale)
Returns the display name of the view.
|
Expander |
getExpander()
Returns the expander that is used to expand structures using this view.
|
Filters |
getFilters()
Returns the filters used by this view.
|
abstract java.lang.String |
getName()
Returns the name of the view.
|
abstract java.lang.String |
getRoleName()
Returns the role name on which the filters are defined.
|
TableFactory |
getTableFactory()
Returns the factory that is used to load tables.
|
abstract java.lang.String |
getToolBarName()
The toolbar
|
protected boolean |
isTableAvailable(java.lang.String name) |
protected void |
onClone(AbstractView view)
Invoked when this view is being copied.
|
void |
removeViewListener(ViewListener listener)
Removes a view listener.
|
void |
setExpander(Expander expander)
Sets a custom expander.
|
void |
setTableFactory(TableFactory tableFactory)
Change the factory that will be used to load tables.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayMode
protected Table table
protected Filters filters
protected AbstractView()
public java.lang.String getActiveTableName()
getActiveTableName
in interface View
public java.lang.String[] getActiveFilterNames()
getActiveFilterNames
in interface View
public abstract java.lang.String getName()
public abstract java.lang.String getDisplayName(java.util.Locale forLocale)
getDisplayName
in interface View
forLocale
- The desired locale of the display name.public abstract java.lang.String[] getAvailableTableNames()
View
getAvailableTableNames
in interface View
public abstract java.lang.String[] getAvailableFilterNames()
View
getAvailableFilterNames
in interface View
public abstract java.lang.String getRoleName()
View
getRoleName
in interface View
public abstract java.lang.String getContextMenuName()
getContextMenuName
in interface View
public abstract java.lang.String getToolBarName()
getToolBarName
in interface View
public void changeTable(java.lang.String name)
changeTable
in interface View
name
- The name of the new table.protected boolean isTableAvailable(java.lang.String name)
public Table getActiveTable(Environment env) throws TVCException
getActiveTable
in interface View
env
- The current Environment
. The environment affects how
the table is loaded, if it has to be loaded.TVCException
- If unable to get the table definition.public void forceReloadActiveTable(Environment env) throws TVCException
forceReloadActiveTable
in interface View
env
- TVCException
public void changeFilters(java.lang.String[] filters)
changeFilters
in interface View
filters
- The new filters that should be active.public Filters getFilters()
View
getFilters
in interface View
public Filters getAvailableFilters()
View
getAvailableFilters
in interface View
public void addViewListener(ViewListener listener)
addViewListener
in interface View
listener
- The new ViewListener
.public void removeViewListener(ViewListener listener)
removeViewListener
in interface View
listener
- The listener to remove.protected void fireTableChangedEvent()
ViewListener.tableChanged(ViewEvent)
event.protected void fireFiltersChangedEvent()
ViewListener.filtersChanged(ViewEvent)
event.protected abstract AbstractView createCopy() throws TVCException
TVCException
protected void onClone(AbstractView view)
view
- public final View copy() throws TVCException
copy
in interface View
TVCException
public TableFactory getTableFactory()
View
getTableFactory
in interface View
public void setTableFactory(TableFactory tableFactory)
View
setTableFactory
in interface View
tableFactory
- The new TableFactory
.public void setExpander(Expander expander)
View
setExpander
in interface View
public Expander getExpander()
View
getExpander
in interface View
Copyright © Technia AB. All Rights Reserved.