32 lines
1.5 KiB
Java
32 lines
1.5 KiB
Java
/*
|
|
* Copyright (c) 2006,2009 Declarative Engineering LLC.
|
|
* All rights reserved. This program and the accompanying materials
|
|
* are made available under the terms of the Declarative Engineering LLC
|
|
* verson 1 which accompanies this distribution, and is available at
|
|
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
|
*/
|
|
package com.foundation.view.swt;
|
|
|
|
import com.foundation.view.IResourceHolderComponent;
|
|
import com.foundation.view.resource.AbstractResourceService;
|
|
|
|
/*
|
|
* Used by components that may receive either a static value or a reference to a resource.
|
|
* This resource association will take the value, register listeners if it is a resource, get the actual value if it is a resource, and notify the component when the value is set or is changed.
|
|
* <p><b>Note: It is probably a fair bit more efficient to use an AbstractResourceHolder for each element in collecton style control since the resource manager then performs all the indexing instead of having a middle man.</b></p>
|
|
*/
|
|
public class MultiResourceHolder extends com.foundation.view.AbstractMultiResourceHolder {
|
|
/**
|
|
* MultiResourceHolder constructor.
|
|
* @param component The component that will be notified when the resource value changes.
|
|
*/
|
|
public MultiResourceHolder(IResourceHolderComponent component) {
|
|
super(component);
|
|
}//ResourceHolder()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.ResourceHolder#getResourceService()
|
|
*/
|
|
protected AbstractResourceService getResourceService() {
|
|
return getComponent().getResourceService();
|
|
}//getResourceService()//
|
|
}//MultiResourceHolder// |