Java 类org.apache.commons.lang3.event.EventListenerSupport 实例源码

项目:homecockpit-fsuipc    文件:FSUIPCKryonetInterface.java   
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);
}
项目:eamaster    文件:Controller.java   
/**
 * 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>>();
}
项目:eamaster    文件:ProgressHelper.java   
/**
 * 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);
}
项目:polydes    文件:NodeSelection.java   
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());
}
项目:polydes    文件:DTreeSelectionModel.java   
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);
}
项目:polydes    文件:DTreeModel.java   
public DTreeModel(HierarchyModel<T, U> model)
{
    this.model = model;
    this.root = model.getRootBranch();
    treeListeners = new EventListenerSupport<>(TreeModelListener.class);
    model.addRepresentation(this);
}
项目:polydes    文件:LeafListSelectionModel.java   
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;
}
项目:homecockpit-fsuipc    文件:FSUIPCFlightSimInterface.java   
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);
     }
项目:polydes    文件:DataListTableWrapper.java   
public DataListTableWrapper(DataList model)
{
    this.model = Objects.requireNonNull(model);
    tableListeners = new EventListenerSupport<>(TableModelListener.class);
}
项目:polydes    文件:DataListCellEditor.java   
public DataListCellEditor(JTable table)
{
    cellListeners = EventListenerSupport.create(CellEditorListener.class);
    this.table = table;
}
项目:cloud-slang    文件:TestCaseEventDispatchService.java   
@PostConstruct
void initializeListeners() {
    this.listenerList = EventListenerSupport.create(ISlangTestCaseEventListener.class);
}
项目:eamaster    文件:AdaptiveTimeContinuation.java   
/**
 * 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);
}