本文整理汇总了Java中org.apache.commons.lang3.event.EventListenerSupport类的典型用法代码示例。如果您正苦于以下问题:Java EventListenerSupport类的具体用法?Java EventListenerSupport怎么用?Java EventListenerSupport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventListenerSupport类属于org.apache.commons.lang3.event包,在下文中一共展示了EventListenerSupport类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: FSUIPCKryonetInterface
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public FSUIPCKryonetInterface(String server, int port) {
this.server = server;
this.port = port;
// ~
client = new Client();
client.start();
client.addListener(new Listener() {
public void received (Connection connection, Object object) {
if(object instanceof String) {
String message = (String)object;
if(message.startsWith("CHANGED")) {
Collection<OffsetItem> offsetItems = toOffsetItems(message);
for(OffsetItem offsetItem : offsetItems) {
offsetEventListeners.fire().valueChanged(offsetItem);
}
offsetCollectionEventListeners.fire().valuesChanged(offsetItems);
}
}
}
});
// ~
offsetEventListeners = EventListenerSupport.create(OffsetEventListener.class);
offsetCollectionEventListeners = EventListenerSupport.create(OffsetCollectionEventListener.class);
}
开发者ID:RBernhardt,项目名称:homecockpit-fsuipc,代码行数:25,代码来源:FSUIPCKryonetInterface.java
示例2: Controller
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
/**
* Constructs a new controller for the specified {@code DiagnosticTool}
* instance.
*
* @param frame the {@code DiagnosticTool} instance using this controller
*/
public Controller(DiagnosticTool frame) {
super();
this.frame = frame;
listeners = EventListenerSupport.create(ControllerListener.class);
accumulators = new HashMap<ResultKey, List<Accumulator>>();
}
开发者ID:Matsemann,项目名称:eamaster,代码行数:14,代码来源:Controller.java
示例3: ProgressHelper
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
/**
* Constructs a new progress helper for generating progress reports for
* the given executor.
*
* @param executor the executor that will be reporting progress
*/
public ProgressHelper(Executor executor) {
super();
this.executor = executor;
statistics = new DescriptiveStatistics(25);
listeners = EventListenerSupport.create(ProgressListener.class);
}
开发者ID:Matsemann,项目名称:eamaster,代码行数:14,代码来源:ProgressHelper.java
示例4: NodeSelection
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public NodeSelection(HierarchyModel<T, U> model)
{
this.root = model.getRootBranch();
nodes = new SortedNodeCollection<T, U>(root);
type = SelectionType.FOLDERS;
leafClass = model.leafClass;
selectionEvents = new EventListenerSupport<>(NodeSelectionListener.class, NodeSelectionListener.class.getClassLoader());
}
开发者ID:justin-espedal,项目名称:polydes,代码行数:10,代码来源:NodeSelection.java
示例5: DTreeSelectionModel
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public DTreeSelectionModel(HierarchyModel<T,U> model)
{
this.selection = model.getSelection();
propertyChanges = new PropertyChangeSupport(this);
selectionEvents = new EventListenerSupport<>(TreeSelectionListener.class);
leafClass = model.leafClass;
selection.addSelectionListener(this);
}
开发者ID:justin-espedal,项目名称:polydes,代码行数:11,代码来源:DTreeSelectionModel.java
示例6: DTreeModel
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public DTreeModel(HierarchyModel<T, U> model)
{
this.model = model;
this.root = model.getRootBranch();
treeListeners = new EventListenerSupport<>(TreeModelListener.class);
model.addRepresentation(this);
}
开发者ID:justin-espedal,项目名称:polydes,代码行数:8,代码来源:DTreeModel.java
示例7: LeafListSelectionModel
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public LeafListSelectionModel(HierarchyModel<T,U> model, U folder)
{
this.selection = model.getSelection();
this.folder = folder;
selectionEvents = new EventListenerSupport<>(ListSelectionListener.class);
leafClass = model.leafClass;
selection.addSelectionListener(this);
anchor = -1;
lead = -1;
}
开发者ID:justin-espedal,项目名称:polydes,代码行数:14,代码来源:LeafListSelectionModel.java
示例8: MonitorOffsetThread
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public MonitorOffsetThread(FSUIPCFlightSimInterface fsuipcFlightSimInterface) {
this.fsuipcFlightSimInterface = fsuipcFlightSimInterface;
this.monitorOffsetList = new ConcurrentHashMap<>();
this.offsetValues = new HashMap<>();
this.offsetEventListeners = EventListenerSupport.create(OffsetEventListener.class);
this.offsetCollectionEventListeners = EventListenerSupport.create(OffsetCollectionEventListener.class);
}
开发者ID:RBernhardt,项目名称:homecockpit-fsuipc,代码行数:8,代码来源:FSUIPCFlightSimInterface.java
示例9: DataListTableWrapper
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public DataListTableWrapper(DataList model)
{
this.model = Objects.requireNonNull(model);
tableListeners = new EventListenerSupport<>(TableModelListener.class);
}
开发者ID:justin-espedal,项目名称:polydes,代码行数:6,代码来源:DataListTableWrapper.java
示例10: DataListCellEditor
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
public DataListCellEditor(JTable table)
{
cellListeners = EventListenerSupport.create(CellEditorListener.class);
this.table = table;
}
开发者ID:justin-espedal,项目名称:polydes,代码行数:6,代码来源:DataListCellEditor.java
示例11: initializeListeners
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
@PostConstruct
void initializeListeners() {
this.listenerList = EventListenerSupport.create(ISlangTestCaseEventListener.class);
}
开发者ID:CloudSlang,项目名称:cloud-slang,代码行数:5,代码来源:TestCaseEventDispatchService.java
示例12: AdaptiveTimeContinuation
import org.apache.commons.lang3.event.EventListenerSupport; //导入依赖的package包/类
/**
* Decorates the specified algorithm with adaptive time continuation.
*
* @param algorithm the algorithm being decorated
* @param windowSize the number of iterations between invocations of
* {@code check}
* @param maxWindowSize the maximum number of iterations allowed since the
* last restart before forcing a restart
* @param populationRatio the population-to-archive ratio
* @param minimumPopulationSize the minimum size of the population
* @param maximumPopulationSize the maximum size of the population
* @param selection the selection operator for selecting solutions from the
* archive during a restart
* @param variation the variation operator for mutating solutions selected
* from the archive during a restart
*/
public AdaptiveTimeContinuation(EvolutionaryAlgorithm algorithm,
int windowSize, int maxWindowSize, double populationRatio,
int minimumPopulationSize, int maximumPopulationSize,
Selection selection, Variation variation) {
super(algorithm, windowSize, FrequencyType.STEPS);
this.maxWindowSize = maxWindowSize;
this.populationRatio = populationRatio;
this.minimumPopulationSize = minimumPopulationSize;
this.maximumPopulationSize = maximumPopulationSize;
this.selection = selection;
this.variation = variation;
listeners = EventListenerSupport.create(RestartListener.class);
}
开发者ID:Matsemann,项目名称:eamaster,代码行数:31,代码来源:AdaptiveTimeContinuation.java
注:本文中的org.apache.commons.lang3.event.EventListenerSupport类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论