public class DefaultComponentMarkingUtils extends Object implements ComponentMarkingUtils
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DefaultComponentMarkingUtils.IdentifiableEventListener |
| Constructor and Description |
|---|
DefaultComponentMarkingUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected DefaultComponentMarkingUtils.IdentifiableEventListener |
getEventListener(MarkedEventListener listener,
String markName) |
protected Set<org.zkoss.zk.ui.event.EventListener> |
getListenersToRemove(Set<org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>> eventListeners,
Object newListenerId) |
protected void |
handleMarkedComponentListener(org.zkoss.zk.ui.Component markedComponent,
String markName,
String eventName,
MarkedEventListener listener) |
protected boolean |
isListenerToRemove(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> eventListener,
Object newListenerId) |
void |
markComponent(org.zkoss.zk.ui.Component parent,
org.zkoss.zk.ui.Component component,
String markName)
Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with
it, a renderer may mark it, so that then controller may assign a logic to it.
|
void |
markComponent(org.zkoss.zk.ui.Component parent,
org.zkoss.zk.ui.Component component,
String markName,
Object markData)
Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with
it, a renderer may mark it, so that then controller may assign a logic to it.
|
protected Set<org.zkoss.zk.ui.Component> |
mergeComponentSets(Set<org.zkoss.zk.ui.Component> first,
Set<org.zkoss.zk.ui.Component> second) |
void |
moveMarkedComponents(org.zkoss.zk.ui.Component source,
org.zkoss.zk.ui.Component target)
Copies the marked components data structure from source component to target component and removes it from the source
component
|
void |
registerMarkedComponentsListener(org.zkoss.zk.ui.Component parent,
String markName,
String eventName,
MarkedEventListener listener)
Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with
it, a renderer may mark it, so that then controller may assign a logic to it.
|
public void markComponent(org.zkoss.zk.ui.Component parent,
org.zkoss.zk.ui.Component component,
String markName)
ComponentMarkingUtilsmarkComponent in interface ComponentMarkingUtilsparent - parent component which will get a data structure of all marked components for every mark; it should be the
same object as the one passed as parent to render methodcomponent - component to be markedmarkName - name of the mark - this value should be known by controllerComponentMarkingUtils.registerMarkedComponentsListener(Component, String, String, MarkedEventListener)public void markComponent(org.zkoss.zk.ui.Component parent,
org.zkoss.zk.ui.Component component,
String markName,
Object markData)
ComponentMarkingUtilsmarkComponent in interface ComponentMarkingUtilsparent - parent component which will get a data structure of all marked components for every mark; it should be the
same object as the one passed as parent to render methodcomponent - component to be markedmarkName - name of the mark - this value should be known by controllermarkData - any data object that may be needed by controller to perform a logicComponentMarkingUtils.registerMarkedComponentsListener(Component, String, String, MarkedEventListener)public void registerMarkedComponentsListener(org.zkoss.zk.ui.Component parent,
String markName,
String eventName,
MarkedEventListener listener)
ComponentMarkingUtils
To assure that a particular logic is registered as listener is registered only once, it may be wrapped with
Identifiable interface. If a listener provided is of type
Identifiable and a listener with same id is already registered, then the old
one will be removed before new is registered.
registerMarkedComponentsListener in interface ComponentMarkingUtilsparent - parent component to which marked children logic should be assignedmarkName - name of the markeventName - UI event name which should trigger the logiclistener - whenever an event takes place, a consumer will be asked with initial event and with data retrieved from a
componentIdentifiableprotected void handleMarkedComponentListener(org.zkoss.zk.ui.Component markedComponent,
String markName,
String eventName,
MarkedEventListener listener)
protected Set<org.zkoss.zk.ui.event.EventListener> getListenersToRemove(Set<org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>> eventListeners, Object newListenerId)
protected boolean isListenerToRemove(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> eventListener,
Object newListenerId)
protected DefaultComponentMarkingUtils.IdentifiableEventListener getEventListener(MarkedEventListener listener, String markName)
public void moveMarkedComponents(org.zkoss.zk.ui.Component source,
org.zkoss.zk.ui.Component target)
ComponentMarkingUtilsmoveMarkedComponents in interface ComponentMarkingUtilssource - component from which the marked components should be copied and removedtarget - component to which the marked components should be copied toCopyright © 2018. All rights reserved.