public interface View
extends PropertyChangeListener, ActionListener
Model,
Controller| 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.
|
String |
addComponent(Object component)
Adds the component to the view
|
String |
addComponent(Object component,
long behavior)
Adds the component to the view using behavior modifier.
|
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.
|
String |
removeComponent(Object component)
Removes the component from the view.
|
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.
|
Object access(String attributeName)
attributeName - the attribute namevoid actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenervoid addActionListener(ActionListener listener)
listener - the listenerString addComponent(Object component)
component - the componentString addComponent(Object component,
long behavior)
component - the componentbehavior - the behavior modifiervoid addPropertyChangeListener(PropertyChangeListener listener)
listener - the listenervoid clearComponents()
void clearControllerAdapters()
ComponentAdapter getComponent(String name)
name - the nameMap<String,ComponentAdapter> getComponents()
Controller getController()
List<ControllerAdapter> getControllerAdapters()
void populate(String attributeName,
Object newValue)
attributeName - the attribute namenewValue - the new valuevoid propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListenervoid registerControllerAdapter(ControllerAdapter controllerAdapter)
controllerAdapter - the controller adaptervoid removeActionListener(ActionListener listener)
listener - the listenerString removeComponent(Object component)
component - the componentvoid removePropertyChangeListener(PropertyChangeListener listener)
listener - the listenervoid setController(Controller controller)
controller - the new controllervoid unRegisterControllerAdapter(ControllerAdapter controllerAdapter)
controllerAdapter - the controller adapterCopyright © 2010-2020 Toolsverse. All Rights Reserved.