public abstract class ViewImpl extends Object implements View
Constructor and Description |
---|
ViewImpl()
Instantiates a new ViewImpl.
|
Modifier and Type | Method and Description |
---|---|
Object |
access(String attributeName)
Returns the value of the component by attribute name.
|
void |
actionPerformed(ActionEvent e) |
void |
addActionListener(ActionListener listener)
Adds the action listener.
|
void |
addAdapter(ComponentAdapter adapter)
Adds the adapter.
|
void |
addAdapter(ComponentAdapter adapter,
long behavior)
Adds the adapter.
|
String |
addComponent(Object component)
Adds the component to the view
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds the property change listener.
|
void |
clearComponents()
Removes all components from the view.
|
void |
clearControllerAdapters()
Removes all controller adapters rom the view.
|
ComponentAdapter |
getComponent(String name)
Gets the ComponentAdapter by name.
|
Map<String,ComponentAdapter> |
getComponents()
Gets the map where name is a name of the attribute and value is a ComponentAdapter.
|
Controller |
getController()
Gets the controller.
|
List<ControllerAdapter> |
getControllerAdapters()
Gets the list of the registered controller adapters.
|
void |
populate(String attributeName,
Object newValue)
Sets the value of the component by attribute name.
|
void |
propertyChange(PropertyChangeEvent event) |
void |
registerControllerAdapter(ControllerAdapter controllerAdapter)
Registers controller adapter.
|
void |
removeActionListener(ActionListener listener)
Removes the action listener.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the property change listener.
|
void |
setController(Controller controller)
Sets the controller for the view
|
void |
unRegisterControllerAdapter(ControllerAdapter controllerAdapter)
Unregisters controller adapter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addComponent, removeComponent
public Object access(String attributeName)
View
public void actionPerformed(ActionEvent e)
actionPerformed
in interface View
actionPerformed
in interface ActionListener
public void addActionListener(ActionListener listener)
View
addActionListener
in interface View
listener
- the listenerpublic void addAdapter(ComponentAdapter adapter)
adapter
- the adapterpublic void addAdapter(ComponentAdapter adapter, long behavior)
adapter
- the adapterbehavior
- the behaviorpublic String addComponent(Object component)
View
addComponent
in interface View
component
- the componentpublic void addPropertyChangeListener(PropertyChangeListener listener)
View
addPropertyChangeListener
in interface View
listener
- the listenerpublic void clearComponents()
View
clearComponents
in interface View
public void clearControllerAdapters()
View
clearControllerAdapters
in interface View
public ComponentAdapter getComponent(String name)
View
getComponent
in interface View
name
- the namepublic Map<String,ComponentAdapter> getComponents()
View
getComponents
in interface View
public Controller getController()
View
getController
in interface View
public List<ControllerAdapter> getControllerAdapters()
View
getControllerAdapters
in interface View
public void populate(String attributeName, Object newValue)
View
public void propertyChange(PropertyChangeEvent event)
propertyChange
in interface View
propertyChange
in interface PropertyChangeListener
public void registerControllerAdapter(ControllerAdapter controllerAdapter)
View
registerControllerAdapter
in interface View
controllerAdapter
- the controller adapterpublic void removeActionListener(ActionListener listener)
View
removeActionListener
in interface View
listener
- the listenerpublic void removePropertyChangeListener(PropertyChangeListener listener)
View
removePropertyChangeListener
in interface View
listener
- the listenerpublic void setController(Controller controller)
View
setController
in interface View
controller
- the new controllerpublic void unRegisterControllerAdapter(ControllerAdapter controllerAdapter)
View
unRegisterControllerAdapter
in interface View
controllerAdapter
- the controller adapterCopyright © 2010-2020 Toolsverse. All Rights Reserved.